ARP Cache Poisoning with Scapy
Scapy is a very powerful tool that allows you to manipulate a large amount of network packets. You can read more about it at http://www.secdev.org/projects/scapy/. I have been playing around with it and will show how to go about sending a modified ARP packet. First off you need to install scapy. If your using Backtrack you will find it is allready intalled and ready to use. If your using a diffrent distro of linux a simple “apt-get install scapy” will suffice.
To start with you will want to create the ARP packet. typing “h=ARP()” will assign the h to the arp packet you create. “h.show()” will show you the variables inside the ARP packet you can change.

There are two variables that you are going to want to change. Thease are PSRC and PDST. To change them you need to input the following. “h.psrc=("192.168.1.254")” (The IP for the Gateway) and “h.pdst=("192.168.1.73")” (The IP for the client).
Typing h.show() again will show you the new settings for the packet.

Now you have created the packet you need to send it. to do this simply type send(h).
By going to the machine you sent the packet to you can open up Wireshark and see the ARP packet successfully working.
You can also send a ping to an IP address that would normally use the gateway IP. In this example I pinged Google and captured the packets on the machine I sent the ARP packet from. As you can see in the screenshot below instead of going to the gateway to Google it went to me.
I’m going to be using Scapy alot more as its an excellent tool so expect to see some more posts about Scapy on here in the future. There is also a great video by John Strand on youtube that explains the basics on Scapy.


