DNS Spoofing and Cache Poisoning
What You'll Learn
You'll learn how attackers manipulate DNS responses to redirect victims to malicious servers, enabling traffic interception and impersonation attacks.
The Core Concept
DNS (Domain Name System) translates human-readable domain names like "bank.com" into IP addresses. DNS spoofing is when an attacker sends fake DNS responses to trick a victim's computer into believing a legitimate domain points to the attacker's IP address instead of the real one.
DNS cache poisoning takes this further by injecting these false records into a DNS server's cache. Now the server will give wrong answers to all its users until the poisoned entry expires.
How It Works: The Race Condition
When you query "bank.com," your computer or DNS resolver sends out a request. The attacker races to reply before the legitimate DNS server:
- Victim sends DNS query for "bank.com"
- Attacker intercepts (via ARP spoofing positioning) or predicts the query
- Attacker sends a forged DNS response: "bank.com = 192.0.2.66" (attacker's server)
- If the fake response arrives first, victim accepts it
Real-World Impact
Think of it like a malicious postal worker replacing your bank's address in a directory. Everyone consulting that directory now gets directions to the attacker's fake bank branch instead.
Once positioned (often using ARP spoofing from your previous lessons), an attacker controlling DNS responses can:
- Redirect victims to phishing sites
- Intercept credentials and sensitive data
- Serve malware disguised as legitimate updates
- Perform SSL stripping attacks
Modern Defenses
DNSSEC (DNS Security Extensions) cryptographically signs DNS records to prevent tampering, though adoption remains incomplete.
Key Takeaway: DNS spoofing manipulates name resolution to redirect traffic to attacker-controlled servers, often combined with MITM positioning techniques like ARP spoofing to intercept and forge DNS responses.