DNS security and abuse
Cache poisoning
An attacker tricks a resolver into caching a forged answer (e.g. pointing your bank's name to their server). Classic attacks (the 2008 Kaminsky attack) raced forged responses with guessed query IDs. Defences:
- Random query IDs and source ports (makes guessing infeasible), 0x20 case randomisation.
- DNSSEC — cryptographic signatures that validating resolvers check; a forged answer fails validation.
- Encrypted transport (DoT/DoH) between client and resolver.
Amplification and open resolvers
DNS amplification sends small queries with the victim's spoofed source IP to open recursive resolvers, which send much larger responses to the victim — a DDoS multiplier. Never run an open resolver on the internet; restrict recursion to your own networks, and use response rate limiting on authoritative servers.
Exfiltration and tunnelling
Because DNS is allowed almost everywhere, malware and attackers tunnel data in DNS queries (<base64-chunk>.attacker.example). Mitigate with Route 53 Resolver DNS Firewall (block known-bad domains, or allow-list only needed domains for locked-down workloads), Resolver query logging and anomaly detection (GuardDuty analyses VPC DNS logs).
Hijacking
Attackers who take over your registrar account or delegation can redirect your entire domain. Protect with MFA, registry/registrar locks, monitoring NS changes, and DNSSEC.
Why companies run internal DNS
Private names for internal services, split-horizon views, central control and logging of lookups, forwarding to on-prem, and security filtering — on AWS via private hosted zones, Resolver endpoints, DNS Firewall and query logging.