Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

DNS Cache Poisoning

Direct answer

DNS cache poisoning inserts forged records into a resolver's cache, so every client using it is sent to the attacker. Source port randomization, DNSSEC validation and patched resolvers defend against it.

When to use this

Use this when a resolver may hold forged records that redirect all its clients.

First 30 seconds

1. Cache poisoning injects false records into resolver caches.

2. Defend: port/ID randomisation, DNSSEC, patched software (Kaminsky-era fixes).

3. 0x20 encoding.

4. Don't run open resolvers.

5. Flush cache after incidents.

Operational verification

forged response → resolver cache (if accepted) → clients misdirected

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Network security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetwork security
Key commanddig +short porttest.dns-oarc.net TXT
Scope / prerequisiteUse this when a resolver may hold forged records that redirect all its clients.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
dig +short porttest.dns-oarc.net TXT          # source port randomness (rating GOOD/POOR)
dig @resolver example.com +dnssec | grep flags  # ad flag = validated
rndc status                                     # BIND version and state

Run resolvers on current versions and enable DNSSEC validation (dnssec-validation auto; in BIND).

Step 2 Common mistakes Narrow the fault
  • Resolvers without source-port randomisation or DNSSEC validation.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Poisoning affects every client of the resolver.
  • Source port randomization and DNSSEC validation defend against it.
  • Unpatched resolvers are the usual target.
Key checks
  • Resolver source port randomisation — enabled
  • DNSSEC validation — enabled
  • unbound-control dump_cache | grep <domain> — inspect cache (Unbound)
ReferenceWhy it matters1 section · depth on demand

Protection

  • Source-port and query-ID randomisation (standard in modern resolvers; Kaminsky 2008).
  • DNSSEC validation on resolvers.
  • Patch resolvers (SAD DNS and similar side-channel attacks).
  • Do not allow recursion for untrusted clients.

Symptom: many users sent to the wrong IP for a domain while authoritative servers return the right answer; flush the resolver cache after fixing (rndc flush, Clear-DnsServerCache).

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

DNS cache poisoning inserts forged records into a recursive resolver's cache, so every client using that resolver is sent to an attacker-controlled address until the record expires. The Kaminsky attack (2008) showed how practical this was before modern defences.

Defences in modern resolvers:

DefenceEffect
Random source ports and query IDsAttacker must guess ~32 bits
0x20 case randomisationAdditional entropy
DNSSEC validationForged answers fail for signed zones
Bailiwick checksIgnore unrelated records in responses
Patched resolver softwareFixes for newer variants (e.g. SAD DNS)

Run supported resolver software (Unbound, BIND, PowerDNS Recursor, Windows DNS) with current patches, enable DNSSEC validation, and do not expose recursive resolvers to the internet.

Kaminsky attack

In 2008 Dan Kaminsky showed attackers could query random subdomains and flood forged replies with a fake NS record, poisoning a whole zone. The fix was source port randomisation, giving ~32 bits of randomness (16-bit transaction ID + port). DNSSEC validation removes the problem for signed zones. SAD DNS (2020) used ICMP side channels to infer ports again — keep resolvers updated.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetwork security current

Authoritative/upstream documentation reviewed for bounded claims in DNS Security → DNS Cache Poisoning. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4033 · confidence 94%
Confirmation

Confirm action

Continue?