Skip to content

Lesson 1 of 9 · 20m

The DNS Resolution Path Is the Attack Surface

Follow one lookup from browser to authoritative server and identify every place trust, caching, or ownership can break.

DNS looks simple until you watch a production incident unfold: marketing launches a campaign, the hostname dies six months later, and the old DNS entry quietly points at infrastructure nobody owns. The attackers rarely 'hack DNS.' They inherit trust you abandoned.

The path every lookup takes

browser/app
  -> operating-system stub resolver
  -> recursive resolver (ISP, corporate, 1.1.1.1, 8.8.8.8)
  -> root nameservers
  -> TLD nameservers (.com, .net, country TLDs)
  -> authoritative nameservers for your zone

Each arrow is a trust boundary. The stub trusts the recursive resolver. The recursive resolver trusts delegated nameservers because the parent zone says so. Your users trust the final answer because the hostname printed correctly in their browser.

Read DNS like an operator

dig +trace docs.acme-corp.com
dig @1.1.1.1 docs.acme-corp.com A +noall +answer
dig acme-corp.com NS +short
dig docs.acme-corp.com CNAME +short

+trace shows the delegation chain. @1.1.1.1 tests through a specific recursive resolver. A discrepancy between resolvers often means stale cache, split-horizon DNS, or a half-completed migration.

The records attackers care about

  • A and AAAA: point directly at IP addresses. Dangerous when cloud IPs are released and reassigned.
  • CNAME: delegates a hostname to another hostname, often a SaaS tenant. Dangerous when the tenant is deleted.
  • NS: delegates an entire zone or subdomain zone. Dangerous when a forgotten DNS provider remains authoritative.
  • MX, TXT, and SRV: less direct for takeover, but valuable for phishing, verification abuse, and service discovery.

Ownership is a lifecycle, not a purchase

The registrar owns the registered domain relationship. The DNS provider hosts the zone. Cloud providers allocate IP addresses. SaaS vendors accept hostnames. A takeover usually happens at the seams, where no one team owns the full lifecycle.

Field notes

  • Never debug a strange answer using only one resolver; compare at least two public resolvers plus the authoritative server.
  • TTL is not a countdown you control absolutely. Resolvers can cache longer, cap TTLs, or serve stale data during upstream failure.
  • 'The site works' is not proof of safety. A dangling CNAME can still resolve today and become claimable tomorrow.
  • Build a simple resolution map during incidents: registrar, nameservers, zone owner, record owner, service owner.

Was this lesson helpful?

Sign in to rate