ARP Spoofing Maninthe Middle Attacks
ARP Table in Host A
ARP Table in Host B
3. Subsequent gratuitous ARP replies overwrite legitimate replies
ARP Table in Host C
ARP spoofing attacks, or ARP cache poisoning, occurs when ARP allows a gratuitous reply from a host even if an ARP request is not received. After the attack, all traffic from the device under attack flows through the attacker computer and then to the router, switch, or host. An ARP spoofing attack can target hosts, switches, and routers connected to your Layer 2 network by poisoning the ARP caches of systems connected to the subnet and by intercepting traffic intended for other hosts on the subnet. The figure shows an example of ARP cache poisoning.
The figure shows that hosts A, B, and C are connected to the switch on interfaces A, B, and C, all of which are on the same subnet. Their IP and MAC addresses are also shown. In this example, host A uses IP address 10.1.1.2 and MAC address A.A.A.A. When host A needs to communicate to host B at the IP layer, host A broadcasts an ARP request for the MAC address associated with IP address 10.1.1.1.
When host B receives the ARP request, it populates its ARP cache with an ARP binding for a host with the IP address 10.1.1.2 and MAC address A.A.A.A. When host B responds, host A populates its ARP cache with a binding for a host with IP address 10.1.1.1 and MAC address
Host C can poison the ARP caches of host A and host B by broadcasting forged ARP responses with bindings for a host with an IP address of 10.1.1.2 (or 10.1.1.1) and a MAC address of
C.C.C.C. Hosts with poisoned ARP caches use the MAC address C.C.C.C as the destination MAC address for traffic intended for 10.1.1.2 or 10.1.1.1. By poisoning the ARP caches of host A and host B, host C intercepts traffic intended for them. Because host C knows the true MAC addresses associated with the host A and host B IP addresses, host C can forward the intercepted traffic to those hosts by using the correct MAC address as the destination. Host C has inserted itself into the traffic stream from host A to host B, which is the topology of the classic man-in-the-middle attack.
3-26 Securing Cisco Network Devices (SND) v2.0 © 2006 Cisco Systems, Inc.
The DAI feature of Cisco Catalyst switches stops ARP spoofing attacks. Like DHCP snooping, DAI uses the concept of trusted and untrusted ports to decide which ARP packets must be inspected. In this process, DAI intercepts all ARP packets and examines them for proper MAC-to-IP bindings using the DHCP binding table that was built when DHCP snooping was enabled. If an ARP packet arrives on a trusted port, no examination is made. If the packet arrives on an untrusted port, the ARP is examined and compared against the DHCP binding table, as explained in the "Dynamic ARP Inspection Commands" table.
Dynamic ARP Inspection Commands
|
Command |
Description |
|
Switch(config)# ip arp inspection vlan vlan id [,vlan id] |
Enables DAI on a VLAN or range of VLANs |
|
Switch(config-if)# ip arp inspection trust |
Enables DAI on an interface and sets the interface as a trusted interface |
Example: DAI Implementation
This example shows how to configure dynamic ARP inspection for hosts on VLAN 1, where client devices are located for switch 2. All client ports are untrusted by default. Only port 3/3 is trusted, because that is the only port where DHCP replies would be expected.
Switch S2(config)#ip arp inspection vlan 1 Switch S2(config)#interface fastethernet 3/3 Switch S2(config-if)#ip arp inspection trust
© 2006 Cisco Systems, Inc. Securing LAN and WLAN Devices 3-27
Continue reading here: MAC B is unknown so the switch will flood the frame
Was this article helpful?
Readers' Questions
-
Amanda18 days ago
- Reply
-
robert10 months ago
- Reply