by lesaker · 14y ago · 0 comments
SPA, by contrast, uses actual crypto to securely authenticate the user with the server. I'm a fan of fwknop, which uses GPG to sign a request packet which is read and understood by the server. It protects against 0 day attacks on OpenSSH, lets me drop 22 inbound to eliminate all those pesky attackers, and allows me to securely authenticate with the fwknopd.
> "Port knocking by definition is an extra layer of security through obscurity"
Security through obscurity is not security, it's at best theater.
> "It protects against 0 day attacks on OpenSSH"
You substitute one problem for another, 0 day attacks on the SPA. Your model isn't safer, it's just different.
And personally, I trust the OpenSSH guys way more then any SPA vendor simply because they have a very good track record.
Properly configured (AllowUsers, Disable root, no clear text passwords only keys etc), I'd say that the undirected bulk scans pose no security risk at all, they are only a nuisance in terms of spamming your logs, which is easy enough to deal with.
What I'm really trying to say is that each "trivial way to reduce your attack surface" has both cost and benefits.
I'm contending that moving the ssh port around gives you the benefit of less log spam with no security gain, and costs in terms of documentation and maintenance.
When I do this Cost/Benefit analysis, I conclude that moving the port around has more costs then it does benefits, so I don't bother.
A future bulk-scan may leverage a new SSH-exploit before you know it exists.
To put it explicitly: You should disable passwords and change the SSH-port. That's the two measures that make sense, to reduce surface and prevent password brute-force.
The rest of your recommendations is security theatre. An attacker dedicated enough to find your SSH-port and be set back by !AllowRoot will just brute-force an allowed username - if that's even a prerequisite for the given ssh-exploit.