Skip to main content
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 by Aakash Harish

Security Research Contributor, Legba

Reviewed 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 Recon uses it

Legba Recon 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 Recon 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, Recon 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 Recon →

Methodology

Each finding-type guide is built from Legba Recon's real detection and validation logic, 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.

References.

Keep exploring

Your agent needs its Legba.

Read the docs