Attacco a GoDaddy.com: alcune precisazioni

Ok, in questo post vi avevo parlato di un attacco che molto probabilmente coinvolgeva i siti hostati su GoDaddy. In realtà, però, ultimanente è cresciuto a dismisura il numero di Web Hosting violati, ergo parlare solo di GoDaddy sarebbe estremamente riduttivo.

 

cracker2.jpg

Mi spiego meglio: sia sul mio server FTP (casalingo) che su 2 server hostati su 2 differenti farm si sono verificati tentativi di accesso usando credenziali FTP lecite. Ciò significa che in circolazione è presente un malware che riesce ad intercettare il contenuto delle email ed a ricavare le credenziali dei server FTP scambiate attraverso il suddetto canale di comunicazione (che di per sè è poco sicuro).

Per quanto mi riguarda, sul mio server ho provveduto a rimuovere completamente gli account relativi agli utenti le cui credenziali sono state violate, in un altro caso ho provveduto a monitorare gli accessi FTP mediante i file di log, arrivando sempre e comunque alla stessa conclusione, ovvero che alcuni cracker sono riusciti ad individuare le giuste credenziali per eccedere ai server.

Inoltre, entrambe le pagine dei server Web su hosting provider presentavano del codice javascrip creato ad-hoc, ovvero:

http://fossfotography.com/wp-content/uploads/process.js

In realtà, però, se puntiamo alla directory uploads, il risultato è il seguente:

nightfly@nightbox:~$ wget http://fossfotography.com/wp-content/uploads/
--2012-07-25 11:10:24--  http://fossfotography.com/wp-content/uploads/
Resolving fossfotography.com... 173.201.146.128

Connecting to fossfotography.com|173.201.146.128|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://fossfotography.com/var/chroot/home/content/90/5954490/html/wp-content/htttp://reltime2012.ru/frunleh?9 [following]
--2012-07-25 11:10:25--  http://fossfotography.com/var/chroot/home/content/90/5954490/html/wp-content/htttp://reltime2012.ru/frunleh?9
Reusing existing connection to fossfotography.com:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://fossfotography.com/htttp://reltime2012.ru/frunleh?9 [following]
--2012-07-25 11:10:25--  http://fossfotography.com/htttp://reltime2012.ru/frunleh?9
Reusing existing connection to fossfotography.com:80.

ovvero avviene un redirect sulla URL htttp://reltime2012.ru/frunleh?9

No, non è un errore di battitura, è proprio htttp e non http.

A questo punto ho deciso di lanciare un wget su http://reltime2012.ru/frunleh?9

ed il risultato è stato questo:

