News for hackers. Stuff that matters.
Re:Tofu: Do You Check? by m_x on Friday September 22, 2023 @02:02PM (#37615409)
Aren't SSH host certificates the answer? Why are they not more widely used?
Re:Tofu: Do You Check? by c7DJTLrn on Friday September 22, 2023 @02:09PM (#37615506)
According to the guy who invented them: "I'm a shitty shitty publicist" (Damien Miller)
Re:Tofu: Do You Check? by fragmede on Friday September 22, 2023 @02:05PM (#37615447)
Especially since they're distributable via DNS. If your server has an entry in DNS, you shouldn't need to confirm host key.
Re:Tofu: Do You Check? by pritambaral on Saturday September 23, 2023 @06:14AM (#37621957)
If the MITM is in the client's LAN, DNS can be spoofed too. A simpler solution would be to just use SSH certs for host keys.
Re:Tofu: Do You Check? by surfer7837 on Friday September 22, 2023 @02:50PM (#37616072)
Wouldn't that require a responsible body (ie a CA) to verify who they say are. Not sure that's needed for SSH
Re:Tofu: Do You Check? by cpach on Friday September 22, 2023 @03:18PM (#37616447)
Yes, but it can be an internal CA. There are even FOSS products for that: https://goteleport.com/
Re:Tofu: Do You Check? by tetha on Friday September 22, 2023 @03:12PM (#37616364)
We've switched to them based on Hashicorp Vault and I think they are an improvement in security and convenience.

Before SSH host certificates, using tooling like ansible was seriously annoying, especially to the monthly ansible users, compared to the daily ansible users. If you tried using ansible once a month without our host key certificates, you'd have ansible barf about a dozen unknown host keys due to them being rebuilt and other things. Then you fix that, then they do that one ansible run, then it lies around for a month and back you go to square one.

I'm not sure HOW you'd stage an actual attack there, but people got used to just accept SSH host keys whatsoever, so the vulnerability was there.

Now we have host key signing based on Vault. This is a huge improvement in my book. Base infra guys know when they've reset a VM to a base image (which resets SSH host keys), so they know when to expect a TOFU request from their SSH upon first connect to the just rebuilt system, so they accept those. Afterwards, one of the first things the config management does is to sign those host keys and then the accepted host keys are usually deleted again.

There probably is a window of vulnerability in there, but that's getting pretty hard to attack and I'm sure there are easier ones in the overall infrastructure.

The main problem at this however is that you need some safe and secure place for the CA, and ideally automation to sign those host keys. And it needs to be enough of a problem to do all of that.