cd ..

Hardened Linux laptop

My personal laptop: full-disk encryption unlocked by TPM, Secure Boot with my own keys, and USB device control.

LUKSTPM2systemd-cryptenrollSecure Bootsbctlusbguard

Context

My personal laptop goes everywhere with me. I wanted it to hold up if it’s lost or stolen, if someone tampers with how it boots, or if someone plugs in an unknown USB device.

What I did

  • LUKS full-disk encryption, with the key sealed to the TPM using systemd-cryptenroll. It unlocks automatically, but only if the boot chain is untouched.
  • Secure Boot with my own keys, created, enrolled and used for signing with sbctl.
  • usbguard: the policy is generated from my own devices, then locked to default-deny.

Outcome

  • If the laptop is lost or stolen, the disk can’t be read by pulling it or booting something else, and the boot chain can’t be swapped.