nightfly@nightbox:~$ wget http://reltime2012.ru/frunleh?9
--2012-07-25 11:11:28--  http://reltime2012.ru/frunleh?9
Resolving reltime2012.ru... 67.215.65.132
Connecting to reltime2012.ru|67.215.65.132|:80... connected.
HTTP request sent, awaiting response... 303 See Other
Location: http://guidetest.a.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9 [following]
--2012-07-25 11:11:28--  http://guidetest.a.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9
Resolving guidetest.a.id.opendns.com... 67.215.67.10
Connecting to guidetest.a.id.opendns.com|67.215.67.10|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://w10.guidetest.b.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9 [following]
--2012-07-25 11:11:29--  http://w10.guidetest.b.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9
Resolving w10.guidetest.b.id.opendns.com... 67.215.67.10
Connecting to w10.guidetest.b.id.opendns.com|67.215.67.10|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://w10.w10.guidetest.c.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9 [following]
--2012-07-25 11:11:29--  http://w10.w10.guidetest.c.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9
Resolving w10.w10.guidetest.c.id.opendns.com... 67.215.67.10
Connecting to w10.w10.guidetest.c.id.opendns.com|67.215.67.10|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://w10.w10.w10.guidetest.d.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9 [following]
--2012-07-25 11:11:30--  http://w10.w10.w10.guidetest.d.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9
Resolving w10.w10.w10.guidetest.d.id.opendns.com... 67.215.67.10
Connecting to w10.w10.w10.guidetest.d.id.opendns.com|67.215.67.10|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://w10.w10.w10.w10.guidetest.e.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9 [following]
--2012-07-25 11:11:30--  http://w10.w10.w10.w10.guidetest.e.id.opendns.com/?url=reltime2012%2Eru%2Ffrunleh%3F9
Resolving w10.w10.w10.w10.guidetest.e.id.opendns.com... 67.215.67.10
Connecting to w10.w10.w10.w10.guidetest.e.id.opendns.com|67.215.67.10|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.website-unavailable.com/?wc=EWJpExd9AQVABBJuAQ8=&url=reltime2012%2Eru%2Ffrunleh%3F9 [following]
--2012-07-25 11:11:31--  http://www.website-unavailable.com/?wc=EWJpExd9AQVABBJuAQ8=&url=reltime2012%2Eru%2Ffrunleh%3F9
Resolving www.website-unavailable.com... 208.69.33.136
Connecting to www.website-unavailable.com|208.69.33.136|:80... connected.
HTTP request sent, awaiting response... 200 OK
Cookie coming from www.website-unavailable.com attempted to set domain to www.website-unavailable.com
Length: 3877 (3.8K) [text/html]
Saving to: `frunleh?9'

Dall’output si evince che la URL non è più raggiungibile (non esiste alcuna entry DNS).

Successivamente un whois riportava le seguenti info:

nightfly@nightbox:~$ whois  reltime2012.ru
% By submitting a query to RIPN's Whois Service
% you agree to abide by the following terms of use:
% http://www.ripn.net/about/servpol.html#3.2 (in Russian)
% http://www.ripn.net/about/en/servpol.html#3.2 (in English).

domain:        RELTIME2012.RU
nserver:       ns1.reg.ru.
nserver:       ns2.reg.ru.
state:         REGISTERED, NOT DELEGATED, VERIFIED
person:        Private Person
registrar:     REGRU-REG-RIPN
admin-contact: http://www.reg.ru/whois/admin_contact
created:       2012.07.03
paid-till:     2013.07.03
free-date:     2013.08.03
source:        TCI

Last updated on 2012.07.25 14:00:46 MSK

Gli NS del registrar sono ns1.reg.ru ed ns2.reg.ru. Vediamo se una query con dig riesce a darmi qualche indirizzo IP utile associato a quell’FQDN (alias record A):

nightfly@nightbox:~$ dig @ns1.reg.ru  reltime2012.ru

; <<>> DiG 9.7.0-P1 <<>> @ns1.reg.ru reltime2012.ru
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37008
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;reltime2012.ru.                        IN      A

;; AUTHORITY SECTION:
reltime2012.ru.         43200   IN      SOA     ns1.reg.ru. hostmaster.ns1.reg.ru. 1341617290 14400 3600 604800 21600

;; Query time: 161 msec
;; SERVER: 31.31.204.37#53(31.31.204.37)
;; WHEN: Wed Jul 25 12:13:24 2012
;; MSG SIZE  rcvd: 87

nightfly@nightbox:~$ dig @ns2.reg.ru  reltime2012.ru

; <<>> DiG 9.7.0-P1 <<>> @ns2.reg.ru reltime2012.ru
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36077
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;reltime2012.ru.                        IN      A

;; AUTHORITY SECTION:
reltime2012.ru.         43200   IN      SOA     ns1.reg.ru. hostmaster.ns1.reg.ru. 1341617290 14400 3600 604800 21600

;; Query time: 122 msec
;; SERVER: 31.31.204.25#53(31.31.204.25)
;; WHEN: Wed Jul 25 12:15:11 2012
;; MSG SIZE  rcvd: 87

Niente da fare, non riesco ad ottenere alcun indirizzo IP associato al suddetto FQDN.

Però, mi lascia riflettere la seguente stringa:

;; WARNING: recursion requested but not available

Ciò significa che i suddetti NS funzionano in modalità ricorsiva, ovvero sono a conoscenza degli NS autoritativi per quel particolare dominio, ma non sono autorizzati ad effettuare la suddetta richiesta.

Infine, mi son giocato la carta dei trasferimenti di zona forzosi, ma anche questo tentativo non è andato a buon fine:

nightfly@nightbox:~$ dig @ns2.reg.ru reg.ru axfr

; <<>> DiG 9.7.0-P1 <<>> @ns2.reg.ru reg.ru axfr
; (2 servers found)
;; global options: +cmd
; Transfer failed.
nightfly@nightbox:~$ dig @ns1.reg.ru reg.ru axfr

; <<>> DiG 9.7.0-P1 <<>> @ns1.reg.ru reg.ru axfr
; (2 servers found)
;; global options: +cmd
; Transfer failed.

Per la serie “i russi non si smentiscono mai”…

Attacco a GoDaddy.com: alcune precisazioniultima modifica: 2012-07-25T14:10:00+02:00da nazarenolatella
Reposta per primo quest’articolo