News for hackers. Stuff that matters.
Re:I picked up a shitty NUC from ewaste and it had a label o... by teekert on Tuesday August 20, 2024 @06:42AM (#41298723)
Every time I hook my dev NUC up to my HDMI cable and plug in a keyboard, just to decrypt the ssd en get back to working after a reboot, I will now be thinking of this story and feel better about this little nuisance. (Yeah I know there are better ways, I could ssh into the boot env with systemd, I could just encrypt the home dir, I could somehow use the TPM (but that is still pita) etc, I'll look at that the next time I set up the a dev machine...)
Re:I picked up a shitty NUC from ewaste and it had a label o... by adriancr on Tuesday August 20, 2024 @07:09AM (#41298858)
You can use "keyscript=" in "/etc/crypttab" to run any script you want.

Using that you could set up networking and download the key from somewhere (say a remote KMS that would need user approval before continuing). So you would reduce your problem to being prompted on phone to unlock your desktop.

You could even use some sort of hardware key to prove request came from the physical server. (simplest might be a RP2350 with some key burnt in)

Or you could use something like SGX if it's still available anywhere to prove the same.

Re:I picked up a shitty NUC from ewaste and it had a label o... by michaelt on Tuesday August 20, 2024 @08:28AM (#41299439)
> You can use "keyscript=" in "/etc/crypttab" to run any script you want.

...unless your distro uses systemd, which removes keyscript support [1] because the systemd guy "really dislikes generic callouts"

[1] https://github.com/systemd/systemd/pull/3007

Re:I picked up a shitty NUC from ewaste and it had a label o... by pacificenigma on Tuesday August 20, 2024 @10:01AM (#41300162)
For years I've used https://github.com/anatol/booster to unlock LUKS partitions using network bound disk encryption with https://github.com/latchset/clevis and https://github.com/latchset/tang. Works well, especially as Tang is stateless (so deployment and high availability is easy) and Booster falls back to password entry if Tang is unavailable.
Re:I picked up a shitty NUC from ewaste and it had a label o... by aflukasz on Wednesday August 21, 2024 @09:16AM (#41309984)
Thumbs up for clevis/tang, happy user here, too!

Did not hear about booster. Its README claims "Clevis style data binding. The encrypted filesystem can be bound to TPM2 chip or to a network service.". Does it mean that it tries to deliver various bindings independently from clevis pins, even when duplicating their functions?

Re:I picked up a shitty NUC from ewaste and it had a label o... by sterlind on Tuesday August 20, 2024 @08:43AM (#41299545)
you can apparently provide a Unix socket path in /etc/crypttab now, and it will connect and read the key from the socket. so you can have the same functionality, but you have to get at it a different way:

https://github.com/systemd/systemd/pull/17524

Re:I picked up a shitty NUC from ewaste and it had a label o... by adriancr on Tuesday August 20, 2024 @08:43AM (#41299550)
It's 2024 and keyscript still works fine on ubuntu
Re:I picked up a shitty NUC from ewaste and it had a label o... by aflukasz on Wednesday August 21, 2024 @09:32AM (#41310121)
I don't use this param at the moment anywhere to confirm experimentally, but I'm pretty sure it's same on Debian: https://salsa.debian.org/cryptsetup-team/cryptsetup/-/blob/7....
Re:I picked up a shitty NUC from ewaste and it had a label o... by iam-TJ on Tuesday August 20, 2024 @07:27AM (#41298965)
If you are physically present but the device is operating headless, and if using LUKS and GRUB, you can use a hardware token such as YubiKey via USB to unlock the device without needing to see the console.

I do this with a gateway/router on a PC Engines APU2 that has an internal SSD.

Just ensure GRUB includes the requisite USB modules in its core image, or use grub-mkstandalone to include all modules in core.

Re:I picked up a shitty NUC from ewaste and it had a label o... by adriancr on Tuesday August 20, 2024 @07:53AM (#41299139)
What are the benefits of encryption here?

If hardware is stolen it will have hardware key attached.

It is similar to having unencrypted ssd.

Also, someone can temporarily remove the yubikey, fetch the decryption key then place it back.

Re:I picked up a shitty NUC from ewaste and it had a label o... by rfoo on Tuesday August 20, 2024 @08:02AM (#41299213)
> hardware key attached

Key is on my keychain. not attached to the box. I don't need to unlock it remotely. I want to be there and plug my key and touch it and yank it.

> Also, someone can temporarily remove the yubikey, fetch the decryption key then place it back.

If implemented correctly. Nobody can. An encrypted LUKS key would be sent to the yubikey and have it decrypted there. Not the other way.

Re:I picked up a shitty NUC from ewaste and it had a label o... by adriancr on Tuesday August 20, 2024 @08:03AM (#41299222)
Ah, I missed that use case, nice idea
Re:I picked up a shitty NUC from ewaste and it had a label o... by tmikaeld on Tuesday August 20, 2024 @07:46AM (#41299098)
Please don't do this unless you have a backup yubikey with the same key on it..
Re:I picked up a shitty NUC from ewaste and it had a label o... by teekert on Tuesday August 20, 2024 @07:56AM (#41299168)
Or all state-full data is securely backup up of course.
Re:I picked up a shitty NUC from ewaste and it had a label o... by theshrike79 on Tuesday August 20, 2024 @08:37AM (#41299503)
The Yubikey setup program specifically tells you not to rely on a single key for anything.
Re:I picked up a shitty NUC from ewaste and it had a label o... by iam-TJ on Saturday August 24, 2024 @03:23AM (#41336294)
Even with LUKSv1 there are seven key slots. On creation generally the first will be a keyboard-entered pass-phrase, then one might add a key-file, and then add the hardware token as another.

With LUKSv2 the seven slot limit doesn't apply.

For headless GRUB is configured to the serial port for its terminal in/out so a passphrase can be typed.

Re:I picked up a shitty NUC from ewaste and it had a label o... by inductive_magic on Tuesday August 20, 2024 @06:49AM (#41298756)
YubiKey
Re:I picked up a shitty NUC from ewaste and it had a label o... by danieldk on Tuesday August 20, 2024 @06:52AM (#41298768)
Re:I picked up a shitty NUC from ewaste and it had a label o... by inductive_magic on Tuesday August 20, 2024 @06:56AM (#41298791)
Very cool, ty.
Re:I picked up a shitty NUC from ewaste and it had a label o... by teddyh on Tuesday August 20, 2024 @03:57PM (#41303466)
For unattended reboots with encrypted root disks (reboot while you sleep), use Mandos: <https://www.recompile.se/mandos>

Disclosure: I am a co-author of Mandos.