Hwdst=victim_mac_address, pdst=victim_ip, op=ARP_RESPONSE_CODE) Hwsrc=FAKE_MAC_ADDRESS, # -> Mac address to direct to ARP(psrc=gateway_ip_address, # -> Address to lie about Poison_packet = Ether(src=FAKE_MAC_ADDRESS, dst=victim_mac_address) \ DNS spoofing - Attacker initiates a threat such as cache poisoning to reroute traffic intended for a specific domain name traffic to a different IP address. ARP spoofing - Attacker links their MAC address to an authorized IP address already on the network. Victim_mac_address = get_mac_from_ip(victim_ip) In an ARP Poisoning/Spoofing attack malicious ARP Packets are sent to a default gateway on LAN with intent to change the IP address-MAC address pairings in the. IP address spoofing - Attacker sends packets over the network from a false IP address. Gateway_ip_address = netifaces.gateways() Here is the code, thanks for the help! from enum import Enum
#HOW TO SPOOF ARP POISONING DETECTION CODE#
Also some websites seem unaffected (Instagram works.).Īlso, running the code against different brands of phones resulted in different results.Ĭould it be that there are security measures on the different devices? Did I do something wrong? Secondly, the code seems to work on my phone only partially - when opening websites, it just takes a long while. I've even gone as far as clearing the arp table (arp -d *), yet still the real mac address of the gateway returns. I started off with writing code to create a dos, however for some reason it's acting strangely.įirst of all, for some reason, when I run it on my Windows PC, the arp entry never changes. When sending an IP packet to some host, the hardware. I've lately been trying to build a "Man in The Middle" using Python and Scapy (for my own practice, no malicious purposes). We can spoof a DNS host name, an IP address, a MAC address, etc.