CCyberwiki

Subdomain enumeration

Subdomain enumeration
ClassReconnaissance
MITRE ATT&CKT1596.003 Search Open Technical Databases: Digital Certificates; related: T1596.001 DNS/Passive DNS
Main sourcesCertificate Transparency logs, passive DNS databases, DNS zone transfers, reverse-IP services
AffectsEvery domain with publicly trusted certificates, including staging, test and internal host names

Listing, from outside an organization, the host names under one of its domains, such as app.example.com, staging.example.com or vpn.example.com, is called subdomain enumeration. The list tells an attacker which systems to examine next, which makes it a reconnaissance step. Much of the work reads public data and sends no request to the target, above all Certificate Transparency, the logs that record issued TLS certificates. Searching certificate data for names is a catalogued reconnaissance technique of its own.1

Role in an attack

DNS lets one IP address carry many names, and a web server picks the site to serve from the name in the request. A tester who knows only the address or the main domain can therefore miss other sites on the same server.2 Applications on such hosts are often misconfigured or left without updates, "due to the perception that they are only used 'internally'".2 The names can feed later steps such as active scanning and phishing.1 Each one adds to the attack surface, and a name whose DNS record points at a service that no longer exists can lead to Subdomain takeover.

Certificate Transparency logs

Certificate Transparency (CT) began in 2013, after a run of certificate authority failures that included the DigiNotar breach of 2011.3 Its purpose is oversight of certificate authorities (CAs): every certificate they issue is written to public logs where misissued ones can be spotted.3

When a CA validates a request, it first creates a precertificate, which holds the same data as the final certificate plus a "poison" extension that stops browsers from accepting it. The CA submits the precertificate to logs. Each log answers at once with a signed certificate timestamp (SCT), a promise to add the entry within the Maximum Merge Delay, usually 24 hours. The CA embeds the SCTs in the final certificate. Logs are append-only Merkle trees: entries can be added but not deleted or changed, and anyone can query a log.4

Browsers enforce the system. Chrome checks certificates against its CT policy, Apple requires SCTs for Safari, and Firefox requires log inclusion from version 135 on desktop and 145 on Android.3 Chrome and Safari require at least two SCTs.4 CAs therefore log the publicly trusted certificates they issue; Let's Encrypt states that it submits all the certificates it issues.5

A certificate can carry several names in its Subject Alternative Name (SAN) field.6 Each of those names becomes public once the certificate is logged. RFC 9162, the current CT standard, describes this under "Leakage of DNS Information": logs reveal domain names "that might not otherwise be easy to discover", and some labels show which service or software a host runs.7 Automated bots read new log entries and send requests to a newly certified domain shortly afterwards.6

Example

A developer sets up staging.example.com for testing and lets the hosting platform issue a certificate for it. Within about a day the name is in at least two public logs. Anyone who searches the logs for example.com sees it next to www.example.com, and crawling bots start to request its pages, although the name was never linked from anywhere. In 2016 a SANS Internet Storm Center diary showed how a log search for the word "internal" turned up host names such as vpn. and upstest2. under company domains.8

Other sources

Table 1. Sources of subdomain names besides CT logs
SourceWhat it returnsNotes from the sources
DNS zone transferA copy of every record in the zone, if the name server allows itLargely refused by name servers today2
Inverse (PTR) queryThe name recorded for an IP addressWorks only where such a record exists2
Web-based DNS search, reverse-IP servicesNames a service has seen for a domain or an addressPartial and differing results; testers combine several2
Passive DNS databasesNames already seen in DNS, including hosts covered by a wildcard certificate9ATT&CK sub-technique T1596.0011

Wildcard certificates

A wildcard certificate names *.example.com and not the individual hosts, so the hosts it covers do not appear in CT logs.9 Let's Encrypt issues wildcards only through the DNS-01 challenge.6 The names can still leak through passive DNS, and participants in the same Let's Encrypt forum thread advise against relying on the secrecy of a name.9

Defence

The search runs on other people's systems, so no control on the target's side can prevent it; defenders can only limit what outside parties learn.1 Log entries cannot be deleted, so a host name on a publicly trusted certificate stays readable by anyone.

Searching the logs for one's own domain at intervals shows the names others can see and any certificate issued without permission.8 A CT monitor sends a message each time a certificate for the domain is logged.4 In Cloudflare, the setting is on the Edge Certificates page: turn on Certificate Transparency Monitoring and select Add Email. Only the issuing CA can revoke a certificate that was issued wrongly.10

A zone transfer can be tested with the host command; the expected answer is REFUSED:2

host -l example.com ns1.example.com

In SecFlash

SecFlash lists the live subdomains it finds for an app as SF-SEC-304 on the Security page. When a certificate was issued for a test or staging name that SecFlash could not reach, it reports SF-SEC-306 on the same page. A subdomain that can be taken over has its own codes, described in Subdomain takeover.

See also

References

  1. a b c d MITRE (2025). "Search Open Technical Databases: Digital Certificates, T1596.003". MITRE ATT&CK.
  2. a b c d e f OWASP. "Enumerate Applications on Webserver (WSTG-INFO-04)". OWASP Web Security Testing Guide v4.2.
  3. a b c Mozilla (2026). "Certificate Transparency". MDN Web Docs.
  4. a b c Certificate Transparency project. "How CT works". certificate.transparency.dev.
  5. back Let's Encrypt (2026). "Certificate Transparency (CT) Logs". letsencrypt.org.
  6. a b c Let's Encrypt. "FAQ". letsencrypt.org.
  7. back IETF (December 2021). "RFC 9162: Certificate Transparency Version 2.0", section 11.5. RFC Editor.
  8. a b Ullrich, J. (3 August 2016). "The Dark Side of Certificate Transparency". SANS Internet Storm Center.
  9. a b c Let's Encrypt Community Support (27 May 2020). "Transparency logs for wildcard subdomains and expired certs". community.letsencrypt.org (forum thread).
  10. back Cloudflare. "Certificate Transparency Monitoring". Cloudflare SSL/TLS docs.