LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-05-2006, 08:02 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
Intrusion Attempts


Hi! I am currently having someone try to brute force their way into my system via ssh. I need ssh opened by default so that I can remotely manage my system when I am away. Here is an example of my secure log file. This user has been trying root logins to a-z login names.

Jan 29 07:20:47 bigblue sshd[13110]: Did not receive identification string from 219.254.35.71
Jan 29 07:32:19 bigblue sshd[13279]: Failed password for root from 219.254.35.71 port 60419 ssh2
Jan 29 07:32:23 bigblue sshd[13282]: Failed password for root from 219.254.35.71 port 60727 ssh2
Jan 29 07:32:27 bigblue sshd[13285]: Failed password for root from 219.254.35.71 port 33149 ssh2
Jan 29 07:32:32 bigblue sshd[13290]: Failed password for root from 219.254.35.71 port 33816 ssh2
Jan 29 07:32:36 bigblue sshd[13293]: Failed password for root from 219.254.35.71 port 34448 ssh2
Jan 29 07:32:40 bigblue sshd[13295]: Failed password for root from 219.254.35.71 port 35113 ssh2
Jan 29 07:32:44 bigblue sshd[13298]: Failed password for root from 219.254.35.71 port 35757 ssh2
Jan 29 07:32:49 bigblue sshd[13301]: Failed password for root from 219.254.35.71 port 36423 ssh2
Jan 29 07:32:53 bigblue sshd[13304]: Failed password for root from 219.254.35.71 port 36748 ssh2
Jan 29 07:32:57 bigblue sshd[13306]: Failed password for root from 219.254.35.71 port 37394 ssh2
Jan 29 07:33:02 bigblue sshd[13309]: Failed password for root from 219.254.35.71 port 37807 ssh2
Jan 29 07:33:06 bigblue sshd[13311]: Failed password for root from 219.254.35.71 port 38078 ssh2
Jan 29 07:33:10 bigblue sshd[13315]: Failed password for root from 219.254.35.71 port 38338 ssh2

I have prevented root login via ssh and also deleted a variety of default users from the system.
FTP users have been chrooted and have no login privileges. I have traced the IP and it appears to be from Asia somewhere specifically somewhere in Seoul Korea. I have found it that this sytem has ftp open on this users box as well. Long story short I would like to blacklist this IP from ever being able to perform brute force into my system. Is there anyway that I could accomplish this such as denying the IP.

Thanks.
 
Old 02-05-2006, 08:35 PM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
you could put an entry in the /etc/host.deny file. I've never used it but I know it's possible. If you google it a bit and search the forums I'm sure you'll find the correct format. Hope this helps
 
Old 02-05-2006, 09:06 PM   #3
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks

Thanks for hte reply, I'll give it a shot.
 
Old 02-05-2006, 09:19 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Are you using iptables for your firewall? You can block IP addresses that way. Alternatively, if you set up ssh to only allow access with keys, then it doesn't matter how many passwords they try.
 
Old 02-05-2006, 09:26 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I've long given up on trying to block those that scan my box. I use very strong passwords and only two usernames are allowed to log in (and those are somewhat obscure as well). So far, no scan has even hit my usernames. At some point, I might go to public keys, if I can find a format I can put on my thumbdrive for use with OpenSSH, PuTTY, and the commercial SSH.
 
Old 02-06-2006, 06:37 AM   #6
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks

Thanks for the tips, I'll do some more research on the SSH keys. That might do the trick. However I would just love to stop the brute forcer in his/her track when she's pounding away at my box. It would give me more satisfaction.

Thanks.
 
Old 02-06-2006, 07:00 AM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I've been using a perl program called sshblack that monitors your logs for this kind of nonsense and then modifies your iptables firewall to drop them once detected. I've got it set up so after 3 or 4 of these attempted logins, their IP address gets dropped at the firewall. It has DEFINITELY cleaned up my logs.
 
Old 02-06-2006, 01:13 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I don't remember who posted it, but have a look at http://www.hakusan.tsg.ne.jp/tjkawa/...er/index-e.jsp if you're using iptables. There's an easy way to get a shed-load of IP address ranges to block.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Intrusion Problem!! InvisibleSniper General 7 01-26-2006 09:31 AM
intrusion? tincat2 Linux - Security 2 01-01-2005 01:56 AM
Intrusion Detection L1nuxbug Linux - Security 4 07-21-2004 05:20 AM
Intrusion Detection!!! egyptian Linux - Security 2 04-02-2004 11:37 AM
Intrusion Detection? matador Linux - Security 5 09-03-2003 04:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration