News for hackers. Stuff that matters.
Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by g1a55er on Friday September 15, 2023 @06:56PM (#37530077)
Good find! I was always curious how this worked.

I'm a big fan of tools like secretive[1] that can help solve this problem by using biometrics to shift the UX/security trade-off and thus make it feasible to always require some kind of authentication to sign a token with a key.

I'm not aware of any tools that do the same for Linux, and a quick Google search doesn't turn up much[2]. It does look like you can at least get a notification[3], though.

This could provide another layer of protection on the user's endpoint device in addition the network monitoring called out in the article. Defense in depth, and all that.

[1] https://github.com/maxgoedjen/secretive

[2] https://unix.stackexchange.com/questions/705144/unlock-an-ss...

[3] https://www.insecure.ws/2013/09/25/ssh-agent-notification.ht...

Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by boneitis on Friday September 15, 2023 @07:37PM (#37530377)
+1 Great find.

I don't know what use-case necessitated including `-A` in one of my aliases (realistically, probably ignorance); given all the other painstaking measures I take, I don't need it at all.

I'd like to not further incriminate myself w.r.t. the gory details of my rookie mistakes and will just end on an expression of gratitude for seeing this make the front page.

Thanks to the submitter and author.

Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by rakkhi on Friday September 15, 2023 @07:34PM (#37530359)
Just don't use SSH keys at all. Anywhere.

https://substack.com/@rakkhi/note/c-40163543?r=1afqp

Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by johnklos on Friday September 15, 2023 @10:05PM (#37531313)
That's shortsighted. Why not go all the way and just stop using computers altogether?
Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by lxgr on Friday September 15, 2023 @10:33PM (#37531481)
Huh? So what should we use to e.g. SSH to a server to debug a crashed or hanging process, login to a dev instance etc.?

SSH keys are also not “just long passwords” at all.

Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by cortesoft on Friday September 15, 2023 @11:47PM (#37531880)
Not using SSH to configure a machine is smart, but saying no SSH at all is not feasible for many things. When something goes wrong, you need to be able to connect to a running machine and poke around, and you don’t know how you will need to poke until you are doing it.
Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by gruturo on Saturday September 16, 2023 @06:27AM (#37533573)
The statement "SSH keys are just long passwords" in your linked post is a huge red flag that you don't understand enough about how they work and are in no position to dispense advice (that anyone sane should heed) on the subject.

To start (but it would be a longer discussion), passwords can be captured as you type them into a compromised host, SSH keys can't. Also SSH keys can reside on a security device (TPM, smartcard, HSM, security token, whatever) and this way they can _never_ be captured, barring exploits on those hardware devices, even if your workstation is compromised. Some hardware security devices have features like touch-to-authorize, or even biometrics, for every single usage. SSH keys can be _used_ while unlocked, but not from a compromised remote site (unless you do agent forwarding, which this article is all about), and never captured from there. Passwords have literally _none_ of the above features.

Forwarding usually bad. SSH Keys otherwise good. Passwords so bad they're not worth comparing to anything.

(and yeah, there's stuff even better than SSH keys)

Re:Zero Effort Private Key Compromise: Abusing SSH-Agent for... by lxgr on Friday September 15, 2023 @10:38PM (#37531511)
Agent confirmations don’t need local authentication really; local confirmation is what’s important here.