News for hackers. Stuff that matters.
Re:You can't afford to keep your SSH keys on disk by handplane on Monday November 23, 2026 @10:55AM (#50613931)
While in theory, this adds at least some small layer of protection, I have doubts that it adds anything meaningful to stop a smart attacker.

The problem here is that everything is running as your user, so it's all the same security sphere.

You may be thinking, "But Bitwarden requires me to approve each key request". Problem is that if the attacker is already running as your user, which I'm assuming here because to steal your bare keys, they'd already need to be. This means they can also hit the approve button for you.

Ok, now you say "But it requires touchID!". Maybe that gets you just a little bit of protection, but...

The next idea is to just steal the decrypted key out of RAM. This requires a little bit of effort, because you generally can't attach to a sibling process without root on Linux with default configs. This will only delay things slightly. Attaching to your child is allowed, so all an attacker needs to do is replace your launch shortcut/service for Bitwarden with a thin wrapper that makes the attacker the parent process, and then they can just ptrace it and steal the decrypted key next startup. On Mac, where the ptrace path isn't viable due to disallowing ptrace of signed binaries by default, you could just replicate the Bitwarden GUI as a wrapper and steal the master password at startup.

If you really want to protect your keys from attacks like this, you need a real hardware device with OOB signaling.

Re:You can't afford to keep your SSH keys on disk by stryan on Monday November 23, 2026 @11:13AM (#50614250)
I'm all aboard the Yubikey train[0] for securing SSH keys, but I'd imagine most SSH keys aren't being exfiltrated by smart attackers putting in the work to steal decrypted keys from RAM. Most SSH keys are being exfiltrated by scripts being run via curl | bash (or agents...) that quickly gather up every potentially useful user file they can find and upload it to a remote endpoint somewhere.

[0] I also use an SSH key in Bitwarden for lower priority concerns, but my main SSH keys that get automatically installed on remote systems and used for signing commits are stored via FIDO on Yubis.

Re:You can't afford to keep your SSH keys on disk by lokar on Monday November 23, 2026 @11:19AM (#50614376)
You could also setup the yubikey as a CA to sign short lived ssh keys.
Re:You can't afford to keep your SSH keys on disk by what on Monday November 23, 2026 @11:55AM (#50615071)
What benefit does this provide over just having the ssh key on the yubikey?

Also, pretty sure you can’t use the CA for GitHub without enterprise.

Re:You can't afford to keep your SSH keys on disk by lokar on Monday November 23, 2026 @12:51PM (#50616051)
More niche situations where you can't use the agent. You need to use it from somewhere you can't forward the agent, or you need to make too many calls (eg ssh to 10,000 machines).
Re:You can't afford to keep your SSH keys on disk by medina on Monday November 23, 2026 @03:29PM (#50618769)
The key can be ephemeral.
Re:You can't afford to keep your SSH keys on disk by Aurornis on Monday November 23, 2026 @11:15AM (#50614293)
> While in theory, this adds at least some small layer of protection, I have doubts that it adds anything meaningful to stop a smart attacker.

You’re not wrong, but for most of us the threat of a simple credential stealer is a million times more likely than being targeted by a dedicated, intelligent hacker.

In the most common compromise scenario, the attack comes along with some widely distributed software and is going for quantity of keys compromised via automated scripts, not precision extraction of one person’s keys through interactive exploration of their computer.

Adjust your security model if you’re in an important position at a big company or some other high value target.

For most of us, though, anything that defeats a common credential stealer is highly valuable.

Re:You can't afford to keep your SSH keys on disk by macNchz on Monday November 23, 2026 @11:17AM (#50614345)
A lot of your caveats here assume some level of sophisticated attacker that has persistent access to the machine and is motivated to investigate when something doesn't work, rather than the extremely common case of a smash-and-grab credential stealer script that quickly scans through the system and tries to grab anything it can before being removed.

Even things that will not stand up to a motivated attacker still add value towards reducing the likelihood of a breach, by increasing friction for attackers that are simply grabbing at low-hanging fruit. A setup with a bit more friction is a locked door in a long hallway of unlocked doors. Yeah someone can get through it, but it's not going to be their highest priority. This is the case for almost anything security related: layers of imperfect protection are good in combination.

