by DangerousPie · 8y ago · 0 comments
It is helpful for post-exploitation toolkits to have this functionality.
https://man.openbsd.org/ssh-agent:
> The agent will never send a private key over its request channel. Instead, operations that require a private key will be performed by the agent, and the result will be returned to the requester. This way, private keys are not exposed to clients using the agent.
This sounds like a pretty gaping security hole by Microsoft. I would not assume loading private keys to an "ssh-agent" means giving any process (browser, email client etc.) running on the same machine access to the unencrypted values!
But can't just any program do that as soon as you're logged in? (Since your login password basically unlocks the DP-API which is protected at rest.)
It doesn't.
> AFAIK the whole point of ssh-agent is that the private keys are NOT extractable by other processes.
Any process with sufficient privileges (i.e., root) can extract the private key from ssh-agent on Linux as well.
So it's not a vulnerability in the sense of an unintended exposure, but, it's certainly true that Microsoft's design gives the private key much more exposure than the design used on most Linux distros. (And it's unclear whether MS intended to deviate from this behavior.)