/r/archlinux, do you secure your boot partition?
Hello Archers!
I often hear people saying that their system is full disk encrypted. 99% of them does not secure the unencrypted part of their disk, the boot partition. So their system is vulnerable to evil made attacks.
Thats why I keep my boot partition on a keychain USB which I carry always with me. This is way the simplest and best method to fix this problem.
Now my question: Do you do that too or do you have other strategies?
Cheers!
drkhsh
About this post
- Posted
- Archived
- Score
- 26 · 100% up
- Kind
- Text
- ID
- 4cppim
106 comments
Yep, my EFI partition lives on a USB stick — plus I use a detached LUKS header that also lives on the stick, thus the entire contents of my laptop's entire 1TB SSD is literally indistinguishable from random noise.
...assuming you used properly implemented crypto :)
Is dm-crypt/luks/aes-xts not properly implemented?
Did you also use a different cipher and hash than AES just to mess with people? Oh wait, I should't ask you to disclose that in public.
It'd be dumb not to use AES and take advantage of ubiquitous hardware acceleration — but to be honest, I don't remember what I used and I'm too lazy to go pull my boot stick out of the lockbox to look it up.
Really nice! +1 :-)
That's what Secure Boot – with signing keys you generated yourself – is for.
And what if you do not want to use / do not have UEFI?
Then you're boned either way, because ye olde BIOS has zero protection against being reflashed.
Sucks with dual boot though.
Way I have it is using default secure boot for Windows, and grub + LUKS for Linux.
And this way you have to know and to have something.
Not really. There's no data on your /boot that an adversary could not simply guess and recreated themselves. Your data is still only protected by the LUKS passphrase.
Honestly, there comes a point where you have to ask yourself if you'd ever find yourself in a situtation in which the effort required to secure your system that much would ever pay off.
Relevant xkcd
Original Source
Mobile
Title: Security
Title-text: Actual actual reality: nobody cares about his secrets. (Also, I would be hard-pressed to find that wrench for $5.)
Comic Explanation
Stats: This comic has been referenced 962 times, representing 0.9117% of referenced xkcds.
[xkcd.com](https://www.xkcd.com) | [xkcd sub](https://www.reddit.com/r/xkcd/) | [Problems/Bugs?](https://www.reddit.com/r/xkcd_transcriber/) | [Statistics](http://xkcdref.info/statistics/) | [Stop Replying](https://reddit.com/message/compose/?to=xkcd_transcriber&subject=ignore%20me&message=ignore%20me) | [Delete](https://reddit.com/message/compose/?to=xkcd_transcriber&subject=delete&message=delete%20t1_d1l0jcr)
Not really, I am very lazy, but plugging in a USB sometimes a day is not too much for the added security
What do you do if you lose it?
It is possible to fully encrypt your disk with LUKS, including /boot. It does require you to use GRUB2 as your bootloader, it is the only bootloader I know of that can decrypt LUKS partitions. You need to use the ENABLE_CRYPTODISK option in /etc/default/grub. The downside is that you need to unlock the LUKS partition with /boot on it twice: once for GRUB and once for the kernel. I use keyfiles so that I only need to enter a password once.
The Arch Wiki has some hints on how to do this. I can probably write up some steps as well in case anyone is interested.
That's still not full disk encryption. GRUB itself is fully decrypted and can be pwned just as easily as before.
Well there will always be a vulnerable part. But the issue is not that it's not encrypted, as your data is secure. The issue is someone could just replace it with their own bootloader that, for example, also acts as a keylogger or something.
But they could do that anyway - actually with little tinkering you could just put a tiny USB flash drive inside the PC case and set BIOS/UEFI to boot from it. And you could do it so that you wouldn't even notice.
And not even securing the UEFI would help as you can usually just reset it. Like, it could only work if your encryption headers would get wiped when someone tried to modify your bootloader or UEFI settings without password or something.
But then you have to ask... Does this actually protect you from any attacks that actually could happen?
Thats an idea, but I use systemd-boot aka gummiboot and I think also with this method some part needs to be unencrypted (to decrypt), thus it is possible to inject evil maids.
Well, yeah, but a successful attack would only get one of your two passwords. The only data exposed is your encrypted boot partition.
They would have to do a second attack, spoofing your boot process, to get your other password.
And if you're using something like mkinitcpio-chkcryptoboot to verify that your system hasn't been tampered with, allowing yourself to detect the first evil maid attack, there's no chance for your data to be compromised.
They would get your first password, but between the first and second password, the (still encrypted and unmodified!) boot partition will inform you that it has been tampered with.
No, my computer is under my desk. I don't need this. It's cool though.
Ok.....
I don't bother, because I'm the only one with physical access to my machines. Excepting my cat, and I don't think she has any interest in computers.
Edit: in any case, my really important data is secured.
This is like saying "I have nothing to hide", you could also say "I have nothing to say"! See Edward Snowdens comment about this!
Not at all. He isn't saying "I don't need to hide this," he's saying "what you're suggesting is an unnecessary step in hiding this."
What's to stop someone from putting a malicious boot partition on an identical usb key as yours and swapping it out? I mean if you're worried someone will tamper with your computer to use an evil maid, can't they do the same thing with a usb stick?
You're right, but the general idea is that it's easier to reason about the physical safety of the stick than the full laptop. Swapping or tampering with your luggage on an airport is easier than doing the same with a stick kept in your pants pockets, etc.
Just for the sake of a fun thought experiment, what's to stop someone from replacing your entire laptop with a clone that sends all your keystrokes and USB data to evil.com? Maybe you'll notice after you boot up and all your files are missing, but by that point the bad guy has all your secrets, and your original laptop :)
Or they could just connect a separate hardware keylogger between your keyboard (or other inputs) and the machine. Chances are you would never notice.
Man, we really need encrypted and authenticated connections between keyboards and PCs...
I always carry it with me (it is water resistant)
I do that for my desktops. My laptops are x200s running libreboot, so grub stays on the eprom on the laptop and can keep 100% full disk encryption
Thats nice, I am going to flash coreboot on my T420 too soon!
Awesome! I haven't tried coreboot yet. Might see if any of my old laptops are supported. Really cool projects though. :)
And the EEPROMs runs any and every backdoored code anyone manages to flash onto it… I don't get it. Why do people think that "100% full disk encryption" matters, while leaving glaring holes like this?
Who knows. Just like people think bios passwords are enough. Granted, libreboot is not 100% protection. Someone can reflash it with code that stores your password. But it's the best protection I've found. There is supposedly an option to make writes to the eeprom impossible after flashing for libreboot, but I'm not sure if it just means on the fly flashing or manually flashing it.
No. I think disk encryption is reasonable if you're worried about regular theft, but I don't see the point in doing fancy things with /boot. If someone's going to go through the trouble of secretly bugging my laptop, they might as well install a hardware key logger or malicious USB firmware or whatever other terrifying thing. At the end of the day you kind of have to assume your hardware is trustworthy.
I don't think that with "regular theft" you should really worry about your data. If someone goes completly randomly for your hardware, it is for the hardware and they'll want to drop it off as soon as they can somewhere to minimize risks and maximize profits. Even turning it on without wiping it could be risky.
Thats why you check with lsusb and regulary inspect your hardware!
I have a boot password in uefi set as well as full disk encryption.
To be subject to an evil maid attack they would have to reset it and then I'd know my boot has been compromised.
I'm thinking the only way around this is if they somehow restored the password but I'm not even sure that's possible.
K, thats an argument!
Just pull a backup of the flash chip, do evil shit including resetting the password, reflash.
It could be done with a hardware programmer.
I see so it is possible then? That's actually feasible? That's what i was wondering.
I use a somewhat ghetto workaround. In fact, I've been meaning to get someone's opinion on what might possibly go horribly wrong.
Whenever there's a kernel upgrade, systemd executes a script that generates SHA512 sums of the kernel image and the initramfs. These are then stored on the encrypted partition and then compared to the actual files upon every reboot.
I figure it's better than nothing?
It is a little bit better, but not secure as you already entered the password when the checksum is generated and this check can be modified by code in the kernel...
Kernel on boot partition is compromised to maliciously take over the system as soon as you unlock the encrypted partition, preventing your checksum from ever being run.
So it's security by obscurity.
However, I guess the underlying principle still holds up if nobody is looking for specific things to block / there are multiple checks in place / I can just run the test myself in fits of extreme paranoia.
I don't consider myself important and/or deviant enough for that to matter.
I do that :D
I have a password locked Samsung 850 EVO, so yes, full disk encryption.
Edit: So, not the best option. Better than absolutely nothing though.
I would not trust a "hardware password protected SSD" which consists of closed source software.
In my situation, it's my only option. The performance & TRIM support are important to me. I suppose if I started working with more sensitive info I'd change my approach
I didn't know you could do that. Neat.
You just boot from the USB then and be sure to connect it on kernel updates ;-) and make backups xD
Can you remove the flash drive once it's booted?
Yes, add the option "noauto" to /etc/fstab and then you just boot with the flash drive attached, and when the luks prompt comes, just remove it!
No, I have nothing encrypted ( I probably should but I am too lazy)