Skip to content

/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

26 points106 comments
Open on Reddit
About this post
Posted
Archived
Score
26 · 100% up
Kind
Text
ID
4cppim

Author

9
posts
132
comments
5
media
View profile

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.

28 points

literally indistinguishable from random noise

...assuming you used properly implemented crypto :)

2 points

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.

2 points

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.

9 points

That's what Secure Boot – with signing keys you generated yourself – is for.

13 points

And what if you do not want to use / do not have UEFI?

2 points

Sucks with dual boot though.

Way I have it is using default secure boot for Windows, and grub + LUKS for Linux.

1 points

And this way you have to know and to have something.

0 points

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.

6 points

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.

12 points
13 points

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)

2 points

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.

8 points

That's still not full disk encryption. GRUB itself is fully decrypted and can be pwned just as easily as before.

2 points

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?

2 points

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.

1 points

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.

2 points

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.

6 points

This is like saying "I have nothing to hide", you could also say "I have nothing to say"! See Edward Snowdens comment about this!

-7 points

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."

7 points

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?

3 points

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.

3 points

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 :)

4 points

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...

3 points

I always carry it with me (it is water resistant)

1 points

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

2 points

Thats nice, I am going to flash coreboot on my T420 too soon!

2 points

Awesome! I haven't tried coreboot yet. Might see if any of my old laptops are supported. Really cool projects though. :)

2 points

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?

2 points

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.

2 points

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.

2 points

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.

1 points

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.

2 points

Just pull a backup of the flash chip, do evil shit including resetting the password, reflash.

It could be done with a hardware programmer.

1 points

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?

2 points

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...

1 points

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.

0 points

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.

3 points

I don't consider myself important and/or deviant enough for that to matter.

2 points

I have a password locked Samsung 850 EVO, so yes, full disk encryption.

Edit: So, not the best option. Better than absolutely nothing though.

1 points

I would not trust a "hardware password protected SSD" which consists of closed source software.

6 points

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

2 points

I didn't know you could do that. Neat.

1 points

You just boot from the USB then and be sure to connect it on kernel updates ;-) and make backups xD

1 points

Can you remove the flash drive once it's booted?

1 points

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!

2 points

No, I have nothing encrypted ( I probably should but I am too lazy)

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.