πŸ›‘οΈ Methodology Checklist

  • Query crt.sh: curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq .
  • Filter unique subdomains from CT results
  • Cross-reference subdomains with DNS resolution
  • Look for internal/staging subdomains in CT logs
  • Check expired certs for historical subdomain exposure
  • Add confirmed live subdomains to scope list

🎯 Operational Context

Think Dumber First: curl -s "https://crt.sh/?q=%25.[DOMAIN]&output=json" | jq -r '.[].name_value' | sort -u β€” run this before anything else. CT logs are completely passive, leave zero footprint on target, and regularly reveal internal subdomains, staging servers, and dev environments that aren’t in DNS.

When you land here: Starting web recon on a domain. CT logs first (passive), then verify discovered subdomains with DNS lookup, then active probing of responsive hosts. CT log entries often include wildcard certificates that reveal internal naming conventions.


⚑ Tactical Cheatsheet

CommandTactical Outcome
curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq -r '.[] | .name_value' | sort -uExtract all subdomains from CT logs
curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq -r '.[] | select(.name_value | contains("dev")) | .name_value' | sort -uFilter CT results for β€œdev” entries
curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq -r '.[] | .name_value' | sed 's/\*\.//g' | sort -u > crt_sh_results.txtExport to file with wildcard removal

πŸ”¬ Deep Dive & Workflow

What Are CT Logs?

Public, append-only ledgers that record every SSL/TLS certificate issued by a Certificate Authority (CA). Browsers use them to detect rogue certificates. Attackers use them to find subdomains.

Integrity mechanism: Merkle Tree structure β€” any change to a cert changes the root hash β†’ tamper-proof log.

SCT (Signed Certificate Timestamp): Cryptographic proof that a cert was submitted to the log β€” included in the cert itself.

Why CT Logs Are Valuable for Recon

  1. Definitive β€” Subdomains listed must have existed to get a valid certificate
  2. Historical β€” Shows old/expired certs β†’ legacy subdomains missed by brute-forcing
  3. Comprehensive β€” Reveals β€œhidden” subdomains (e.g., dev-internal.target.com) not in standard wordlists

Search Tools

ToolProsUse Case
crt.shFree, no registration, simple UIQuick subdomain discovery
CensysAdvanced filtering, API accessDeep analysis, related hosts

What to Look For

TypeExamples
VPNs/Portalsvpn.target.com, citrix.target.com
Dev/Stagingdev.target.com, stg.target.com, test.target.com
LegacyOld subdomains β†’ unpatched servers
Internalpayroll.target.com, internal.target.com

jq Filtering

# All subdomains
jq -r '.[] | .name_value'
 
# Filter for specific keyword
jq -r '.[] | select(.name_value | contains("dev")) | .name_value'
 
# Remove wildcard prefixes
sed 's/\*\.//g'

Exam Strategy

  • Run CT log query immediately during passive recon β€” it’s completely silent (no target contact)
  • Run before brute-forcing β€” often finds subdomains not in any wordlist
  • Combine results with brute-force output into a master list

πŸ› οΈ Troubleshooting & Edge Cases

ProblemCauseFix
crt.sh query returns empty JSONDomain too new or no certs issuedCheck older TLD variants; try censys.io search; verify domain spelling
jq parsing failsMalformed JSON from crt.shAdd error handling: curl -s ... | python3 -m json.tool | ...; retry as crt.sh can return 500 errors under load
CT logs show hundreds of subdomainsNeed to filter for live targetsPipe through dnsx: cat subdomains.txt | dnsx -resp -a to resolve only live hosts
Subdomain found in CT but not resolvingDNS record removed but cert still loggedCT logs are historical; removed subdomains may have been retired; still useful for naming convention patterns
Internal subdomains (dev.internal.corp.com) in CTCertificate issued for internal name accidentallyThis IS the finding β€” document internal hostname exposure via public CT logs

πŸ“ Reporting Trigger

Finding Title: Internal Subdomain / Staging Environment Exposure via Certificate Transparency Logs Impact: Internal hostnames, development environments, and staging servers discoverable by any attacker via public CT log search. May expose internal network topology. Root Cause: TLS certificates issued for internal/staging hostnames using public CA, resulting in automatic CT log submission. Recommendation: Use private PKI for internal systems. Implement wildcard certificates for internal domains to prevent specific hostname disclosure. Audit all CT log entries for unintended internal hostname exposure.