Reconnaissance Workflow: Complete Information Gathering Process
Learn a complete reconnaissance workflow combining OSINT, DNS enumeration, subdomain discovery, and active scanning for comprehensive target profiling.
Structured Intelligence Collection
Reconnaissance is the systematic process of gathering intelligence about a target before any engagement. A structured workflow ensures methodical coverage, avoids gaps in data collection, and produces repeatable, verifiable results. This methodology combines passive intelligence gathering (leveraging public sources without target interaction) with active probing to build a comprehensive target profile.
Prerequisites
Before using this workflow, you should understand:
Reconnaissance Phases
Phase 1: Passive Reconnaissance (No Target Interaction)
Gather information without touching the target's infrastructure:
# 1. WHOIS Lookup
whois target.com
# 2. DNS Records
dig target.com ANY +short
dig target.com MX +short
dig target.com NS +short
dig target.com TXT +short
# 3. Certificate Transparency Logs
curl -s "https://crt.sh/?q=%25.target.com&output=json" | jq -r '.[].name_value' | sort -u
# 4. Google Dorking
site:target.com -www
site:target.com filetype:pdf
site:target.com inurl:admin
# 5. Social Media
# LinkedIn — Find employees and technologies
# Twitter — Support handles, status pages
# GitHub — Search for target.com in code
Phase 2: DNS Enumeration
# 1. Zone Transfer Attempt
for ns in $(dig target.com NS +short); do
dig @$ns target.com AXFR +short 2>/dev/null
done
# 2. Subdomain Brute Forcing
dnsrecon -d target.com -D /usr/share/wordlists/dns/subdomains-top1million-20000.txt -t brt
# 3. Amass Enumeration
amass enum -active -d target.com -brute -o amass_results.txt
# 4. Virtual Host Discovery
ffuf -w subdomains.txt:HOST -u https://TARGET_IP -H "Host: HOST.target.com" -fc 400,403,404
Phase 3: Active Scanning
# 1. Host Discovery
nmap -sn 203.0.113.0/24 -oA host_discovery
# 2. Port Scanning
nmap -sS -T4 -p- --min-rate=10000 -iL live_hosts.txt -oA all_ports
# 3. Service Detection
nmap -sV -sC -T4 -iL live_hosts.txt -p $(paste -sd, open_ports.txt) -oA services
# 4. Vulnerability Scanning
nmap --script vuln -iL live_hosts.txt -p $(paste -sd, open_ports.txt) -oA vulns
Phase 4: Web Application Reconnaissance
# 1. Technology Detection
whatweb target.com
wappalyzer_cli target.com
# 2. Directory Brute Forcing
gobuster dir -u https://target.com -w /usr/share/wordlists/dirb/common.txt
ffuf -u https://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt
# 3. Parameter Fuzzing
ffuf -u 'https://target.com/page?FUZZ=test' -w parameters.txt
# 4. Spidering and Crawling
# Using Burp Suite Spider or ZAP Spider
# Extract endpoints from JavaScript
cat bundle.js | grep -oP '"/api/[^"]+"' | sort -u
Complete Automation Script
#!/bin/bash
# full-recon.sh — Complete reconnaissance workflow
# Usage: ./full-recon.sh target.com
DOMAIN=$1
OUTPUT_DIR="recon_$DOMAIN"
mkdir -p "$OUTPUT_DIR"
echo "[+] Starting reconnaissance for $DOMAIN"
date
echo ""
# === Phase 1: Passive Recon ===
echo "=== Phase 1: Passive Reconnaissance ==="
echo "[*] WHOIS Lookup"
whois "$DOMAIN" > "$OUTPUT_DIR/whois.txt"
echo "[*] DNS Records"
for type in A AAAA MX NS TXT SOA CNAME; do
dig "$DOMAIN" "$type" +short > "$OUTPUT_DIR/dns_${type}.txt"
done
echo "[*] Certificate Transparency"
curl -s "https://crt.sh/?q=%25.$DOMAIN&output=json" | jq -r '.[].name_value' | sort -u > "$OUTPUT_DIR/crt_sh.txt"
# === Phase 2: Subdomain Enumeration ===
echo "=== Phase 2: Subdomain Enumeration ==="
echo "[*] DNS Zone Transfer"
for ns in $(dig "$DOMAIN" NS +short 2>/dev/null); do
dig "@$ns" "$DOMAIN" AXFR +short 2>/dev/null >> "$OUTPUT_DIR/zone_transfer.txt"
done
echo "[*] Amass Enumeration"
amass enum -passive -d "$DOMAIN" -o "$OUTPUT_DIR/amass_passive.txt"
amass enum -active -d "$DOMAIN" -brute -o "$OUTPUT_DIR/amass_active.txt"
cat "$OUTPUT_DIR/amass_passive.txt" "$OUTPUT_DIR/amass_active.txt" | sort -u > "$OUTPUT_DIR/all_subdomains.txt"
echo "[*] Resolving Subdomains"
for sub in $(cat "$OUTPUT_DIR/all_subdomains.txt"); do
host "$sub" 2>/dev/null | grep "has address" >> "$OUTPUT_DIR/resolved.txt"
done
# === Phase 3: Port Scanning ===
echo "=== Phase 3: Port Scanning ==="
echo "[*] Extracting unique IPs"
awk '{print $NF}' "$OUTPUT_DIR/resolved.txt" | sort -u > "$OUTPUT_DIR/ips.txt"
echo "[*] Nmap Service Scan"
nmap -sV -sC -T4 -iL "$OUTPUT_DIR/ips.txt" -oA "$OUTPUT_DIR/nmap_scan"
# === Phase 4: Web Recon ===
echo "=== Phase 4: Web Reconnaissance ==="
echo "[*] Technology Detection"
while read -r sub; do
whatweb "$sub" >> "$OUTPUT_DIR/technologies.txt" 2>/dev/null
done < "$OUTPUT_DIR/all_subdomains.txt"
echo "[+] Reconnaissance complete!"
echo "Results saved to $OUTPUT_DIR/"
date
Data Correlation and Analysis
Finding Relationships
# Find IPs hosting multiple subdomains
awk '{print $1, $NF}' subdomains_and_ips.txt | sort -k2 | uniq -f1 -D
# Identify shared hosting
for ip in $(cat ips.txt); do
count=$(grep -c "$ip" subdomains_and_ips.txt)
echo "$ip: $count subdomains"
done | sort -t: -k2 -rn
# Find technologies used across assets
cat technologies.txt | sort | uniq -c | sort -rn
Attack Surface Visualization
# Create network map
echo "graph Target {" > attack_surface.dot
for sub in $(cat subdomains.txt); do
ip=$(host "$sub" | grep "has address" | awk '{print $NF}')
if [ -n "$ip" ]; then
echo " "$sub" -- "$ip";" >> attack_surface.dot
fi
done
echo "}" >> attack_surface.dot
dot -Tpng attack_surface.dot -o attack_surface.png
Real-World Application
Bug Bounty Reconnaissance
# Full recon pipeline for bug bounty
1. Passive recon: WHOIS, DNS, crt.sh, Google dorking
2. Subdomain enumeration: Amass, dnsrecon, Sublist3r
3. Live host detection: httprobe
4. Technology identification: whatweb
5. Directory brute forcing: ffuf, gobuster
6. Parameter discovery: Arjun
7. Screenshotting: Aquatone, gowitness
8. Vulnerability scanning: Nuclei
Penetration Test Engagement
# Week 1: External Reconnaissance
- Gather all public information
- Identify all external assets
- Map technology stack
- Find exposed services
# Week 2: Active Scanning
- Port and service scanning
- Vulnerability scanning
- Web application testing
- Network mapping
Common Mistakes
Skipping passive phase: Active scanning alerts defenders. Complete passive recon first.
Not documenting findings: Record everything — data becomes useful later in the engagement.
Being too noisy: Aggressive scanning triggers alarms. Start slow, escalate as needed.
Not verifying data: False positives waste time. Verify subdomains, port status, and vulnerabilities.
Best Practices
Related Tools
Related Articles
Summary
A complete reconnaissance workflow combines passive intelligence gathering, DNS enumeration, subdomain discovery, port scanning, and web application recon. Start passive, move to active, document everything, and iterate based on findings. Automating the workflow ensures consistency and repeatability across assessments.