Skip to main content
Glossary

Discovery

What is Subdomain Enumeration?

Also: subdomain discovery · subdomain recon · hostname enumeration · DNS enumeration

Definition

Subdomain enumeration is the process of finding every hostname that lives under a domain (like staging.example.com or vpn.example.com) so you can see your full internet-facing footprint before an attacker maps it for you.

Reviewed byAakash HarishSecurity Research Contributor, LegbaReviewed 2026-05-28

In depth

A subdomain is simply a label prepended to a registered domain, such as the 'mail' in mail.example.com. Each one can resolve to its own IP address, application, and stack, which means each is a distinct doorway into your organization. Subdomain enumeration is the discipline of systematically discovering all of those doorways. It exists because the list of subdomains a team thinks it owns is almost never the list it actually exposes: marketing spins up a campaign host, an engineer points dev.example.com at a cloud load balancer for a sprint, an acquisition brings dozens of inherited names, and none of it makes it into the asset inventory.

Enumeration techniques fall into passive and active camps. Passive techniques collect hostnames from third-party data sets without ever touching the target's infrastructure, so they are quiet and low-risk. The richest passive source is Certificate Transparency (CT), the public append-only logging system defined in RFC 6962: every publicly trusted Certificate Authority must log each TLS certificate it issues, and those certificates carry the hostnames they cover in their Subject Alternative Name (SAN) field. Querying CT aggregators such as crt.sh therefore surfaces subdomains the moment a certificate is minted for them, including internal-sounding names like jenkins.example.com that were never meant to be public. Passive DNS, which records historical resolutions observed across the internet, and search-engine scraping round out the passive toolkit.

Active techniques talk to DNS resolvers directly. Brute-force enumeration tests a wordlist of candidate labels (admin, api, vpn, git, staging) against the domain and keeps the ones that resolve. Permutation or alteration scanning takes already-known subdomains and mutates them, for example turning api.example.com into api-dev.example.com, api2.example.com, and api-staging.example.com, to catch the predictable naming patterns ops teams reuse. Misconfigured name servers occasionally allow AXFR zone transfers that dump every record at once. MITRE ATT&CK catalogs this whole activity as adversary sub-technique T1590.002, 'Gather Victim Network Information: DNS,' because attackers run the exact same playbook to map your subdomains, mail servers, and SaaS dependencies during target reconnaissance.

It is worth distinguishing subdomain enumeration from adjacent terms. DNS enumeration is broader, covering MX, TXT, SPF, and NS records in addition to host addressing; subdomain enumeration is the host-focused slice of it. Asset discovery and External Attack Surface Management (EASM) are broader still, treating enumerated subdomains as one input alongside IP-range scanning, cloud API integrations, and port discovery. The critical downstream step is resolution and validation: an enumerated name is only meaningful once you confirm whether it resolves, what it points to, and whether that target is still under your control. A name that resolves to a deprovisioned cloud resource is a dangling DNS record, and a dangling record on a claimable service is the precondition for a subdomain takeover.

Why it matters

You cannot defend an asset you do not know exists, and the subdomains you forgot about are exactly where breaches start. Industry attack-surface findings in 2025 repeatedly flag forgotten subdomains that host login pages without multi-factor authentication, abandoned staging environments, and inherited acquisition hosts as the most common external exposures. Every subdomain you fail to enumerate is one an adversary will enumerate for free using the same public CT logs and passive DNS you could have queried first. The loss is concrete: a single overlooked name pointing at a deprovisioned cloud bucket or unclaimed SaaS tenant becomes a subdomain takeover, handing an attacker a trusted hostname on your own domain to phish your users, harvest session cookies, or stage malware. Comprehensive enumeration is the cheapest insurance against that scenario, because finding the host yourself costs minutes while cleaning up after a hijacked subdomain costs trust you may never fully recover.

How Legba Adversary uses it

Legba Adversary treats subdomain enumeration as the discovery layer that everything else is built on. It fuses passive sources (Certificate Transparency logs, passive DNS, and public data sets) with active brute-force and permutation scanning so that newly issued certificates and predictable naming patterns both surface, then resolves every candidate to confirm which hosts are live and what they point to. Because Adversary runs continuously rather than as a one-off scan, a subdomain that appears in a CT log this morning shows up in your inventory this morning, not at your next quarterly audit. Crucially, Adversary does not stop at the list of names: it correlates each resolved host against its current owner and infrastructure, flags dangling DNS records that point at deprovisioned resources, and escalates the ones that meet the criteria for a subdomain takeover into a validated, prioritized finding you can act on before an attacker claims the host.

Explore Legba Adversary
Methodology

Each guide is written by our team, reviewed by a named security contributor, and cited against primary sources such as OWASP, CISA, NIST, and MITRE. We update pages when the underlying guidance changes. See our contributors and company.

FAQs.

What is the difference between passive and active subdomain enumeration?
Passive enumeration collects subdomains from third-party data sets like Certificate Transparency logs, passive DNS, and search engines without sending any traffic to the target, so it is quiet and low-risk. Active enumeration queries the target's DNS directly using brute-force wordlists, permutation scanning, or zone-transfer attempts, which is more thorough but noisier and more likely to be logged.
How do Certificate Transparency logs help find subdomains?
Under RFC 6962, every publicly trusted Certificate Authority must publish each TLS certificate it issues to public append-only logs. Those certificates list the hostnames they cover in the Subject Alternative Name field, so querying CT aggregators such as crt.sh reveals subdomains, including internal or staging names, the instant a certificate is issued for them, often before they appear anywhere else.
Why does subdomain enumeration matter for subdomain takeover?
Enumeration is the first step that exposes which subdomains exist and where they resolve. If a subdomain still has a DNS record pointing at a cloud resource or SaaS tenant that has been deprovisioned, that dangling record can be claimed by an attacker, who then controls a trusted hostname on your domain. Enumerating and resolving every name lets you catch and fix those dangling records before they become a takeover.
Is subdomain enumeration the same as DNS enumeration?
No. DNS enumeration is broader and includes MX, TXT, SPF, and name-server records that reveal mail routing and SaaS dependencies. Subdomain enumeration is the host-focused subset that concentrates specifically on discovering the hostnames living under a domain. Both are part of the reconnaissance that MITRE ATT&CK tracks as sub-technique T1590.002.

References

  1. 01
  2. 02
  3. 03
  4. 04
    Certificate TransparencyMDN Web Docs (Mozilla)

Keep exploring

Try it on the next page you do not trust

Legba is a Chrome extension with two modes. Ghost gives you a private browser route. Shield opens a page in an isolated browser off your device.

Free for 30 days. No card required.

Ghost. A private route for your browser. Shield. An isolated browser, off your device. Choose the mode. Close when finished.