LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-24-2006, 03:28 AM   #1
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Rep: Reputation: 15
Does someone try to break into my system?


Hi!

Today, I looked at the output of tail -f /var/log/messages and found something very strange:

Sep 24 10:15:34 slackware sshd[3321]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:34 slackware sshd[3321]: Failed password for invalid user affiliates from 210.172.175.89 port 37251 ssh2
Sep 24 10:15:37 slackware sshd[3323]: Invalid user affiliatesale from 210.172.175.89
Sep 24 10:15:37 slackware sshd[3323]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:37 slackware sshd[3323]: Failed password for invalid user affiliatesale from 210.172.175.89 port 37336 ssh2
Sep 24 10:15:39 slackware sshd[3325]: Invalid user affiliatesuccess from 210.172.175.89
Sep 24 10:15:39 slackware sshd[3325]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:39 slackware sshd[3325]: Failed password for invalid user affiliatesuccess from 210.172.175.89 port 37415 ssh2
Sep 24 10:15:42 slackware sshd[3327]: Invalid user affiliatesupport from 210.172.175.89
Sep 24 10:15:42 slackware sshd[3327]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:42 slackware sshd[3327]: Failed password for invalid user affiliatesupport from 210.172.175.89 port 37499 ssh2
Sep 24 10:15:45 slackware sshd[3329]: Invalid user afrodita from 210.172.175.89
Sep 24 10:15:45 slackware sshd[3329]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:45 slackware sshd[3329]: Failed password for invalid user afrodita from 210.172.175.89 port 37588 ssh2
Sep 24 10:15:47 slackware sshd[3331]: Invalid user agata from 210.172.175.89
Sep 24 10:15:47 slackware sshd[3331]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:47 slackware sshd[3331]: Failed password for invalid user agata from 210.172.175.89 port 37671 ssh2
Sep 24 10:15:50 slackware sshd[3333]: Invalid user agency from 210.172.175.89
Sep 24 10:15:50 slackware sshd[3333]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:50 slackware sshd[3333]: Failed password for invalid user agency from 210.172.175.89 port 37752 ssh2
Sep 24 10:15:53 slackware sshd[3335]: Invalid user agent from 210.172.175.89
Sep 24 10:15:53 slackware sshd[3335]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:15:53 slackware sshd[3335]: Failed password for invalid user agent from 210.172.175.89 port 37835 ssh2
...
Sep 24 10:19:22 slackware sshd[3568]: Failed password for invalid user barbara from 210.172.175.89 port 44468 ssh2
Sep 24 10:19:25 slackware sshd[3570]: Invalid user barry from 210.172.175.89
Sep 24 10:19:25 slackware sshd[3570]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:19:25 slackware sshd[3570]: Failed password for invalid user barry from 210.172.175.89 port 44556 ssh2
Sep 24 10:19:27 slackware sshd[3572]: Invalid user bart from 210.172.175.89
Sep 24 10:19:27 slackware sshd[3572]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:19:27 slackware sshd[3572]: Failed password for invalid user bart from 210.172.175.89 port 44636 ssh2
Sep 24 10:19:30 slackware sshd[3574]: Invalid user baseball from 210.172.175.89
Sep 24 10:19:30 slackware sshd[3574]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:19:30 slackware sshd[3574]: Failed password for invalid user baseball from 210.172.175.89 port 44722 ssh2
Sep 24 10:19:33 slackware sshd[3576]: Invalid user beach from 210.172.175.89
Sep 24 10:19:33 slackware sshd[3576]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:19:33 slackware sshd[3576]: Failed password for invalid user beach from 210.172.175.89 port 44805 ssh2
Sep 24 10:19:35 slackware sshd[3579]: Invalid user beautiful from 210.172.175.89
Sep 24 10:19:35 slackware sshd[3579]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:19:35 slackware sshd[3579]: Failed password for invalid user beautiful from 210.172.175.89 port 44892 ssh2
Sep 24 10:19:38 slackware sshd[3581]: Invalid user beauty from 210.172.175.89
Sep 24 10:19:38 slackware sshd[3581]: Address 210.172.175.89 maps to dart.jp, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Sep 24 10:19:38 slackware sshd[3581]: Failed password for invalid user beauty from 210.172.175.89 port 44976 ssh2
...

