Live data from Hacker News

3 months and 1M SSH attempts later

livesshattack.net

41–50 of 69 posts

Re: 3 months and 1M SSH attempts later

#41
post #3
post #2

If you haven't already, get fail2ban setup on the box to slow down all the attacks. And disable password login and switch to certs instead.

SSH key based auth does not use certificates. In the case of key-based-auth only, fail2ban is pointless.

fail2ban also reduces spam in your auth log and prods the bot to move along to the next target.

Re: 3 months and 1M SSH attempts later

#42

> "Hahahahahaha, a successful login" Congratulations, you just violated the computer fraud and abuse act. Also, bravo for laying out for every reader of this post where they can find the vulnerable router and the credentials they can use to join you in breaking the law. This is the exact opposite of responsible disclosure; people like the author are why we will never get a less draconian cfaa. Thanks for that.

The phrase "responsible disclosure" exists only to frame full and public disclosure as irresponsible, which it is not.

It is victim blaming to lay the tyranny of the state at the feet of those who are doing research and publishing unredacted results, even if this specific author is indeed a moron.

Re: 3 months and 1M SSH attempts later

#43
post #13

Its interesting how many HN users seem to be missing the point of a honeypot. He set this up deliberately to understand the frequency/types of attacks on a random machine on the internet. From my past experience, most of those CN computers are actually US zero day'd/patched running root kits/worms. It just happens to be that CN computers are more likely to be unpatched/running ancient software.

what is a CN computer?

Re: 3 months and 1M SSH attempts later

#44
post #5

Change the SSH port...

Please don't rely on that alone: https://blog.shodan.io/hiding-in-plain-sight/

strangely, searching Shodan for product:ssh port:443 finds nothing - when I know there are boxes around running sslh or similar to run both SSH and HTTPS on the same port. Seems like you can hide in plain sight when the scanner has no idea you're there.

Re: 3 months and 1M SSH attempts later

#45
post #34
post #2

If you haven't already, get fail2ban setup on the box to slow down all the attacks. And disable password login and switch to certs instead.

Better yet, deploy OSSEC there. I would recommend it with the latest patches from here: https://dcid.me/ossec/

It's just another thing you need running on the server that must stay patched forever.

In my opinion less is better. RSA/4096-bit key encryption only. I don't even care if you use the root user. The ability for someone to crack a 4096-bit key is impossible in practice, and if your SSH server has a bug then it doesn't matter what fancy things you have setup.

Re: 3 months and 1M SSH attempts later

#46
post #13

Its interesting how many HN users seem to be missing the point of a honeypot. He set this up deliberately to understand the frequency/types of attacks on a random machine on the internet. From my past experience, most of those CN computers are actually US zero day'd/patched running root kits/worms. It just happens to be that CN computers are more likely to be unpatched/running ancient software.

what is a CN computer?

CN = china. So, computers based in china, although I am at a loss as to what the thread parent is saying exactly about "CN computers actually being US". Same with "zero day'd/patched" — aren’t those opposite notions?

Re: 3 months and 1M SSH attempts later

#47
> He's still going at it 100,000 ssh attempts later.

I got hit with >100,000 on my main desktop a few years ago when I was procrastinating fixing my heavy-handed fail2ban config. I noticed what was happening first from the lag it was causing. It turns out >10 SSH password attempts/second can eat up a significant portion of my 3GHz "Yorkfield"[1] CPU. It wasn't hard to discover the problem: the logfile was rapidly filling with failed SSH password attempts. This is particularly useless as I have used

    PasswordAuthentication no
for many years. There is no chance that the script was going to gain access, but the system load from the rejections was terrible. So yes, I fixed fail2ban and added a few more "instant-ban" rules against anybody that tries password authentication, but the real fix that was moving sshd to a random port. Invalid SSH connection attempts dropped to approximately zero immediately. It's trivial to find with a port scan, but in practice almost nobody has even bothered.

It's probably like the old joke where two hiker see a grizzly bear and one stops to re-tie his shoes. "You can't outrun a grizzly!" "I only have to outrun you."

[1] Q9650 (E0); it still works great, even if it's starting to show its age

Re: 3 months and 1M SSH attempts later

#48

> "Hahahahahaha, a successful login" Congratulations, you just violated the computer fraud and abuse act. Also, bravo for laying out for every reader of this post where they can find the vulnerable router and the credentials they can use to join you in breaking the law. This is the exact opposite of responsible disclosure; people like the author are why we will never get a less draconian cfaa. Thanks for that.

And also, the fact that billions of people could theoretically do what this guy did, is why the cfaa etc. is stupid. If you need to keep billions from making naughty voltage patterns to their modem ... you're doomed. You're just gonna have to fix the cfaa.

Re: 3 months and 1M SSH attempts later

#49
post #3
post #2

If you haven't already, get fail2ban setup on the box to slow down all the attacks. And disable password login and switch to certs instead.

SSH key based auth does not use certificates. In the case of key-based-auth only, fail2ban is pointless.

It can quite easily protect against things other than failed ssh attempts - I used to regularly configure it to blackhole IPs failing to log in correctly to WordPress backends... Anything else the box does that uses some form of authentication that writes out failures to a log file can be hooked up to fail2ban.

Re: 3 months and 1M SSH attempts later

#50
post #46

Earlier quoted context omitted.

what is a CN computer?

CN = china. So, computers based in china, although I am at a loss as to what the thread parent is saying exactly about "CN computers actually being US". Same with "zero day'd/patched" — aren’t those opposite notions?

It's a little unclear, but if I were to guess I'd say they meant the machines are located in China but have been zero day'd, then patched and root-kitted by the attacker, who was in the US (or at least not China)
Post reply on HN