hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : brute force UDP attack on SSH port. . possible/why?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

brute force UDP attack on SSH port. . possible/why?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-24-2007, 03:41 AM
antony7777 antony7777 is offline
Newbie
 
Join Date: Nov 2007
Posts: 10

brute force UDP attack on SSH port. . possible/why?


Hi, my server is being brute force attacked at port 22.. It caused my server to be blocked by my ISP's upstream...

at first I follow the instruction on this forum showthread.php?t=456571 (can't post link)

but then I realized (from the upstream email, I don't have access to any log on their side) that it was UDP.. not TCP.. but it was said to be brute force attack on SSH port.

Now all I do is moved ssh port.. and then limit the max connection per minute to port 22/UDP like on the above tutorial page..

Is that enough? I can't use IPTables to permit specific IPs, I'm pretty much very mobile so my own IP is different each time.

Any ideas why UDP attack?
Is it possible that brute force attack turned out to be UDP protocol? cause if it's not, then I think my ISP/its upstream can't be trusted..

Thanks for any info..
PS. sorry for bad english.. and no smilies..

Reply With Quote


Sponsored Links
  #2  
Old 11-24-2007, 03:54 AM
david510 david510 is offline
Web Hosting Master
 
Join Date: Oct 2004
Location: Kerala, India
Posts: 4,617
You can get the upd connection details to your server with the following command.

netstat -plan | grep udp

you can install firewall program APF and block the upd ports in the APF conf as follows, allowing port 53 for named, that use udp protocol.

# Common ingress (inbound) UDP ports
IG_UDP_CPORTS="53"

__________________
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
iWebManager | Access WHM from iPhone and Android

Reply With Quote
  #3  
Old 11-24-2007, 05:20 AM
CretaForce CretaForce is offline
Greece
 
Join Date: Jan 2004
Location: Greece
Posts: 2,039
UDP is used for dns, not for a ssh2 brute force attack which uses TCP connections. Why your upstream disconnect your server if it's attacked? Every linux/unix server connected to internet is attacked with ssh2 brute force attacks.

__________________


Reply With Quote
Sponsored Links
  #4  
Old 11-24-2007, 05:50 AM
antony7777 antony7777 is offline
Newbie
 
Join Date: Nov 2007
Posts: 10
Quote:
Originally Posted by CretaForce View Post
UDP is used for dns, not for a ssh2 brute force attack which uses TCP connections. Why your upstream disconnect your server if it's attacked? Every linux/unix server connected to internet is attacked with ssh2 brute force attacks.
They said that the attack flooded their network. But I don't really think an attack to my server which have small bandwidth can do that.

I'm actually a very newbie in this things, so I welcome any idea, cause I'm really confused of what to do.

Right now I'm looking into APF suggested by david510 (thanks).

Reply With Quote
  #5  
Old 11-24-2007, 08:27 AM
CretaForce CretaForce is offline
Greece
 
Join Date: Jan 2004
Location: Greece
Posts: 2,039
Filtering ssh2 brute force attacks is a good idea but it will not help. The question is why the provider disconnect your server. Are you sure they said that someone tries to brute force your server accounts, and not that your server runs the brute force program and tries to brute force other servers?

__________________


Reply With Quote
  #6  
Old 11-24-2007, 08:38 AM
antony7777 antony7777 is offline
Newbie
 
Join Date: Nov 2007
Posts: 10
Yes, I'm very sure, I'll not misunderstand it if they say my server is running the brute force progame <g>..

Also my auth.log got a lot of SSHD Failed password entries.. which I considered quite normal, and good cause that means my users' password are good.

So the provider claimed that the UDP flood caused problem in their network.. so they have to block me.. I'm asking for full report about this attack, dunno if I will get it or not.

Reply With Quote
  #7  
Old 11-24-2007, 08:45 AM
CretaForce CretaForce is offline
Greece
 
Join Date: Jan 2004
Location: Greece
Posts: 2,039
Code:
Nov 23 03:02:30 server1 sshd[79259]: Invalid user ts from 66.79.163.110
Nov 23 03:02:30 server1 sshd[79258]: Invalid user ts from 66.79.163.110
Nov 23 03:02:31 server1 sshd[79262]: Invalid user ts from 66.79.163.110
Nov 23 03:02:31 server1 sshd[79263]: Invalid user ts from 66.79.163.110
Nov 23 03:02:31 server1 sshguard[70129]: Blocking 66.79.163.110: 4 failures over 1 seconds.
Nov 23 04:02:00 server1 sshd[81567]: Invalid user staff from 216.143.153.91
Nov 23 04:02:00 server1 sshd[81568]: Invalid user staff from 216.143.153.91
Nov 23 04:02:01 server1 sshd[81574]: Invalid user sales from 216.143.153.91
Nov 23 04:02:01 server1 sshd[81573]: Invalid user sales from 216.143.153.91
Nov 23 04:02:01 server1 sshguard[70129]: Blocking 216.143.153.91: 4 failures over 1 seconds.
That is from my logs. We get daily many ssh2 attacks and we use sshguard to block them using ipfw (freebsd firewall). Before we setup sshguard we got more than 150-200 such lines daily per server.

__________________


Reply With Quote
  #8  
Old 11-24-2007, 08:57 AM
antony7777 antony7777 is offline
Newbie
 
Join Date: Nov 2007
Posts: 10
Quote:
Originally Posted by CretaForce View Post
Code:
Nov 23 03:02:30 server1 sshd[79259]: Invalid user ts from 66.79.163.110
Nov 23 03:02:30 server1 sshd[79258]: Invalid user ts from 66.79.163.110
Nov 23 03:02:31 server1 sshd[79262]: Invalid user ts from 66.79.163.110
Nov 23 03:02:31 server1 sshd[79263]: Invalid user ts from 66.79.163.110
Nov 23 03:02:31 server1 sshguard[70129]: Blocking 66.79.163.110: 4 failures over 1 seconds.
Nov 23 04:02:00 server1 sshd[81567]: Invalid user staff from 216.143.153.91
Nov 23 04:02:00 server1 sshd[81568]: Invalid user staff from 216.143.153.91
Nov 23 04:02:01 server1 sshd[81574]: Invalid user sales from 216.143.153.91
Nov 23 04:02:01 server1 sshd[81573]: Invalid user sales from 216.143.153.91
Nov 23 04:02:01 server1 sshguard[70129]: Blocking 216.143.153.91: 4 failures over 1 seconds.
That is from my logs. We get daily many ssh2 attacks and we use sshguard to block them using ipfw (freebsd firewall). Before we setup sshguard we got more than 150-200 such lines daily per server.
Yes, I got the very same entries, someone even tried for 5 hours straight.
Code:
Nov 18 23:52:15 obuku sshd[10386]: Failed password for invalid user nagios from 163.239.22.220 port 46267 ssh2
Nov 18 23:52:16 obuku sshd[10388]: Invalid user nagios from 163.239.22.220
Nov 18 23:52:16 obuku sshd[10388]: (pam_unix) check pass; user unknown
Nov 18 23:52:16 obuku sshd[10388]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=as07220.sogang.ac.kr 
Nov 18 23:52:17 obuku sshd[10389]: Invalid user jada from 89.121.210.4
Nov 18 23:52:17 obuku sshd[10389]: (pam_unix) check pass; user unknown
Nov 18 23:52:17 obuku sshd[10389]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=89.121.210.4 
Nov 18 23:52:18 obuku sshd[10388]: Failed password for invalid user nagios from 163.239.22.220 port 46624 ssh2
Nov 18 23:52:19 obuku sshd[10389]: Failed password for invalid user jada from 89.121.210.4 port 52834 ssh2
Nov 18 23:52:19 obuku sshd[10392]: Invalid user backuppc from 163.239.22.220
Nov 18 23:52:19 obuku sshd[10392]: (pam_unix) check pass; user unknown
Nov 18 23:52:19 obuku sshd[10392]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=as07220.sogang.ac.kr 
Nov 18 23:52:22 obuku sshd[10392]: Failed password for invalid user backuppc from 163.239.22.220 port 46972 ssh2
Nov 18 23:52:22 obuku sshd[10394]: Invalid user kendall from 89.121.210.4
Nov 18 23:52:22 obuku sshd[10394]: (pam_unix) check pass; user unknown
I'll install sshguard now. Ok, that's for the ssh brute force..

Is there any solution for the udp flood? I mean if the party responsible for it decides to flood me again, I'm down again. I feel so helpless.

Reply With Quote
  #9  
Old 11-24-2007, 10:15 AM
vanHelsing vanHelsing is offline
WHT Addict
 
Join Date: Apr 2004
Posts: 147

__________________
Code goes in and code comes out..

Reply With Quote
  #10  
Old 11-24-2007, 11:39 AM
chennaihomie chennaihomie is online now
The Guru!
 
Join Date: Nov 2007
Location: Chennai, India
Posts: 2,300
See this thread. http://www.webhostingtalk.com/showthread.php?t=651496
I have posted a software about security. That should really help you a lot. My friend is one of the developer. It works very well.

Reply With Quote
  #11  
Old 11-24-2007, 02:31 PM
antony7777 antony7777 is offline
Newbie
 
Join Date: Nov 2007
Posts: 10
I finally decided to install fail2ban.. since it covers more than just ssh (CMIIW)..

thanks all..

Reply With Quote
  #12  
Old 11-25-2007, 12:13 PM
vanHelsing vanHelsing is offline
WHT Addict
 
Join Date: Apr 2004
Posts: 147
Nice to hear. So tell us then how it went...

__________________
Code goes in and code comes out..

Reply With Quote
  #13  
Old 11-26-2007, 01:01 AM
antony7777 antony7777 is offline
Newbie
 
Join Date: Nov 2007
Posts: 10
Since I combined installing fail2ban with:

- changing my ssh port.
- limit connection to port 22 by 4 per minute.
- harrasing any IP I found in my auth.log to check their servers (hey.. it's also for their own good )

I haven't got a single brute force attack on mu auth.log till now.. the fail2ban.log is clean till now.

Reply With Quote
  #14  
Old 11-27-2007, 04:30 AM
rSyncTechnologies rSyncTechnologies is offline
Newbie
 
Join Date: Jul 2007
Posts: 21
Fail2ban seems better than BFD/cPanel Hulk then ?

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
6Scan Sees Surge of Malicious Attempts During WordPress Attack Web Hosting News 2013-04-18 18:36:19
Incapsula Program Helps Web Hosts Protect Against Brute Force WordPress Attacks Web Hosting News 2013-04-17 12:13:49
Noise Filter: WordPress Attacks Hammer Web Hosts Web Hosting News 2013-04-15 15:06:45
4Chan Website Back Online After Days of Sustained DDoS Attack Web Hosting News 2011-11-16 15:44:05
Hackers Crack Fox News Twitter, Post False Report of Obama's Death Web Hosting News 2011-07-05 14:08:59


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?