Sections:
Overview:
ARP Poisoning
To better understand DAI, let's go over an example of how attackers poison ARP tables of other hosts. ARP is a layer 2 protocol that is used in a broadcast domain to map an IP address to a MAC address. For example, Host A wants to communicate with Host B but does not have the MAC address of Host B in its ARP cache. Host A generates an ARP broadcast message for all hosts within the broadcast domain to ideally obtain the MAC address associated with the IP address of Host B. Host B responds with its MAC address but consequently, the ARP protocol allows for gratuitous reply messages from any host even if an ARP request was not received. This in turn increases the risk for an ARP spoofing/poisoning attack. After the results of an attack, all traffic from affected hosts will flow through the attacker's device and eventually to the host representing a successful MITM attack.
Lab Topology - ARP Poisoning Attack with Kali Linux
Scenario:
Ettercap Setup
In this example, I have brought up a Kali Linux VM instance using Oracle VirtualBox that includes the Ettercap software.
Ettercap is an open-source network security tool primarily used for man-in-the-middle (MITM) attacks on LANs. It is designed for packet sniffing, interception, and modification of network traffic, making it a useful tool for network analysis, security testing, and troubleshooting.
Kali Linux
Kali Linux VM GUI
Enabling DHCP on the Linux interface to receive an address from Gateway-R1 router
DHCP IP address received and assigned to the ethernet interface. The MAC address of the ethernet interface ending in ':e0:97' will play a big role during ARP entry modifications
Ettercap software GUI
Starting packet capture on Linux machine via its ethernet interface
Sending ARP broadcast messages to entire VLAN60 subnet to identify active hosts
ARP broadcast packets to the HQ network via Wireshark
ARP table displaying active hosts on the Linux machine
Active host list in Ettercap after performing the ARP broadcast. Assigning both host victims as targets for the ARP poison attack
Menu option in Ettercap to perform the ARP poison attack
Wireshark capture of gratuitous ARP messages being sent out via Linux's ethernet interface to poison the ARP caches of MGMT PC and the VLAN60 default gateway
Wireshark capture of ICMP messages between MGMT PC & Gateway-R1 redirected back to the attack machine
ARP Poisoning Effects
MGMT PC VLAN60
Poisoned Gateway-R1 ARP entry displayed on MGMT PC ARP table
Gateway-R1
Poisoned MGMT-PC ARP entry displayed on Gateway-R1 ARP table
DAI Dynamic ARP Inspection Configuration
Scenario:
HQ-Access-SW1
Base configuration of DAI applied to specific VLANs. Show command to analyze vlan statistics
Notes:
HQ-Distro-SW1
DAI enabled for each VLAN. Trusted ports for trunk links defined. Verify trusted ports.
HQ-Distro-SW2
DAI enabled for each VLAN. Trusted ports for trunk links defined. Verify trusted ports.
HQ-Core-SW1
DAI enabled for each VLAN. Trusted ports for trunk links defined. Verify trusted ports. For demonstration, increase the rate limit value on the untrusted access port from 15 to 25.
HQ-Core-SW2
Notes:
DAI Dynamic ARP Inspection Validation
Scenario:
Kali Linux Attacker
Port Gi0/0 on HQ-Core-SW2 connected to the Kali Linux attacker goes into an error disabled state if the number of ARP messages exceed the configured rate limit. From the Kali Linux machine, I issued an ARP broadcast scan to the entire subnet once again but DAI took action.
Notes: