Live data from Hacker News

Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

pulsesecurity.co.nz

41–50 of 135 posts

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#41

Meh, it's an interesting exploit for sure (the USB key simulating Enter key being pressed every 15ms is cute). But IMO unless you run a very hardened setup, protecting against evil maid attacks (wherein the attacker has physical access to your machine in its entirety) is really hard, and possibly always will be. In a hardened setup you lock down the emergency initrd shell - either it's not allowed at all, or it uses…

You raise a valid point, but this attack is particularly alarming because it circumvents a TPM, which is a hardware module that was specifically designed to protect against evil-maid class of attacks, e.g. every iPhone after the 5S uses its Secure Enclave (a TPM) to enforce time delays between passcode attempts [0], so that a physical attacker can't brute force the passcode. (Incidentally, the attack described in the…

It doesn't really bypass the TPM though. These machines configure the TPM without a pin so they can boot + decrypt the drive in an unattended mode.

I'd trust this setup to prevent drives that were removed from servers from being decrypted (like for recycling), but it's basically useless against any other class of attack.

It's good to see publicized exploits of it though; that way people can link to this blog post if a pointy-haired-boss tries to misapply this class of disk encryption.

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#42
post #34

They suggest modifying the kernel commandline to disable the root fallback. Does secure boot include a hash of grub boot parameters? Couldn't the attacker just change the command line back (or to an even easier to exploit config?)

In a "properly" hardened setup, you would protect the GRUB command line with ... yet another password! :) https://help.ubuntu.com/community/Grub2/Passwords But see my sibling comment about the possibilities of trivially bypassing Secure Boot.

Grub passwords don't protect against the attack I was thinking of, since you can just pop the drive + edit the grub config:

"Errors in creating a password-protected GRUB 2 menu may result in an unbootable system. To restore a system with broken passwords, access and edit the GRUB 2 configuration files using the LiveCD or another OS."

However, it didn't occur to me that you can just press "e" at the grub prompt, then modify the command line without physical access. "Trivial" indeed.

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#43
post #37

The best hacker I know is my 12 month old. Give him any kind of device for 2 minutes and you will discover a plethora of UI issues, hidden menus, and security bypasses.

I came home one day and my cat was laying on my keyboard. Above her was a screen with a large amount of random control characters in a terminal with a kernel panic screen. So there's some series of buttons you can press that will crash a Linux desktop from a lock screen.

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#44
post #32

Earlier quoted context omitted.

The threat vector mitigated by Clevis[1] is someone with physical access (e.g. an insider) removing the server from the data center and being able to access its data. [1] https://github.com/latchset/clevis

I don't see any discussion of threat vectors on that page, but Clevis clearly fails to mitigate the threat vector you describe.

You can't read encrypted data without the key

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#45
post #26

Earlier quoted context omitted.

> I'm not sure why you would rely on just the TPM in this case, though. TPM only disk encryption is rather risky, you'd expect a TPM+PIN setup at the very least. I think the target market is "I have a server in a data centre, I need unattended boot, I don't really need a high grade of security I just need to tick a checkbox saying the hard disk is encrypted" If your organisation is large enough to start losing track…

It's not a totally meaningless check box. If the key for decrypting the disk is in the TPM, this fixes the case where the drive gets pulled and thrown in a recycle bin, then someone recovers data from it later.

Yes, when I say "small enough you can't adopt effective organisational controls" I mean organisations that are large enough that they're discarding so many disks they might accidentally forget to wipe some, and yet small enough they don't have procedures and record-keeping that prevent such accidents.

A large organisation will usually have tedious checks and record-keeping for wiping and discarding hardware, probably instituted after they wiped and discarded the wrong hardware.

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#46
post #7

Earlier quoted context omitted.

The system that should only unlock the drive after the appropriate remote command has been provided, unlocks the drive without the remote command being provided. That's the problem. I'm not sure why you would rely on just the TPM in this case, though. TPM only disk encryption is rather risky, you'd expect a TPM+PIN setup at the very least. You'd still be at risk because of this flaw, because the root shell would allo…

> I'm not sure why you would rely on just the TPM in this case, though. TPM only disk encryption is rather risky, you'd expect a TPM+PIN setup at the very least. I think the target market is "I have a server in a data centre, I need unattended boot, I don't really need a high grade of security I just need to tick a checkbox saying the hard disk is encrypted" If your organisation is large enough to start losing track…

[deleted]

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#47

Meh, it's an interesting exploit for sure (the USB key simulating Enter key being pressed every 15ms is cute). But IMO unless you run a very hardened setup, protecting against evil maid attacks (wherein the attacker has physical access to your machine in its entirety) is really hard, and possibly always will be. In a hardened setup you lock down the emergency initrd shell - either it's not allowed at all, or it uses…

You raise a valid point, but this attack is particularly alarming because it circumvents a TPM, which is a hardware module that was specifically designed to protect against evil-maid class of attacks, e.g. every iPhone after the 5S uses its Secure Enclave (a TPM) to enforce time delays between passcode attempts [0], so that a physical attacker can't brute force the passcode. (Incidentally, the attack described in the…

> this attack is particularly alarming because it circumvents a TPM,

FWIW, I think this phrasing is a little confusing. The TPM wasn't compromised at all. What happened is that the attack trips systemd into a fatal error path where it gives up and just drops the user at a root shell (!!!). From there you can simply command the TPM to do its thing and cough up the key, and it will trust you because you're the presumably-authenticated boot firmware.

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#48

Meh, it's an interesting exploit for sure (the USB key simulating Enter key being pressed every 15ms is cute). But IMO unless you run a very hardened setup, protecting against evil maid attacks (wherein the attacker has physical access to your machine in its entirety) is really hard, and possibly always will be. In a hardened setup you lock down the emergency initrd shell - either it's not allowed at all, or it uses…

>But IMO unless you run a very hardened setup, protecting against evil maid attacks (wherein the attacker has physical access to your machine in its entirety) is really hard, and possibly always will be.

Can you describe an evil maid attack on an encrypted disk that gets unlocked by the user's entering a passphrase?

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#49
post #3

Mirror [1] [1] - https://archive.ph/zr3Zf

infinite captcha loop

.ph was working for me yesterday and is working today but most of the time I'm stuck in an infinite captcha loop. I'm using Google DNS, Safari on iOS, and no extensions. I dunno. I figure Cloudflare is just broken sometimes.

Re: Mashing Enter to bypass full disk encryption with TPM, Clevis dracut and systemd

#50
post #37

The best hacker I know is my 12 month old. Give him any kind of device for 2 minutes and you will discover a plethora of UI issues, hidden menus, and security bypasses.

I came home one day and my cat was laying on my keyboard. Above her was a screen with a large amount of random control characters in a terminal with a kernel panic screen. So there's some series of buttons you can press that will crash a Linux desktop from a lock screen.

At least for my cat and sad surfacebook Windows machine, I figured it was the device literally cooking it’s ram into a bitflip that caused it to bsod. The cat loves how toasty it gets!
Post reply on HN