Passive Subdomain Enumeration
Last updated
Was this helpful?
Last updated
Was this helpful?
Passive subdomain enumeration is a technique used to discover subdomains without directly interacting with the target’s infrastructure. Instead, it relies on publicly available data sources such as search engines, public DNS records, certificate transparency logs, and third-party services like VirusTotal
, SecurityTrails
, or Shodan
.
Content Security Policy (CSP) header allows administrators to specify which domains and subdomains are allowed to load content such as scripts, frame sources, image sources, etc.
The following curl
command can be used to extract domains from the CSP header:
Subdomain enumeration via favicon hashes is a passive technique that identifies related domains by hashing a website's favicon (the small icon in the browser tab) and comparing it to hashes of other sites. Here's the process:
Fetch the favicon from https://domain.com/favicon.ico
and hash it using MurmurHash3.
Search for the hash in platforms like Shodan or Censys, which index the internet's favicon hashes.
Discover related subdomains: Sites sharing the same favicon hash often belong to the same organization. This can reveal hidden subdomains.
Let's use it with Shodan:
When a website uses an SSL/TLS certificate, it often includes a field called SAN
(Subject Alternative Name) that contains a list of all domains and subdomains for which the certificate is valid.
The following command initiates a connection to <DOMAIN>
using SSL/TLS to retrieve the certificate, then extracts and formats the subdomains from the SAN field for readability:
The following command fetches data from web archives and extracts the unique subdomains found:
Tools:
Requires API Key.
Default scan will bruteforce, be careful.
Documentation in english here.
Security Trails API -> https://api.securitytrails.com
Alien Vault OTX API -> https://otx.alienvault.com/api
URLScan -> https://urlscan.io
HackerTarget -> https://hackertarget.com
Pentest-Tools -> https://pentest-tools.com
DNSdumpster -> https://dnsdumpster.com