by raggi · 1y ago · 0 comments
I wish people would stop trying to use SSH for things like this. PKI has features that are missing here and those features matter.
This is unsafe.
"but raggi, mitm before tofu is a really unrealistic scenario"
ok, well, consider that some large percentage of gas stations in the US have hardware installed to skim your credit cards. those same folks are perfectly well motivated to drop a wifi dns mitm in conference buildings (trivial). new tech conference, handful of credit cards as people gossip about exactly these kinds of things in the hallway track. the roi on these installs would be pretty high, because tech folks tend to have a high credit balance. so yeah, "totally unrealistic" (this is more about terminal.shop, but same principle here as soon as someone uses it for actual value).
- SSHFP: SSH FingerPrint record in the domain name system (https://en.m.wikipedia.org/wiki/SSHFP_record)
- MITM: Man in the middle (https://en.m.wikipedia.org/wiki/Man-in-the-middle_attack)
- SSH: Secure SHell (https://en.wikipedia.org/wiki/Secure_Shell)
- PKI: Public Key Infrastructure (https://en.wikipedia.org/wiki/Public_key_infrastructure)
- US: United States (https://en.wikipedia.org/wiki/United_States)
In addition to this a further scan of the code reveals it’s also using a btree index lookup for code comparison and no limitation on attempts, so it is likely that this is relatively trivial to attack with timing as well.
Trivialize mitm all you want, you say concerns of mitm are hyperbolic, I gave a practical example of a target rich environment and there are plenty more folks could come up with. SSH may have long been skirting the lack of a better host key distribution system, but this is largely a matter of luck, access and bespoke usage. These new deployments demonstrate a change on two of these factors, increasing risk substantially if this grows.
User friendly and secure-by-default clients will leverage the domain HTTPS CA to solve this (fetching the server key using https). The downside is that it will require d/l and install