Networking guides, explanations and reader checklists on whilenetworking.com

Network Security Drill: Analyze ARP Spoofing Traffic Using Wireshark to Protect Internal VLANs

In modern enterprise and campus networks, the Address Resolution Protocol (ARP) is often the silent vector for lateral movement attacks. An ARP spoofing…

In modern enterprise and campus networks, the Address Resolution Protocol (ARP) is often the silent vector for lateral movement attacks. An ARP spoofing attack, also known as ARP poisoning or ARP cache poisoning, allows an attacker to intercept traffic between two devices by manipulating the ARP tables of both endpoints. For IT students and junior engineers, understanding how to detect this using Wireshark is a critical skill in network defense. This guide walks you through a practical lab scenario where you will simulate an attack, capture the malicious traffic, analyze packet headers to identify the spoofing technique, and implement mitigation strategies to protect internal VLANs.

Understanding the Threat Vector: How ARP Spoofing Works

Before configuring your simulation environment, it is essential to understand the mechanics of the vulnerability. ARP maps IP addresses to MAC addresses within a local network segment. Because ARP operates without authentication, an attacker can send forged ARP reply packets claiming that their MAC address belongs to a legitimate device, such as a gateway or server.

In a typical scenario, if you are connecting to a corporate Wi-Fi network with segmented VLANs, an attacker on the same subnet could poison your cache to redirect all traffic destined for the router through their machine. This enables eavesdropping (Man-in-the-Middle) or denial of service. The attack is most effective when the network lacks dynamic ARP inspection (DAI) or static ARP binding.

Lab Prerequisites and Environment Setup

To perform this drill safely, you need a controlled environment. Using Cisco Packet Tracer or GNS3 is recommended for simulation, while a dedicated virtual machine (VM) with a Linux distribution like Ubuntu serves as the Wireshark analysis host.

Required Tools:
* Simulation Platform: Cisco Packet Tracer (for topology creation) or GNS3/EVE-NG.
* Analysis Tool: Wireshark installed on a VM acting as a “sniffer” or directly on a Linux machine connected to the switch.
* Network Topology: A basic setup involving three devices:
1. Victim Host: A PC in VLAN 10 (e.g., 192.168.10.5/24).
2. Attacker Host: A PC in the same VLAN configured as a rogue switch or host (e.g., 192.168.10.10/24).
3. Gateway/Router: The default gateway for the VLAN (e.g., 192.168.10.1).

Version Assumptions: Ensure your operating system is up to date. Wireshark version 3.x or later is recommended for improved protocol dissection of modern ARP traffic.

Step-by-Step Simulation: Generating the Spoofing Traffic

The goal of this step is to generate observable artifacts in Wireshark that confirm an ARP spoofing attack is occurring.

  1. Configure the Topology:
    In your simulation environment, connect the Victim Host, Attacker Host, and Gateway to a Layer 2 switch. Ensure they are all assigned IPs within the same subnet (e.g., 192.168.10.x) but on different VLANs if testing isolation failure, or the same VLAN for direct poisoning.

  2. Identify the Victim’s MAC and Gateway IP:
    On the Victim Host, open a terminal and run ipconfig (Windows) or ifconfig/ip addr (Linux). Note the MAC address of the network interface (e.g., AA:BB:CC:DD:EE:FF) and the default gateway IP.

  3. Execute the Poisoning Command:
    On the Attacker Host, use a tool like arpspoof or configure a script to send gratuitous ARP replies. A common command in Linux environments is:
    bash
    arpspoof -i eth0 -t <Victim_IP> <Gateway_IP>

    Alternatively, using ettercap (often included in Kali Linux):
    bash
    ettercap -T -i eth1 //arp// sniff //add arp_spoof "<Gateway_IP>:<Attacker_MAC>" "

    Note: In Packet Tracer, you can manually create an ARP table entry on the router or switch to simulate this state.

  4. Start Capturing:
    On the Victim Host (or a dedicated sniffer VM attached to the same switch port), launch Wireshark. Set the filter to arp to isolate relevant traffic. Click “Start” before initiating the spoofing command on the attacker.

Analyzing Packets in Wireshark: Identifying the Attack

Once the spoofing traffic is active, you will see a flood of ARP packets in Wireshark. The key to identifying an attack lies in analyzing the direction and content of these packets.

Filtering for Evidence:
In the Wireshark display filter bar, type arp and press Enter. You should see two types of packets:
1. ARP Request: “Who has ? Tell ”
2. ARP Reply: “ is at “

What to Look For:
Inspect the ARP Reply packets closely. In a legitimate scenario, an ARP reply should only be sent in response to a specific request or as part of Gratuitous ARP during normal maintenance. During an attack, you will observe:
* Unolicited Replies: The Attacker Host is sending ARP replies claiming that the Gateway’s IP address maps to the Attacker’s MAC address.
* MAC Address Mismatch: The source hardware address in the packet header does not match the expected MAC address of the actual gateway.

Illustrative Output Analysis:
In Wireshark, expand the “Ethernet II” and “ARP” layers of a suspicious packet. You will see:

