Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How does one go about securing the /boot partition? It doesn't contain any classified information, other than the scripts required to mount specially encrypted partitions, but it could be compromised as a way to attack the computer. I don't really want to carry around my boot partition on a USB stick. What I'd like to do is take an MD5 of the uncompromised boot partition on my USB stick, and have the boot partition check for the validity of the MD5 before booting. Can anyone imagine away to do this? I can write scripts or C programs or whatever else may be needed, but I don't know how to go about performing the task.
You could probably come up with some sort of encrypted bootloader or something, but I'm not sure. One option would be to have it unmount itself after loading all the partitions.
Matir:
The thing with an encrypted bootloader is that I'd need a bootloader to load that bootloader, and I'd wish I had some way of verifying the integrity of the bootloader loader.
GNUbie:
Yeah, I was looking at that issue before. That's what we really need, I guess - an Uber GRUB hacker. Surely GRUB would benefit from this sort of functionality, but I haven't seen such a thing already written. Any advice on patching a new feature into GRUB? I've never attempted such a thing.
Ok, I'm just going to throw my idea out there and let people attack it's feasibility.
Is it possible to load a small kernel, have that run some small programs like verifying md5s, and then kill that kernel and load another? All the small kernel needs to have is display stuff and enough brains to execute a binary file.
And a library loader to provide for the programs running the verification. It's possible, of course, in fact a bootloader is exactly that... a microkernel of sorts. Of course, it doesn't execute external code... doing so would require filesystem support, etc.
Matir:
Well, GRUB in particular already has filesystem support built in. In stage 1.5 it can handle ext2, and then in statge 2 it can handle reiserfs or whatever else you want to throw at it.
I suppose I could take a look at the source code and put a call to my own function in there somewhere, unless there's a way that I can get it to execute some of my own code without having to hack the source.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.