Re:You can't afford to keep your SSH keys on disk by handplane on Monday November 23, 2026 @11:22AM (#50614435)
I agree 100% here, and I had this argument running through my head as I wrote this comment. The problem is I think these assumptions only hold up for a very short time in today's world. Even unsophisticated attackers will have access to the sorts of methods involved here soon, if they don't already. I'm not up to date on the latest malware practices, but I would be surprised if they weren't already targeting popular credential managers like Bitwarden.
Re:You can't afford to keep your SSH keys on disk by timcobb on Monday November 23, 2026 @11:55AM (#50615067)
What is the intersection of unsophisticated attacker and enabling tools? That is, what is today's script kiddie? Is there a community around abliterated models that people run to h4ck?
Re:You can't afford to keep your SSH keys on disk by handplane on Monday November 23, 2026 @12:39PM (#50615844)
While I have no direct knowledge here, surely there must be. It takes approximately 20 min or less to set up a very capable ablated model on a local consumer-gaming-class GPU. It's not frontier levels right now, but it's still very capable, and with the pace things are going, current frontier power will probably be available in no more than 1-2 years locally.
Re:You can't afford to keep your SSH keys on disk by esseph on Monday November 23, 2026 @01:59PM (#50617183)
[delayed]
Re:You can't afford to keep your SSH keys on disk by dns_snek on Monday November 23, 2026 @02:07PM (#50617308)
[delayed]
Re:You can't afford to keep your SSH keys on disk by breakwaterlabs on Monday November 23, 2026 @12:20PM (#50615535)
Just to note, it is not a given that "running as same user" implies "has control over all other user processes". Wayland for instance (famously) blocks that kind of attack.

It is certainly possible to enable authentication methods whereby two processes at the same privilege level cannot grab each other's secrets or tokens. Credential guard is one example, I am sure there are analogous implementations on Linux but I believe namespacing and SELinux attack this from different angles.

    The next idea is to just steal the decrypted key out of RAM.
It is also not a given that a userland process can do this.
Re:You can't afford to keep your SSH keys on disk by handplane on Monday November 23, 2026 @01:08PM (#50616326)
All of this is true, but would you notice if a malware swapped in a shim into the place where your Bitwarden startup is (user systemd, WM startup, etc), and all that shim did was spawn Bitwarden as a child process? You can generally ptrace a child process.
Re:You can't afford to keep your SSH keys on disk by breakwaterlabs on Monday November 23, 2026 @02:30PM (#50617745)
This is a strong argument for doing software installations using superuser privileges and denying exec from user-writable locations.

Which is, in fact a relatively common posture.

Re:You can't afford to keep your SSH keys on disk by D13Fd on Monday November 23, 2026 @02:20PM (#50617542)
It's defense-in-depth. Each hurdle you make an attacker jump over can filter some types of attackers. Yes, some might still get through, but that doesn't make it valueless.

> This means they can also hit the approve button for you. . . . Ok, now you say "But it requires touchID!". Maybe that gets you just a little bit of protection, but...

That's a pretty big leap. Systems like Mac OS are designed so that other apps can't easily click that Touch ID button for you. The vast majority of attackers are going to be filtered at this step. Beyond that, anything that "clicks that button for you" could only work when you're logged in - another hurdle - and will probably result in some visible screen activity even if it's "clicked" quickly.

When compared to simple plaintext SSH keys stored on disk, it's a night and day difference.

This is like saying "sure, you could wear a seatbelt, but it's not going to do anything for you if you drive your car off a cliff, so why wear it at all?"

Re:You can't afford to keep your SSH keys on disk by bigbuppo on Monday November 23, 2026 @03:25PM (#50618715)
Besides, we know the best place to attack all this is the cloud-hosted MFA solution that can bypass all this authentication nonsense.
Re:You can't afford to keep your SSH keys on disk by tylergetsay on Monday November 23, 2026 @03:10PM (#50618438)
This is what the TPM was made for
Re:You can't afford to keep your SSH keys on disk by ozim on Monday November 23, 2026 @03:37PM (#50618897)
Tell that to software devs that were hit by Sha1-Hulud and other stealers. They were taking all .ssh when you did ‘npm install’ and you might not knew what happened and they were now able to access all your boxes.

Supply chain risks are big nowadays.

That part of Touch ID would stop them.

Re:You can't afford to keep your SSH keys on disk by keyle on Monday November 23, 2026 @03:57PM (#50619158)
Most people getting their credential stolen is purely through env or .config. They have their keys either as env variables for any shell sessions of theirs to read or just grepping through .config does the trick.

I moved all my security keys to keychains and use basic shell scripts to auth on every use. That helps a lot. On Linux this password protection can be different for every key.

I will consider what you wrote about regarding ssh keys, but what do you mean about "real hardware with OOB signaling"? <insert meme about rooted crypto wallet hardware>

Re:You can't afford to keep your SSH keys on disk by antihero on Monday November 23, 2026 @04:02PM (#50619220)
What about storing it in Secure Enclave? Is this not what 1password etc do?
Re:You can't afford to keep your SSH keys on disk by AceJohnny2 on Monday November 23, 2026 @04:29PM (#50619606)
> The problem here is that everything is running as your user, so it's all the same security sphere.

see also https://m.xkcd.com/1200/ (2013)