DNS and subdomains · 01 How it works

DNS and subdomains: how it works

How name resolution works, what a subdomain is, why subdomains are not listed anywhere and which sources reveal them: certificate logs, passive DNS, search engines, domain records.

The resolution chain

When you type a name, a resolver asks the root servers who manages the extension, then the extension’s registry who manages the domain, and finally the domain’s authoritative servers for the answer. Answers stay cached for a time set by the TTL field: that is why an address change propagates in minutes or hours.

Subdomains

A subdomain is any name under the main domain: mail.example.com, shop.example.com, test.example.com. It can point to different servers and different providers. There is no public list of a domain’s subdomains: they have to be reconstructed from the traces they leave.

Source or methodHow it worksType
Certificate logsEvery public certificate lists the names it protects and is recorded in searchable logsPassive
Passive DNSArchives keeping resolutions observed over timePassive
Search engines and web archivesIndexed pages of subdomainsPassive
Domain recordsMX, SPF, CNAME and other records mentioning namesPassive
Wordlist guessingDirect queries for likely names such as admin or testActive, generates traffic towards the target
Zone transferRequest for the whole zone from the authoritative server, rarely allowedActive
Continue with
02 Technique

DNS and subdomains: technique

The technique for analysing a domain’s DNS: basic records, reading SPF, DMARC and verification codes, subdomains from certificates and passive DNS, infrastructure, addresses behind CDNs, elements shared between domains.

↑