The list goes on and on.. Every second a new "Invalid user..." message gets added.

I don't think that somebody can break into my system because I have pretty strong passwords. But I never thought something like this could happen to me. This looks like someone is trying to break into my system using an automated script, doesn't it?

I am completely new to that kind of things, so I don't know what to do about that.

This looks bad to me and I am frightened! Help would be very much appreciated!
 
Old 09-24-2006, 03:44 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
If you don't need to connect with ssh from outside, close port 22 on your firewall and you won't have this problem anymore
 
Old 09-24-2006, 04:42 AM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Alternatively, if you do need SSH access from outside, restrict port 22 to those networks that you need access from. For example, I need to connect to my machine from my uni so I allow port 22 from any computer on the uni's network, and deny everyone else.

Code:
iptables -A INPUT -p TCP -s xxx.xxx.xxx.xxx/xx --destination-port 22 -j ACCEPT
iptables -A INPUT -p TCP -s 0/0 --destination-port 22 -j DROP
Works for me, in that order. xxx.xxx.xxx.xxx/xx is the network you need to connect from.

I hope this helps
--Ian

Last edited by IBall; 09-24-2006 at 05:19 AM.
 
Old 09-24-2006, 05:01 AM   #4
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
Or if you need SSH access from random external locations, enforce a rate-limiter to only allow a new SSH connection each 30 seconds (will stop most brut-force scripts) :

Code:
iptables -A INPUT -p tcp -m state --state NEW --dport 22 -m recent --update --seconds 30 -j DROP
  iptables -A INPUT -p tcp -m state --state NEW --dport 22 -m recent --set -j ACCEPT
You could also move SSH to a random port. To be even more secure, add a script/monitoring system that automagically blocks the offending IP address after 2-3 incorrect attempts, such as DenyHosts

-Y1
 
Old 09-24-2006, 05:53 AM   #5
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
For connecting from random locations I'd strongly recommend to add (open)VPN as the security layer.
 
Old 09-24-2006, 06:57 AM   #6
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
Quote:
Originally Posted by IBall
Alternatively, if you do need SSH access from outside, restrict port 22 to those networks that you need access from. For example, I need to connect to my machine from my uni so I allow port 22 from any computer on the uni's network, and deny everyone else.

Code:
iptables -A INPUT -p TCP -s xxx.xxx.xxx.xxx/xx --destination-port 22 -j ACCEPT
iptables -A INPUT -p TCP -s 0/0 --destination-port 22 -j DROP
Works for me, in that order. xxx.xxx.xxx.xxx/xx is the network you need to connect from.

I hope this helps
--Ian
Hey Bill, question for you on that please.

Is the syntax for your xxx.xxx.xxx.xxx/xx = 192.168.100.1/255 equal all pc's on a lan?

Secondly, how does the firewall/ip-tables understand that normally the dns/server and/or computer gateway is usually 192.168.100.1 in my expample above.

Reason: many routers/firewall devices you buy at a pc store use a non-routable address of 192.168.0.1, 192.168.1.1 or 192.168.100.1 Does that rule you made account for that or is there anything else needed to be done?

TY in advance.
 
Old 09-24-2006, 08:07 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
Another alternative would be to stop using usernames and passwords for ssh authentication and move to a key based system. If you don't have the key, you don't get in. Period. There is a good how-to here.
 
Old 09-24-2006, 01:01 PM   #8
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Original Poster
Rep: Reputation: 15
Thank you for replying!

I don't need ssh at the moment so I have just removed the executable permissions from /etc/rc.d/rc.sshd. I saved this thread for later reference. I guess I will have time next week to learn iptables (never had a reason to use it, but this is a reason I guess..).

Regards,
Max.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
An RPM Script to break my system! haitham Linux - Certification 45 03-28-2006 08:57 AM
Retain Server Connection Up, If Client Break, write system call return SIGPIPE anandss2004 Programming 2 10-24-2005 12:16 AM
Is it possible to break the system password? ccalvin12 Linux - Security 7 02-22-2005 11:38 AM
Can rpm2tgz break your system? casimir Slackware 3 05-31-2004 01:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:43 PM.

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