Frame 10: [eth] 68 bytes on wire (eth0), 68 bytes captured (eth0) ...
    Ethernet II, Src=aa:bb:cc:dd:ee:ff, Dst=ff:ff:ff:ff:ff:ff
    Address Resolution Protocol
        Operation: who-has (request)
        Target MAC address: ???:???:???:???:???:??
        Target IP address: 192.168.10.1
    Frame 15: [eth] 46 bytes on wire (eth0), 46 bytes captured (eth0) ...
    Ethernet II, Src=gg:hh:ii:jj:kk:ll, Dst=aa:bb:cc:dd:ee:ff
    Address Resolution Protocol
        Operation: is-at (reply)
        Sender MAC address: gg:hh:ii:jj:kk:ll  <-- Attacker's MAC
        Sender IP address: 192.168.10.1       <-- Claimed Gateway IP

The presence of multiple packets from gg:hh:ii:jj:kk:ll claiming to be the gateway confirms the poisoning attempt.

Mitigation and Verification Steps

Detecting the attack is only half the battle; protecting the internal VLAN requires immediate mitigation. The following steps outline how to secure the network architecture against such threats.

  1. Implement Dynamic ARP Inspection (DAI):
    Enable DAI on your Cisco switches. This feature uses the DHCP snooping binding database or static ARP entries to validate ARP packets. Any packet that does not match the binding table is dropped.
    text
    Switch(config)# ip arp inspection vlan 10
    Switch(config)# ip arp inspection limit rate 100 interface GigabitEthernet1/0/1

  2. Static ARP Binding:
    For critical servers, configure static ARP entries on the firewall or router to prevent IP-to-MAC mapping changes. This adds a layer of redundancy against cache poisoning.

  3. Enable Port Security:
    Restrict switch ports to only allow MAC addresses known to belong to legitimate devices. This prevents unauthorized hosts from injecting spoofed packets at the edge of the network.

  4. Verification Checklist:

    • [ ] Run show ip arp on the victim host; verify the gateway MAC matches the actual router interface, not the attacker’s.
    • [ ] Check switch logs for DAI drop counters using show ip arp inspection statistics.
    • [ ] Ensure no unauthorized hosts are sending gratuitous ARP replies.

Common Errors and Troubleshooting in Labs

When performing this drill, students often encounter specific issues that can lead to incorrect conclusions.

Error 1: Misinterpreting Gratuitous ARP.
Symptom: You see unsolicited ARP replies but assume it is an attack.
Fix: Check if the reply comes from the legitimate gateway (verified via vendor documentation or show cdp neighbors). Legitimate routers sometimes send gratuitous ARPs during failover or configuration changes. Verify the source MAC address against the switch’s running config.

Error 2: Wireshark Filter Conflicts.
Symptom: The filter arp shows no data despite an active attack.
Fix: Ensure the correct network interface is selected in Wireshark. If using a mirrored port or SPAN port, verify that the capture is actually receiving the traffic. Also, ensure the packet size limit in Wireshark isn’t truncating large frames if the lab environment generates unusually large packets (rare but possible in misconfigured labs).

Error 3: IP Subnet Mismatches.
Symptom: The attacker cannot poison the victim because they are on different subnets.
Fix: ARP is a Layer 2 protocol and only works within the same broadcast domain (VLAN/Subnet). Ensure your lab topology places both the victim and attacker in the same VLAN to successfully simulate the attack. If testing cross-VLAN spoofing, you must involve a router performing proxy ARP or enabling routing features that expose the vulnerability, which is less common in standard defense drills.

Conclusion and Student Practice Task

Analyzing ARP spoofing traffic with Wireshark empowers network engineers to identify lateral movement attempts before they compromise sensitive data. By understanding the packet structure of unolicited ARP replies and implementing Dynamic ARP Inspection, you can significantly harden your internal VLANs against man-in-the-middle attacks.

Student Practice Task:
1. Set up a virtual lab with three devices: Router (Gateway), PC-A (Victim), and PC-B (Attacker).
2. Configure IP addressing for all devices in the same subnet (e.g., 192.168.10.0/24).
3. Install Wireshark on PC-A and start a capture with the filter arp.
4. On PC-B, execute an ARP spoofing command to claim the Gateway’s IP.
5. In Wireshark, identify the packet where the Sender MAC does not match the expected Router MAC but claims the Router’s IP.
6. Document the packet sequence and write a brief report explaining how Dynamic ARP Inspection would have blocked this specific traffic flow.

Remember that network security is a continuous process. Regularly reviewing your ARP tables and monitoring for anomalies in Wireshark can detect sophisticated attacks that bypass perimeter defenses. Always verify policy terms with authoritative sources before deploying new security controls in production environments, as regulations and best practices evolve rapidly.

Educational-use notice: This tutorial is for learning and controlled lab use only. Test carefully, use backups, and obtain authorization before making changes. Do not run unfamiliar commands on production systems. We accept no responsibility for misuse, damage, data loss, or production issues.