Networking guides, explanations and reader checklists on whilenetworking.com

Network Security Drill: Detect ARP Spoofing Attacks Using Wireshark Filters to Protect Internal VLANs

In modern enterprise networks, the Address Resolution Protocol (ARP) is often the first line of defense for attackers seeking to intercept traffic. An ARP…

In modern enterprise networks, the Address Resolution Protocol (ARP) is often the first line of defense for attackers seeking to intercept traffic. An ARP spoofing attack, also known as ARP poisoning or ARP cache poisoning, occurs when a malicious actor sends falsified ARP messages over a local area network (LAN). These messages link an attacker’s MAC address with the IP address of a legitimate device, such as a default gateway or a server. Once poisoned, traffic intended for the victim is redirected to the attacker, enabling man-in-the-middle (MitM) eavesdropping. For IT students and junior engineers, mastering the detection of these attacks using Wireshark is a critical skill in securing internal VLANs. This guide provides a practical, hands-on approach to identifying ARP spoofing without causing disruption to live production environments.

Understanding the Mechanics of ARP Spoofing

Before deploying detection tools, it is essential to understand how an attack manifests at the packet level. Under normal conditions, a device broadcasts an ARP request asking, “Who has IP address 192.168.10.1?” The legitimate owner replies with its MAC address. In an ARP spoofing scenario, an attacker intercepts this broadcast and responds with their own MAC address, claiming to be the gateway.

This deception corrupts the ARP cache on victim devices. When a user attempts to access the internet, their device sends packets to what it believes is the gateway (the attacker). The attacker then forwards these packets to the real gateway (if configured to do so) or drops them entirely. Because this operates at Layer 2 of the OSI model, standard firewall rules often fail to detect it unless specific logging and monitoring are in place.

Lab Environment Prerequisites and Safety

Attempting ARP spoofing detection on a live network without preparation can lead to accidental outages or security breaches. Therefore, all exercises must be conducted in an isolated lab environment. Whether you are using Cisco Packet Tracer, GNS3, or EVE-NG, ensure the following prerequisites are met:

  1. Isolated Network Topology: Create a virtual network containing three hosts:
    • Host A (Victim): Configured with IP 192.168.10.10/24.
    • Host B (Attacker): Configured with IP 192.168.10.11/24.
    • Host C (Gateway/Switch): Acts as the Layer 3 gateway for the VLAN.
  2. Software Versions: Ensure you are running a supported version of Wireshark (e.g., 4.x) and your virtualization software supports packet capture interfaces.
  3. Permissions: Run Wireshark with administrator privileges to ensure it can access the network interface in promiscuous mode.

Safety Warning: Never run ARP spoofing tools or filters on a production network without explicit authorization from network operations management. The following steps are for educational purposes only.

Configuring Wireshark for ARP Traffic Analysis

The first step in detection is configuring Wireshark to focus exclusively on ARP traffic within your specific VLAN subnet. This reduces noise and highlights anomalies immediately.

  1. Launch Wireshark and select the correct network interface (e.g., eth0 or vEthernet: Default Switch).
  2. In the display filter bar at the top, enter the following command to isolate ARP packets for your lab subnet:
    text
    arp && ip.addr == 192.168.10.0/24
  3. Click “Apply.” The interface will now only show ARP requests and replies involving devices in the 192.168.10.x range.

This filter is crucial because it allows you to spot spoofing attempts instantly. In a healthy network, IP addresses should match their MAC addresses consistently. If you see an ARP reply where the source IP claims to be the gateway (192.168.10.1) but the source MAC address does not belong to your known switch or gateway hardware, you have likely identified a spoofing attempt.

Identifying Spoofing Indicators in Packet Captures

