
Recon Part 2: Going Active
Part 1 gave you a silent map. Certificate transparency, passive sources, old URLs, and search dorks turned one domain into a list of hundreds of subdomains, without the target ever seeing you. But a list of names is not a target. Half those names are dead, parked, or out of scope. Today you find out which ones are actually alive, what they run, and which ones are worth your time.
This is Part 2 of the three part recon block. We are going active now, which means we interact with the target directly, so the scope rule becomes load bearing. Everything from here only runs against assets the program explicitly allows. Passive recon is legal anywhere. Active recon against a target you are not authorized to touch is not, and no finding is worth that.
Quick recap of the three parts:
- Part 1, done: passive recon and subdomain enumeration
- Part 2, today: live hosts, DNS enumeration, port scanning with nmap, technology fingerprinting
- Part 3, next: content discovery, parameter mining, JavaScript secrets, and turning the map into attack surface
From names to live hosts
Start with the all_subs.txt you built in Part 1. Most of those names will not resolve or will not answer. The first active step is to find the ones that do.
Probe for live HTTP and HTTPS services with httpx:
# which subdomains actually answer, with status, title, and tech
cat all_subs.txt | httpx -silent -status-code -title -tech-detect -o live_hosts.txt
head live_hosts.txt
# https://staging.example.com [200] [Admin Login] [nginx, PHP]
# https://api.example.com [401] [] [Kong, API]
# https://old.example.com [200] [Index of /] [Apache]
Three signals per line, and all three are recon gold:
- Status code. 200 is live and open. 401 or 403 is live but protected, often more interesting, because something is being guarded. 301 or 302 tells you where it redirects.
- Title. “Admin Login”, “Staging”, “Index of /”, “Dashboard” on a host nobody links to is exactly the forgotten corner bugs live in.
- Tech. The stack per host, which tells you what classes of bug to even look for.
Pull the interesting ones into their own list:
# hosts that smell forgotten or sensitive
grep -iE 'admin|staging|dev|test|internal|old|dashboard|index of' live_hosts.txt > interesting.txt
DNS enumeration: where do these point
Before scanning ports, understand the DNS layer. Where a host points tells you what it is and sometimes hands you a bug directly.
Resolve records with dnsx:
# A records: the IPs behind each host
cat all_subs.txt | dnsx -silent -a -resp > resolved.txt
# CNAME records: what third-party services hosts point to
cat all_subs.txt | dnsx -silent -cname -resp > cnames.txt
Why CNAMEs matter: subdomain takeover. A CNAME pointing at a service that no longer exists, an unclaimed S3 bucket, a deleted Heroku app, a dangling Azure resource, means you can claim it and own the subdomain. This is the Ford bug from Day 1 (https://hackerone.com/reports/484420) and the WebSummit S3 case (https://hackerone.com/reports/193056). Scan your CNAMEs for third party services and check whether the target still exists:
# flag CNAMEs pointing at common takeover-prone services
grep -iE 's3|cloudfront|herokuapp|github.io|azurewebsites|fastly|netlify|wordpress.com' cnames.txt
Any hit here is a lead worth verifying carefully, inside scope.
Group hosts by IP. Hosts sharing an IP often share infrastructure and ownership. Reverse the resolved list to cluster them:
# sort by IP to see which hosts live together
sort -t' ' -k2 resolved.txt | awk '{print $2, $1}' | sort | head -40
A cluster of hosts on one IP range is often one application or one team’s infrastructure, and a bug on one frequently applies to its neighbors.
Port scanning with nmap
Web ports are not the only surface. Databases, admin panels, dev servers, and management interfaces often sit on non standard ports and get forgotten. nmap is how you find them. Confirm port scanning is allowed in scope first, some programs restrict it.
Fast first pass, find open ports quickly:
# collect unique IPs from your resolution step
awk '{print $2}' resolved.txt | sort -u > ips.txt
# fast scan of the most common ports across all IPs
nmap -iL ips.txt -T4 --top-ports 1000 -oA nmap_fast
Flags explained, because you should know what you run:
-iL ips.txt reads targets from your file
-T4 is a faster timing template, reasonable for most programs, drop to -T3 if asked to be gentle
--top-ports 1000 scans the 1000 most common ports, a good speed to coverage trade
-oA nmap_fast saves output in all formats for later parsing
Deep scan the hosts that showed something interesting:
# service + version detection on specific hosts with open ports
nmap -sV -sC -p- interesting-host.example.com -oA nmap_deep
-sV probes each open port for the exact service and version, which maps straight to known CVEs
-sC runs nmap’s default safe scripts, which surface common misconfigurations
-p- scans all 65535 ports, slow but thorough, for a host you suspect is forgotten
A database port open to the internet, an old admin panel on 8080, a dev server on 3000, these are the finds that justify the scan.
Technology fingerprinting
Knowing the exact stack per host tells you which bugs to even hunt. A WordPress host, a Rails app, and a custom PHP panel have completely different common weaknesses.
Deeper fingerprinting than httpx gives:
# whatweb: detailed tech fingerprint per host
cat live_hosts.txt | awk '{print $1}' | while read url; do
whatweb -q "$url"
done > whatweb.txt
Look specifically for:
- Versions. An outdated CMS, framework, or server version maps directly to public CVEs you can check.
- Known software. Off the shelf software, a WordPress, a Jira, a GitLab, has known issue classes and often known default paths.
- Mismatches. A host running something very different from the rest of the estate is often older, acquired, or forgotten, which is where attention has lapsed.
The output of Part 2: a live, detailed map
Your target folder has grown from names to a real picture:
target/
scope.txt
all_subs.txt # Part 1 passive list
live_hosts.txt # resolved, status + title + tech
interesting.txt # forgotten / sensitive hosts
cnames.txt # CNAME records (takeover leads)
resolved.txt # A records / IPs
nmap_fast.* # open ports across the estate
nmap_deep.* # service + version on key hosts
whatweb.txt # detailed tech per host
You now know not just what exists, but what is alive, where it points, what ports it exposes, and what it runs. That is a target you can actually hunt on, and most hunters never build it this thoroughly, which is your edge.
Tools to install for Part 2
go install github.com/projectdiscovery/httpx/cmd/httpx@latest
go install github.com/projectdiscovery/dnsx/cmd/dnsx@latest
# nmap and whatweb from your package manager
sudo apt install -y nmap whatweb
Homework for Part 2
- Take your
all_subs.txt from Part 1. Confirm the wildcard is in scope and that active scanning is allowed.
- Run httpx to build
live_hosts.txt with status, title, and tech. Pull the forgotten looking ones into interesting.txt.
- Run dnsx for A and CNAME records. Scan the CNAMEs for takeover prone services and note any leads.
- Run the fast nmap pass across your resolved IPs, then a deep
-sV -sC scan on two or three of your most interesting hosts.
- Fingerprint your live hosts and flag any outdated versions or off the shelf software with known issues.
By the end you have a live, detailed map: what is alive, where it points, what ports are open, and what each host runs. That is the raw material Part 3 turns into real attack surface.
Part 3 goes into content discovery and attack surface mapping: directory and file bruteforcing, parameter mining, extracting endpoints and secrets from JavaScript, and assembling everything into a prioritized list of places to actually start hunting bugs.