Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Silly Port Scans
PostPosted: Mon Mar 29, 2010 1:14 am 
Offline
Senior Newbie
User avatar

Joined: Sun Mar 28, 2010 1:16 am
Posts: 13
Wow. It took a whole day for the world to find me after I opened port 22. I always assumed VPS providers were *huge* targets for the botnet crowd, so I'm not surprised.

What does surprise me is the sheer stupidity of the probes. 349 attempts in 15 minutes from one box at Datotel, all trying to ssh root on high ports. Ha! (Yes, I shared this with the @abuse contact for Datotel.) At least the probes routed through Taiwan and the PRC tried common-user-name attacks and gave up after a dozen failures.

I'd forgotten how amusing syslog could be. :)


Top
   
 Post subject:
PostPosted: Mon Mar 29, 2010 2:16 am 
Offline
Junior Member

Joined: Mon Oct 23, 2006 12:09 am
Posts: 26
Just in case you don't know of it, fail2ban is great.


Top
   
 Post subject:
PostPosted: Mon Mar 29, 2010 3:33 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Switching the port in sshd_config to some random large number works miracles too. But yeah, fail2ban or denyhosts do their work nicely.
I'm actually considering setting up a second sshd on 22, configured to refuse and log every connection. Some providers actually react to abuse@ emails, after all...


Top
   
 Post subject:
PostPosted: Mon Mar 29, 2010 12:22 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
It's fun to tail those sometimes, because you see things like:

Quote:
Mar 27 09:06:48 xxx sshd[18874]: Failed password for harrypotter from 216.206.238.156 port 59938 ssh2

So that single administrator with 'harrypotter' on his box had better watch out.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Mon Mar 29, 2010 3:11 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Voldemort, is that you?

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Mon Mar 29, 2010 4:09 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
So "Alohomora" didn't work eh?


Top
   
 Post subject:
PostPosted: Thu Apr 01, 2010 9:02 am 
Offline
Senior Member
User avatar

Joined: Fri Aug 15, 2003 2:15 pm
Posts: 111
Website: http://fubegra.net/
Unless you have a real need for keyboard-interactive authentication, it's far better to go key-only. Good luck brute-forcing an RSA key!

On the other hand, that doesn't really help stop the logs from getting spammed with failed login attempts, so either fail2ban or a firewall rate-limiting rule for new SSH connections is still a good idea.

_________________
Bus error (passengers dumped)


Top
   
 Post subject:
PostPosted: Thu Apr 01, 2010 6:44 pm 
Offline
Senior Member

Joined: Fri Sep 21, 2007 4:12 pm
Posts: 78
rjp wrote:
Unless you have a real need for keyboard-interactive authentication, it's far better to go key-only. Good luck brute-forcing an RSA key!

On the other hand, that doesn't really help stop the logs from getting spammed with failed login attempts, so either fail2ban or a firewall rate-limiting rule for new SSH connections is still a good idea.


Most bots are smart enough to look at the authentication methods and ignore the host if it doesn't offer keyboard-interactive. Why? Because they aren't getting in, so why waste the time?

That said, the single best thing you can do is simply change the port (and add two lines to ~/.ssh/config to make it transparent).


Top
   
 Post subject:
PostPosted: Thu Apr 01, 2010 7:26 pm 
Offline
Junior Member

Joined: Mon Nov 21, 2005 4:23 pm
Posts: 46
kbrantley wrote:
That said, the single best thing you can do is simply change the port (and add two lines to ~/.ssh/config to make it transparent).


Can you tell me which lines you're talking about?


Top
   
 Post subject:
PostPosted: Thu Apr 01, 2010 8:05 pm 
Offline
Senior Member

Joined: Fri Sep 21, 2007 4:12 pm
Posts: 78
Quote:
Host mydomain.com
Port 8947


Top
   
 Post subject:
PostPosted: Thu Apr 01, 2010 8:07 pm 
Offline
Junior Member

Joined: Mon Nov 21, 2005 4:23 pm
Posts: 46
kbrantley wrote:
Quote:
Host mydomain.com
Port 8947


Ah, I see what you're saying, it's so you don't have to type the -p 8947, part.

Thanks.


Top
   
 Post subject:
PostPosted: Fri Apr 02, 2010 6:19 am 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
If you need to get out of a corporate firewall, use port 443 if it is available on your Linode. Several people at my office do this, works great.

I still see see a very few scans daily on 443, but mostly for the same users every time - root, admin and cisco.

James


Top
   
 Post subject:
PostPosted: Sat Apr 03, 2010 10:59 am 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
DenyHosts is also good, and you can get a munin graph to see how many haxxors tried and failed.


Top
   
 Post subject:
PostPosted: Sat Apr 03, 2010 2:10 pm 
Offline
Senior Member

Joined: Thu Sep 11, 2008 10:49 pm
Posts: 70
ICQ: 4155271
Website: http://mikeage.net
WLM: msn@mikeage.net
Yahoo Messenger: m_i_k_e_miller
AOL: MikeageCM
Location: Israel
zunzun wrote:
If you need to get out of a corporate firewall, use port 443 if it is available on your Linode. Several people at my office do this, works great.

I still see see a very few scans daily on 443, but mostly for the same users every time - root, admin and cisco.

James


Even if you can't use SSH over 443, you can almost definitely tunnel SSH traffic via your proxy on port 443.

If you want to also run an HTTPS server, look into sslh [http://www.rutschle.net/tech/sslh.shtml]


Top
   
 Post subject:
PostPosted: Sat Apr 03, 2010 4:00 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
mikeage wrote:
If you want to also run an HTTPS server, look into sslh [http://www.rutschle.net/tech/sslh.shtml]

Very interesting -- thanks for the tip.

_________________
/ Peter


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group