CEH Practice Question: Malware, Social Engineering and Network Attacks
During a penetration test, you run the command: 'macof -i eth0 -s 192.168.1.1 -d 192.168.2.1 -e 00:11:22:33:44:55'. What is the intended effect of this command?
⚠ Common exam trap
Test-takers frequently confuse MAC flooding (which targets the switch's CAM table) with ARP poisoning (which targets the ARP cache of hosts), as both involve spoofed MAC addresses but operate at different layers and with different mechanisms.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Perform MAC flooding to cause switch to fail open
The `macof` tool generates a flood of random MAC addresses on the specified interface, overwhelming the switch's Content Addressable Memory (CAM) table. When the CAM table is full, the switch fails open and begins flooding all frames out all ports, effectively turning it into a hub. This allows the attacker to sniff traffic that would normally be isolated to specific switch ports.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Execute a SYN flood against the target
Why it's wrong here
macof is a Layer 2 tool designed to generate a large number of random MAC addresses, overwhelming a switch's Content Addressable Memory (CAM) table. A SYN flood, conversely, is a Layer 4 denial-of-service attack that exploits the TCP three-way handshake by sending a flood of SYN requests without completing the final ACK, exhausting server resources. Therefore, macof is not used for executing a SYN flood, which requires tools like hping3 or Nmap's scripting engine.
- ✓
Perform MAC flooding to cause switch to fail open
Why this is correct
The command macof -i eth0 specifically performs MAC flooding by continuously sending frames with randomly generated source MAC addresses to exhaust the switch's Content Addressable Memory (CAM) table. When the CAM table overflows, the switch typically enters a "fail-open" mode, behaving like a hub by broadcasting all incoming traffic out of all ports. This allows an attacker connected to any port on the switch to capture and analyze all network traffic, effectively bypassing the switch's normal segmentation.
- ✗
Perform ARP poisoning
Why it's wrong here
macof operates by flooding the network with numerous frames containing random source MAC addresses to overwhelm a switch's CAM table. ARP poisoning, on the other hand, involves sending spoofed ARP reply messages to associate an attacker's MAC address with the IP address of another host (like the default gateway or a target server). This redirection of traffic is fundamentally different from macof's Layer 2 table exhaustion technique, which does not manipulate ARP caches.
- ✗
Spoof DNS responses
Why it's wrong here
macof is a Layer 2 utility designed to flood a switch's CAM table with random MAC addresses, forcing it into a hub-like state. DNS spoofing, however, is a Layer 7 attack where an attacker intercepts or manipulates DNS queries and responses to redirect users to malicious websites or services. This attack typically involves tools such as dnsspoof or manipulating DNS server entries, which is entirely unrelated to macof's MAC address generation and switch table overflow mechanism.
Quick reference
Access Control Model Comparison
| Model | Acronym | Who Controls Access? | Best For |
|---|---|---|---|
| Discretionary Access Control | DAC | Resource owner | Small teams, file shares |
| Mandatory Access Control | MAC | System / security labels | Classified govt / military |
| Role-Based Access Control | RBAC | Administrator (via roles) | Enterprise environments |
| Attribute-Based Access Control | ABAC | Policy engine (user + resource attributes) | Fine-grained, dynamic policies |
| Rule-Based Access Control | RuBAC | System rules / ACLs | Firewall rules, network ACLs |
Go deeper
Related to this question
About these practice questions
This CEH question is part of Courseiva's 870-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.