Ataques al Servidor SSH, Apache, LAMP

28 02 2011

Bueno, tengo un servidor en casa.. si, varios lo tienen, ya sea para descargar musica, peliculas, como media center.. Otros lo tenemos para hacer pruebas para el trabajo y aprender.

Y hoy, me encontre con algo para aprender, me encontre que en mi servidor tengo multiples ataques de algun botnet, tratando de entrar a mi servidor de forma remota. Y para conocimiento de todos (aunque no sean miles los que leen.. ) para dejar en evidencia a quienes fueron.

Claro que casi no tiene sentido, ya que uno de los servidores es chino.. suerte con eso :S, pero el otro es Argentino.. por lo que si se podria llegar a hacer algo..

Como saber si estan en ataque (sin tener snort instalado u algun otro sistema de alarmas) ? Tienen que revisar el archivo /var/log/auth.log y si tienen multiples intentos infructuosos de registrarse, en general con muchos nombres de usuario que no tenemos o que erraron la contrasena… algo asi:

Feb 28 10:57:36 xxxxxxxx sshd[29649]: Invalid user testi from 200.69.209.97

Feb 28 10:57:36 xxxxxxxx sshd[29650]: Invalid user oracle from 200.69.209.97

Feb 28 10:57:36 xxxxxxxx sshd[29653]: Invalid user testmail from 200.69.209.97

Feb 28 10:57:36 xxxxxxxx sshd[29654]: Invalid user oracle from 200.69.209.97

Feb 28 10:57:37 xxxxxxxx sshd[29657]: Invalid user testmail from 200.69.209.97

Feb 28 10:57:37 xxxxxxxx sshd[29659]: Invalid user oracle from 200.69.209.97

Feb 28 10:57:37 xxxxxxxx sshd[29661]: Invalid user oracle from 200.69.209.97

Feb 28 10:57:41 xxxxxxxx sshd[29663]: Invalid user teamspeak3 from 200.69.209.97

Feb 28 10:57:41 xxxxxxxx sshd[29665]: Invalid user teamsserver from 200.69.209.97

Asi que como veran los dos sistemas que me atacaron, al menos hoy son:

$whois 200.69.209.97

% Joint Whois – whois.lacnic.net

%  This server accepts single ASN, IPv4 or IPv6 queries

% LACNIC resource: whois.lacnic.net% Copyright LACNIC lacnic.net

%  The data below is provided for information purposes

%  and to assist persons in obtaining information about or

%  related to AS and IP numbers registrations

%  By submitting a whois query, you agree to use this data

%  only for lawful purposes.

%  2011-02-28 14:14:38 (BRT -03:00)

inetnum:     200.69.192/18

status:      allocated

owner:       NSS S.A.

ownerid:     AR-NSSA-LACNIC

responsible: Administrador de Ips

address:     Reconquista, 865, 2

address:     C1003ABQ – Buenos Aires – CF

country:     ARphone:       +54 11 50316400 [6420]

owner-c:     MAC2

tech-c:      MAC2

abuse-c:     MAC2

inetrev:     200.69.192/19

nserver:     DNS1.IPLANISP.COM.AR

nsstat:      20110226 AA

nslastaa:    20110226

nserver:     DNS2.IPLANISP.COM.AR  [lame – not published]

nsstat:      20110226 FAIL

nslastaa:    20061101

remarks:     ADDRESSES WITHIN THIS BLOCK ARE NON-PORTABLE

created:     20010608

changed:     20020513

nic-hdl:     MAC2

person:      Administrador de Ipse-

mail:      abuse@IPLAN.COM.ARaddress:     Reconquista, 865,

address:     1003 – Buenos Aires –

country:     AR

phone:       +54 11 50320000 []

created:     20021226

changed:     20080327

 

Y el otro es el servidor :

$ whois 218.30.15.215% [whois.apnic.net node-3]% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html
inetnum:        218.30.0.0 – 218.30.19.255netname:        CHINANET-BB-IDCdescr:          CHINANET backbone networkdescr:          Data Communication Divisiondescr:          China Telecomcountry:        CNadmin-c:        CH93-APtech-c:         CH93-APmnt-by:         MAINT-CHINANETchanged:        hostmaster@ns.chinanet.cn.net 20020221status:         ALLOCATED NON-PORTABLEsource:         APNIC
person:         Chinanet Hostmasternic-hdl:        CH93-APe-mail:         anti-spam@ns.chinanet.cn.netaddress:        No.31 ,jingrong street,beijingaddress:        100032phone:          +86-10-58501724fax-no:         +86-10-58501724country:        CNchanged:        dingsy@cndata.com 20070416mnt-by:         MAINT-CHINANETsource:         APNIC

HDP… veremos que se puede hacer..