Once traffic is flowing, generate an ARP request from Host A (the victim) by pinging the gateway (ping 192.168.10.1). Immediately after, simulate an attack or trigger a vulnerability if using a script like arpspoof on Host B. In Wireshark, look for the following specific indicators:

  • Unicast Replies to Broadcasts: Normal ARP operations involve a broadcast request followed by a unicast reply from the correct owner. If you see an ARP reply originating from an unexpected MAC address claiming to own a gateway IP, flag it immediately.
  • MAC Address Mismatches: Right-click on an ARP packet and select “Follow” > “TCP Stream” or inspect the Ethernet II header. Verify that the Source MAC matches the expected hardware address for that IP subnet.
  • Rapid Cache Poisoning: If Host B sends multiple rapid ARP replies claiming ownership of Host A’s IP, the victim’s cache will update quickly. In Wireshark, you will see a high volume of “Who has X? Tell Y” packets followed by immediate “X is at [Attacker MAC]” replies.

Illustrative Output Example

When viewing the packet list in Wireshark, a suspicious entry might look like this:

Time Source Destination Protocol Length Info
12.05s 192.168.10.11 (Attacker) Broadcast ARP 42 Who has 192.168.10.1? Tell 192.168.10.10
12.05s 192.168.10.11 (Attacker) 192.168.10.10 ARP 42 192.168.10.1 is at aa:bb:cc:dd:ee:ff

Note: If the real gateway’s MAC address is known to be 00:11:22:33:44:55, seeing aa:bb:cc:dd:ee:ff associated with 192.168.10.1 confirms an attack.

Verification Steps and Common Errors

After identifying potential spoofing, verification is required to ensure you are not misinterpreting legitimate network changes, such as a new switch port being activated. Follow these steps:

  1. Cross-Reference Hardware Tables: Log into your managed switch or router via SSH or Web UI. Check the ARP table (show ip arp on Cisco devices) or MAC address table. If the switch table shows the attacker’s MAC address associated with the gateway IP, the switch itself may be compromised or misconfigured.
  2. Check for Duplicate IPs: Use the arping command from a third-party host to verify if an IP conflict exists.
    bash
    arping -c 3 -I eth0 192.168.10.1

    If you receive replies from two different MAC addresses for the same IP, an attack or misconfiguration is confirmed.
  3. Common Error: Promiscuous Mode Issues: A frequent error students encounter is Wireshark not capturing packets because the interface is not in promiscuous mode. Ensure the driver settings allow full capture. Another common mistake is applying filters too late; always start the filter before generating traffic to avoid missing the initial poison.

Student Practice Task: Securing a VLAN Segment

To solidify your understanding, complete the following practice task in your Packet Tracer or GNS3 lab:

  1. Setup: Create a VLAN 10 segment with two PCs and one router acting as the gateway.
  2. Simulation: Use a terminal on PC2 to send spoofed ARP replies claiming to be the router’s IP, pointing to PC2’s MAC address.
  3. Detection: Start Wireshark on PC1 (the victim). Apply the filter arp. Observe the traffic when PC1 pings the router.
  4. Mitigation: Configure Dynamic ARP Inspection (DAI) on your virtual switch if available, or implement Static ARP entries on PC1 to lock in the correct MAC/IP pair.
  5. Report: Document the packet count of spoofed replies versus legitimate ones and explain how the DAI configuration blocked further poisoning attempts.

Industry Application: Integrating Detection into Monitoring

In a professional setting, manual Wireshark analysis is often supplemented by automated network monitoring tools like SolarWinds NPM, PRTG, or custom Python scripts using scapy. These tools can log ARP anomalies to a SIEM (Security Information and Event Management) system. However, the fundamental logic remains the same: detect discrepancies between IP addresses and MAC addresses within a VLAN.

It is vital to remember that terms, availability, eligibility, laws, and prices for commercial security solutions depend on the specific vendor, policy, and jurisdiction. Always verify current product capabilities with official documentation rather than relying on anecdotal evidence. Furthermore, while this guide provides technical steps for detection, it does not constitute financial or legal advice regarding cybersecurity insurance policies. Organizations should consult their cyber liability carriers to understand coverage specifics for data breaches resulting from ARP attacks, as policy terms vary significantly by region and insurer.

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.