Hacker News new | ask | show | jobs
by Bender 19 days ago
So if an attacker compromises your private keys, they’re already on your computer.

They could be but I would not automatically assume that. Many stealers upload keys and do not install a RAT and there is no guarantee the RAT will function even if they manage to install one. If we want to go down every what if path I could make everyone want to power off their data-center and go home. If I showed everyone what SSH can do without any RAT's many would uninstall it. Involves multiplexing and one phishing victim to bypass MFA, HSM's, vaults, bastions, and does not leave a trace by design. No need to sneak past anti-virus.

Most orgs will not buy or implement an HSM so I am offering a soft middle ground that may suffice for some and may not even remotely be an option for others. Some orgs have no choice but to buy an HSM. Been there, done that. It can be a massive daunting task depending on what checkboxes are not yet checked and what requirements B2B financial customers are demanding. One of them required 6 different colored keys that get distributed to different org leaders and have to be put in the HSM to make any changes. They put the fear of diety into everyone about losing keys. One was lost. Thats when you find out that crazy expensive device is just hype.

Oh and ask me how many HSM keys I have seen pasted into Slack.

1 comments

In security threat modeling, you only factor in things that you control when determining exploitability or risk. So for instance, when you say “a RAT might not work right” or “attackers don’t always use RATs” those aren’t things that you control, those are things that an attacker controls.

One of the principles of threat modeling is that you must assume an attacker is working actively to maximize their odds of success. Saying something like “well it would be annoying for an attacker to do this” is practically universally rejected by cybersecurity professionals especially in the age of AI agents.

I disagree that I am posing a bunch of “what-ifs”. The threat I am modeling here is how companies get compromised all of the time. Living off the land attacks as I’ve described is how companies large and small get hacked.

Furthermore, you do not need an expensive HSM. Most computers nowadays have secure enclaves (TPM) that can be used for this purpose.

Run a poll on HN some time and ask how many people are using an HSM. Out of the 17k visitors (or so on a given day) I would be surprised if it is over 500. That's ~17k not counting bots. Counting bots it's closer to 50k.

I suspect what you will find is that a majority of people are using SSH keys and a very relaxed firewall policy. A smaller number are using a bastion with some form of MFA + LDAP (if that) but it's all moot if the bastion or data-center servers allow multiplexing thus allowing log-less bypass of MFA, LDAP, HSM, etc...

A growing number are at least using a corporate VPN however more often than not those devices have a myriad of 0-days and are very poorly engineered over priced proprietary garbage full of state back-doors so at least buy the hardware made in your country so it may be your intelligence agencies that have access and a small sub-set of the MSS PRC.

Every Apple computer has a built-in hardware enclave. Just download Secretive, or you can install my macOS app, KeyMux, from the App Store, which supports SSH key agent protocol, GPG agent protocol, and PKCS#11. Or use the native command-line method discussed in the article.
That's not very economical. A YubiKey sets me back €50 (already twice as expensive as a smartcard). A MacBook Air sets me back €1299 and requires a €99 dongle for USB.
Used MacBook prices are more reasonable. But I agree, if you don’t want a Mac, you can just buy a YubiKey-ish thingy.
Exactly. Also, used and security sensitive don't play well together. If buying used is an acceptable risk, do you really need that secure enclave?
You generally don’t need to buy a dedicated HSM. TPMs are built into a lot of modern motherboards nowadays. A lot of folks are probably unaware they have access to one.