Zone Transfer AXFR con DiG

Interrogare i server dns in fase di PT (o VA) è un’operazione fondamentale, per questo tempo fa mi decisi a implementare axfr request su knock grazie al supporto della libreria dnspython. Oggi queste operazioni possono essere tranquillamente eseguite con namp grazie al lavoro dello script engine.

Non sto qui a spiegare cosa è lo zone transfer o come, quando e in che modo dev’essere abilitato o inibito, voglio solo appuntare un esempio pratico di richiesta axfr utilizzando il comando DiG.

Andiamo per ordine:

Host in esame: gazzetta.it

DNS Name Server:

$: dig gazzetta.it NS | grep -v "^;" | grep -v "^$"| grep NS

gazzetta.it. 61355 IN NS ns2.ita.tip.net.
gazzetta.it. 61355 IN NS ns.ita.tip.net.

L’otuput restituisce due dns: ns.ita.it.net e ns2.ita.tip.net, su quest’ultimo è abilitato lo zone transfer, possiamo verificare con il seguente comando:


$: dig @ns2.ita.tip.net gazzetta.it axfr | grep -v "^;" | grep -v "^$"

gazzetta.it. 86400 IN NS ns.ita.tip.net.
gazzetta.it. 86400 IN NS ns2.ita.tip.net.
gazzetta.it. 86400 IN A 194.20.158.242
gazzetta.it. 86400 IN A 194.20.158.102
gazzetta.it. 86400 IN MX 15 posta3.rcs.it.
gazzetta.it. 86400 IN MX 15 posta2.rcs.it.
gazzetta.it. 86400 IN MX 15 posta1.rcs.it.
gazzetta.it. 86400 IN MX 15 posta4.rcs.it.
45parallelo.gazzetta.it. 86400 IN CNAME 45parallelo.splinder.com.
altrimondi.gazzetta.it. 86400 IN CNAME cw.rcs.tomato.it.
altrogirotv.gazzetta.it. 86400 IN A 213.92.76.242
americaalmassimo.gazzetta.it. 86400 IN CNAME americaalmassimo.splinder.com.
americalmassimo.gazzetta.it. 86400 IN CNAME americaalmassimo.splinder.com.
appuntidiviaggio.gazzetta.it. 86400 IN CNAME blog.splinder.com.
archivio.gazzetta.it. 86400 IN CNAME www.gazzetta.it.
archivio-sms.gazzetta.it. 86400 IN CNAME www.gazzetta.it.
archivioaltrimondi.gazzetta.it. 86400 IN CNAME gda.splinder.com.
archiviostorico.gazzetta.it. 86400 IN CNAME www.gazzetta.it.
beachtour.gazzetta.it. 86400 IN CNAME www.gazzetta.it.
beachtour8.gazzetta.it. 86400 IN A 194.20.158.99
beachtournews.gazzetta.it. 86400 IN CNAME www.gazzetta.it.
biciscuola.gazzetta.it. 86400 IN A 64.13.232.188
blog.gazzetta.it. 86400 IN CNAME www.gazzetta.it.
*.blog.gazzetta.it. 86400 IN CNAME blog.splinder.com.
cache1.gazzetta.it. 86400 IN A 62.94.132.21
cache2.gazzetta.it. 86400 IN A 10.31.255.10
cache3.gazzetta.it. 86400 IN A 151.1.208.3
cache4.gazzetta.it. 86400 IN A 213.92.76.194
cache5.gazzetta.it. 86400 IN A 213.255.2.197
cache6.gazzetta.it. 86400 IN A 195.110.98.8
cache7.gazzetta.it. 86400 IN A 212.123.79.244
cache8.gazzetta.it. 86400 IN A 217.169.110.148
calciofrancese.gazzetta.it. 86400 IN CNAME blog.splinder.com.
carovanaexodus.gazzetta.it. 86400 IN CNAME blog.splinder.com.
…..etc. etc. etc.

code , . URL.

2 Responses to Zone Transfer AXFR con DiG

  1. Anonymous says:

    Perdona la domanda forse banale, ma è legale pubblicare i risultati di uno zone transfer? E nel caso in cui esso dovesse contenere record relativi ad host della rete interna? Grazie per le delucidazioni.

  2. faber says:

    Perché dovrebbe essere illegale? Se queste informazioni le ottieni dall’esterno, facendo una legalissima query sul nameserver, non vedo che problemi ci siano a pubblicarle.

    Fatto sta che molti sysadmin impediscono di default le zone transfer per ovvi motivi di sicurezza

Lascia un Commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

*

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>