Networking Fundamentals · beginner · ~12 min

DNS: how names become addresses

Trace a DNS resolution and name the record types that matter in recon.

Overview

DNS resolves names to IPs via a hierarchy: root → TLD → authoritative, with caching by TTL. Key records: A/AAAA, CNAME, MX, NS, TXT, PTR.

Why it matters

Subdomain enumeration and DNS record gathering are core passive recon — they map a target's attack surface (mail, name servers, hosts, tech hints) often without touching the target directly. The record types tell you what services exist.

Core concepts

Hierarchy. root → TLD → authoritative server. TTL. How long an answer may be cached. Record types. A/AAAA (address), CNAME (alias), MX (mail), NS (name servers), TXT (verification/SPF), PTR (reverse). Tools. dig, nslookup, host.

Lesson

DNS (Domain Name System) translates names like example.com into IP addresses. It's a distributed, hierarchical database.

Resolution walk

  1. Your resolver asks a root server: "where's .com?"
  2. The TLD server answers: "ask example.com's authoritative server."
  3. The authoritative server returns the A record (the IP). Answers are cached along the way with a TTL.

Record types you'll meet

Type Holds
A / AAAA IPv4 / IPv6 address
CNAME Alias to another name
MX Mail server
NS Authoritative name servers
TXT Free text (SPF, domain verification)
PTR Reverse: IP → name

DNS in recon

DNS is a goldmine for passive reconnaissance: enumerating subdomains, finding mail and name servers, reading TXT records for tech hints. Tools: dig, nslookup, host. Certificate Transparency logs and dig any reveal a target's attack surface — all without sending a single packet to the target's own servers.

Summary

DNS is the distributed name→IP database resolved through a root/TLD/authoritative chain. Its records expose a target's structure, making DNS one of the richest passive-recon sources.

Practice with these exercises