MAC Flood
CAM Table
• CAM Table stands for Content Addressable Memory
• The CAM Table stores information such as MAC addresses available on physical ports with their associated VLAN parameters
• CAM Tables have a fixed size
Normal CAM Behavior
CAM Overflow
• Theoretical attack until May 1999
• macof tool since May 1999 (about 100 lines of perl)
• Based on CAM Table’s limited size
Dsniff (macof) can generate 480,000 MAC entries on a switch per minute 8000/s*60.
Assuming a perfect hash function the CAM table will total out at 128,000 (16,000 x 8) 131,052 to be exact Since hash isn’t perfect it actually takes 70 seconds to fill the CAM table.
Once table is full, traffic without a CAM entry floods on the VLAN, but NOT existing traffic with an existing CAM entry
Syntax:
Macof can flood a switch with random MAC addresses. This is called MAC flooding. This fills in the switch’s CAM table, thus new MAC addresses can not be saved, and the switch starts to send all packets to all ports, so it starts to act as a hub, and thus we can monitor all traffic passing through it.
Targeted Flooding
Macof can flood a switch with random MAC addresses destinated to 192.168.1.1.
While conducting a pentest, this tool comes in handy while sniffing. Some switches don’t allow to spoof arp packets. This tool can be used in such situations to check if the switch is overloaded. Some switches behave like hubs, transmitting all source packets to all destinations. Then sniffing would be very easy. Some switches tend to crash & reboot also. Such kind of layer 2 stress testing can be done with this handy tool
MAC flooding with scapy
Last updated