On 2006-11-04, Pythoni <(E-Mail Removed)> wrote:
> Three days ago my Linux box stopped( dark screen, no response) and I
> had to restart.
> The server was possibly hacked.
If it was hacked, you should take it off the net, wipe and reinstall
before coming back on the net.
> How can I found out the way, the hacker used against my Linux box?
First you have to determine if it actually was hacked. That's a job for
an expert.
> Today I saw( in log) again
>
> Nov 4 07:21:45 myhope sshd[24543]: Invalid user piotrs from
> 201.63.24.60
> Nov 4 07:21:45 myhope sshd[24543]: Failed password for invalid user
> piotrs from 201.63.24.60 port 46229 ssh2
> Nov 4 07:21:48 myhope sshd[24545]: reverse mapping checking
> getaddrinfo for 201-63-24-60.customer.tdatabrasil.net.br [201.63
> Nov 4 07:21:48 myhope sshd[24545]: Invalid user misiek from
> 201.63.24.60
> Nov 4 07:21:48 myhope sshd[24545]: Failed password for invalid user
> misiek from 201.63.24.60 port 46309 ssh2
> Nov 4 07:21:50 myhope sshd[24547]: reverse mapping checking
> getaddrinfo for 201-63-24-60.customer.tdatabrasil.net.br [201.63
> Nov 4 07:21:50 myhope sshd[24547]: Invalid user opel from 201.63.24.60
> Nov 4 07:21:50 myhope sshd[24547]: Failed password for invalid user
> opel from 201.63.24.60 port 46392 ssh2
> Nov 4 07:21:59 myhope sshd[24549]: reverse mapping checking
> getaddrinfo for 201-63-24-60.customer.tdatabrasil.net.br [201.63
> Nov 4 07:21:59 myhope sshd[24549]: Invalid user pablo from
> 201.63.24.60
> Nov 4 07:21:59 myhope sshd[24549]: Failed password for invalid user
> pablo from 201.63.24.60 port 46468 ssh2
> Nov 4 07:22:01 myhope sshd[24551]: reverse mapping checking
> getaddrinfo for 201-63-24-60.customer.tdatabrasil.net.br [201.63
> ...
> ....
> ...
>
> How shall I stop hackers attemps?
These are scripted attacks looking for weak passwords. You'll get
hundreds of them daily. You have to make sure your system is secure.
Disable any services you don't actually use or need, e.g. telnet, ftp,
apache, etc. Configure the services you do need to only accept
connections from trusted users and/or addresses. Many programs can use
tcp_wrappers, which allows inetd or xinetd to limit connections to
user-defined patterns. Sshd can be configured to only allow access by
certain users -- read "man sshd_config" and at a minimum deny root
logins over ssh. This will force attackers to guess two passwords
instead of only one and will make exploit attempts more obvious. Use a
script like "breakinguard" (
http://breakinguard.sourceforge.net/) to
temporarily block connection attampts after a number of failed attempts.
--
John ((E-Mail Removed))