Reconnaissance, Scanning and Enumeration · PTES: Intelligence gathering
L10. Passive Reconnaissance Within Scope
Gather information about an in-scope target without sending packets to it, using DNS and certificate transparency.
Lesson 10 of 21 · About 30 minutes including the lab
By the end of this lesson you can
- Explain the difference between passive and active reconnaissance.
- Query A and MX DNS records with dig.
- Use Certificate Transparency (crt.sh) to discover hostnames.
- Keep newly discovered assets out of scope until the client confirms them.
Video transcript
Before the first packet. What can you learn quietly? Passive reconnaissance collects public information without sending test traffic to the target. It still has to stay within the agreed scope. Look up the domain’s address, mail and text records in public DNS. Certificate transparency logs list host names that received public certificates. Every name you find is checked against the scope before anyone tests it. DNS, certificate logs and the company’s own public pages. Scanning and probing need explicit permission for each host. Record every source and the date you checked it. Check each new host name against the scope. Send no traffic to hosts you have not been cleared to test. Recon shapes the whole test. Review it in the knowledge check.
Course outlineLesson 10 of 21
Lesson notes
Passive reconnaissance collects information from public sources without talking to the target’s systems. Active reconnaissance sends packets to the target. The rules of engagement often allow broad passive work and restrict active work to named hosts and windows.
DNS is a good first source. An A or AAAA record maps a name to an address. An MX record names the mail servers. An NS record names the authoritative name servers. A TXT record can hold SPF, DKIM and DMARC policy. None of these queries touch the target’s web servers; they query public DNS.
Certificate Transparency (CT) is a public log of every certificate issued by publicly trusted certificate authorities. Searching a CT index such as crt.sh for a domain often reveals hostnames that do not appear in DNS zone transfers or public websites, for example staging.example.com or vpn.example.com. Record them; do not scan them until the client confirms ownership and adds them to scope.
Other useful passive sources include WHOIS (ownership and contact details), the organization’s own security.txt, job postings that name technologies, and archived pages. Stick to published data. Do not create fake accounts, scrape behind logins or social-engineer employees for recon.
example.com and example.org are reserved for documentation (RFC 2606). Use them when you want a safe public domain to practice dig against. Do not treat every hostname you find for a real organization as fair game.
Commands and expected output
Resolve a name to an IPv4 address
dig +short example.com AOutput
104.20.23.154
172.66.147.243Answer returned for example.com on 22 November 2026 (checked via a public DNS resolver). These addresses belong to the hosting provider and change over time, so yours may differ. dig returned two IPv4 addresses without contacting the web server itself.
List mail exchangers
dig example.com MX +noall +answerOutput
example.com. 3600 IN MX 0 .Each answer line is name, TTL (seconds, varies), class, type, then preference and mail host. example.com publishes a “null MX” (preference 0, host “.”, RFC 7505), which means it accepts no mail. Most domains list real mail servers here instead.
Search Certificate Transparency for hostnames
curl -s "https://crt.sh/?q=%25.example.com&output=json" | head -c 400crt.sh returns JSON of certificates matching the query. %25 is a URL-encoded %. Parse the common_name and name_value fields for hostnames. Rate-limit yourself, and treat every new name as out of scope until confirmed.
Hands-on labs
Practice only on these legal targets: your own local lab or machines a platform assigns to you. Never use these techniques on systems you do not have written permission to test.
TryHackMe
Passive ReconnaissanceComplete the Passive Reconnaissance room. Practice dig and whois against the targets the room authorizes.
Your local lab
CT search for a domain you ownIf you own a domain, search crt.sh for it and list every hostname. If you do not, use example.com and note which names appear.
Practice task
For example.com, capture dig A, dig MX and a short note from a crt.sh search. Write three bullets: what you learned, what you still do not know, and what you would ask a client before any active scan.
Key takeaways
- Passive recon does not send packets to the target; active recon does.
- DNS and Certificate Transparency often reveal more hosts than a website does.
- New hostnames are out of scope until the client confirms them.
- example.com is safe to query for practice; real organizations are not.
Framework mapping
Sources and further reading
1. What makes reconnaissance “passive”?
2. Which dig query lists mail servers for a domain?
3. crt.sh reveals staging.example.com for your client. What should you do first?
4. Why is example.com a good practice target for dig?