arp poisoning is one of the oldest yet most effective tricks in hacker' toolkit quite simplywe will convince target machine that we have become its gatewayand we will also convince the gateway that in order to reach the target machineall traffic has to go through us every computer on network maintains an arp cache that stores the most recent mac addresses that match to ip addresses on the local networkand we are going to poison this cache with entries that we control to achieve this attack because the address resolution protocol and arp poisoning in general is covered in numerous other materialsi'll leave it to you to do any necessary research to understand how this attack works at lower level now that we know what we need to dolet' put it into practice when tested thisi attacked real windows machine and used my kali vm as my attacking machine have also tested this code against various mobile devices connected to wireless access point and it worked great the first thing we'll do is check the arp cache on the target windows machine so we can see our attack in action later on examine the following to see how to inspect the arp cache on your windows vm :\users\clareipconfig windows ip configuration wireless lan adapter wireless network connectionconnection-specific dns suffix gateway pace com link-local ipv address fe :: : cd: : % ipv address subnet mask default gateway :\users\clarearp - interface -- xb internet address physical address -ea- - - - ff-ff-ff-ff-ff-ff ee- - -fb - - -fc ff-ff-ff-ff-ff-ff type dynamic static static static static static so now we can see that the gateway ip address is at and its associated arp cache entry has mac address of -ea- - - - we will take note of this because we can view the arp cache while the attack is ongoing and see that we have changed the gateway' registered mac address now that we know the gateway and our target ip addresslet' begin coding our arp poisoning script open new python filecall it arper pyand enter the following codefrom scapy all import import os import sys import threading import signal interface "en target_ip gateway_ip packet_count set our interface conf iface interface