Footprinting & Passive Reconnaissance
foundational 30 min

DNS enumeration and subdomain discovery

Discover subdomains, virtual hosts and stale records, including a zone transfer when the server allows it.

digdnsreconamassgobuster

From one name to the whole estate

DNS is the cheapest way to find hosts an organisation forgot. Start with the records at the apex — NS, MX, TXT, CAA — then expand outward.

Zone transfer first

Misconfigured authoritative servers still answer AXFR and hand over the entire zone in one response. It either works completely or is refused; there is no partial result. Always try it before brute forcing.

Guessing names

When AXFR is refused, resolve a wordlist. dnsrecon or amass enum both work; passive mode uses public sources instead of querying the target. Remember wildcard DNS makes every name appear to resolve — always test a random subdomain first and discard results if it answers.

Read the CNAMEs

A subdomain pointing at a third-party app that no longer exists is a subdomain takeover. Also check for internal naming leaking through CNAMEs to cloud load balancers.

Virtual hosts

One IP often serves many names. Once you have candidates, send the Host header manually — curl -H 'Host: admin.example.com' http://10.0.0.5 — or brute force vhosts with gobuster. A different response length means a different site.

Practice commands locked

Commands unlock once you hold an active authorization scope and a verified isolated lab. The lesson text, the attack/defence panel and the knowledge check stay open.

  • · Authorization scope: none active
  • · Lab isolation: no profile recorded
Open the safety center
Attacker's view

The full internal naming scheme, admin panels, staging and VPN endpoints, and stale records pointing at third-party services that can be claimed.

Countermeasure

Restrict transfers in BIND with allow-transfer { 10.0.0.53; }; and deny everywhere else. Enable Response Rate Limiting so your resolvers cannot be used for enumeration. Remove stale records monthly, and claim or delete third-party endpoints before pointing a CNAME at them so takeover is impossible.

Detection signals
  • Log and alert on AXFR requests from any host that is not a known secondary
  • Alert when one client generates a high volume of NXDOMAIN responses
  • Track first-seen subdomains and review anything that appears without a change ticket
  • Feed new DNS names into your inventory so unknown hosts are noticed within a day

Knowledge check

Sign in to take the knowledge check, save your score and unlock the next lesson in the path.

Hacker fact

Port 31337 is leetspeak for "eleet" (elite) and became the signature backdoor port of the Back Orifice trojan in 1998.

Stay Ethical

Real Hackers protect systems

Practice only against systems you own or have written authorization to test. Scanning networks without permission is illegal in most jurisdictions.

Pass the knowledge check above to unlock the next lesson.