Skip to content

Recon Methodology: How Real Hunters Map a Target

4 min readBug Hunting for Beginners

Recon is the part where most beginners under-invest. The hunters who win consistently spend 60-70% of their time on recon and surface mapping; only the remaining 30-40% is actual vulnerability testing.

The reason: in mature programs, the bugs aren’t on the obvious endpoints. The login page has been tested by 50,000 people. The bug is on dev-staging-internal-api.target.com/v2/admin/feature-toggles that was deployed two weeks ago and nobody’s looked at yet.


flowchart TD
  P1["Phase 1: Scope Mapping"] --> P2["Phase 2: Passive Subdomain Enum"]
  P2 --> P3["Phase 3: Active Resolution (Liveness)"]
  P3 --> P4["Phase 4: Content & URL Discovery"]
  P4 --> P5["Phase 5: JS Analysis"]
  P5 --> P6["Phase 6: Pattern Triage (gf)"]
  P6 --> P7["Phase 7: Automated Scanning (Nuclei)"]
  P7 --> P8["Phase 8: Surface Map & Prioritize"]
  
  style P1 fill:#ffeb99,stroke:#333,stroke-width:1px,color:#000
  style P2 fill:#b3d9ff,stroke:#333,stroke-width:1px,color:#000
  style P3 fill:#99ff99,stroke:#333,stroke-width:1px,color:#000
  style P4 fill:#99ff99,stroke:#333,stroke-width:1px,color:#000
  style P5 fill:#99ff99,stroke:#333,stroke-width:1px,color:#000
  style P6 fill:#99ff99,stroke:#333,stroke-width:1px,color:#000
  style P7 fill:#99ff99,stroke:#333,stroke-width:1px,color:#000
  style P8 fill:#ffeb99,stroke:#333,stroke-width:1px,color:#000

Phase 1: Scope Mapping (Don’t Skip This)

Section titled “Phase 1: Scope Mapping (Don’t Skip This)”

Read the program’s scope page twice. Note:

  • In-scope domains (wildcards vs specific hosts)
  • Out-of-scope assets (these are landmines)
  • Out-of-scope vulnerability classes (e.g., “self-XSS”, “CSRF on logout”, “missing security headers”)
  • Payout tiers and severity definitions
  • Safe harbor language
  • Any “no automated scanning” rules and at what rate

Keep this in your program notes file. You’ll come back to it.

The goal: find every subdomain the company exposes without sending a packet to their infrastructure.

Terminal window
TARGET="target.com"
mkdir -p ~/hunts/$TARGET/recon
cd ~/hunts/$TARGET/recon
# Source 1: subfinder (40+ sources with API keys)
subfinder -d $TARGET -silent -all -recursive -o subfinder.txt
# Source 2: assetfinder
assetfinder --subs-only $TARGET > assetfinder.txt
# Source 3: crt.sh (Certificate Transparency)
curl -s "https://crt.sh/?q=%25.$TARGET&output=json" | \
jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u > crtsh.txt
# Source 4: Chaos (ProjectDiscovery Database)
curl -s "https://dns.projectdiscovery.io/dns/$TARGET/subdomains" \
-H "Authorization: $CHAOS_API_KEY" | jq -r '.[]' > chaos.txt
# Source 5: GitHub (Find subdomains leaked in public repos)
github-subdomains -d $TARGET -t $GITHUB_TOKEN -o github.txt
# Merge and deduplicate
cat *.txt | anew all_subs.txt
echo "Total unique subdomains: $(wc -l < all_subs.txt)"

Now we send packets.

Terminal window
# 1. Resolve everything to find what actually has DNS
dnsx -l all_subs.txt -silent -a -resp -o resolved.txt
# 2. Probe for live HTTP services (Find the web servers)
httpx -l all_subs.txt \
-p 80,443,8080,8443,8888,3000,5000,8000,9000 \
-silent -title -sc -ip -tech-detect -web-server \
-o live_hosts_full.txt
# 3. Extract just the URLs for the next pipeline steps
cat live_hosts_full.txt | awk '{print $1}' | anew live_urls.txt

We know the servers exist. Now we need the endpoints.

Terminal window
# Crawl the live hosts for links
katana -list live_urls.txt -d 3 -jc -kf all -silent -o crawled.txt
# Historical URLs (Huge for finding deprecated endpoints that still work)
cat live_urls.txt | waybackurls | anew historical.txt
cat live_urls.txt | gau --subs --threads 5 | anew historical.txt
# Merge all URLs found
cat crawled.txt historical.txt | anew all_urls.txt
# Extract URLs with parameters (IDOR/SQLi/XSS candidates)
grep '?' all_urls.txt | anew param_urls.txt
# Extract JS files
grep -E '\.js(\?|$)' all_urls.txt | anew js_files.txt

Phase 5: JavaScript Analysis (The 2026 Goldmine)

Section titled “Phase 5: JavaScript Analysis (The 2026 Goldmine)”

Modern web apps push 80% of their logic into the browser. JS files contain:

  • Hardcoded API endpoints
  • Internal routes not linked from anywhere
  • Feature flags
  • Hardcoded credentials, API keys, AWS keys (yes, still in 2026)
  • Comments referring to staging or test infrastructure
Terminal window
# Download interesting JS files
mkdir js_files && cd js_files
while read url; do
wget -q "$url" -O $(echo "$url" | md5sum | cut -d' ' -f1).js
done < ../js_files.txt
# Extract endpoints with LinkFinder or Fabric
for f in *.js; do
python3 ~/tools/LinkFinder/linkfinder.py -i $f -o cli
done > endpoints.txt
# Hunt for secrets with SecretFinder or simple regex
grep -Eohr 'AKIA[0-9A-Z]{16}' . | sort -u # AWS access keys
grep -Eohr 'sk_live_[0-9a-zA-Z]{24,}' . | sort -u # Stripe live keys
grep -Eohr '["\x27][a-zA-Z0-9_-]{32,}["\x27]' . | head -50 # Long string candidates
Terminal window
# Classify URLs by likely vuln class
cat all_urls.txt | gf idor > candidates_idor.txt
cat all_urls.txt | gf ssrf > candidates_ssrf.txt
cat all_urls.txt | gf xss > candidates_xss.txt
cat all_urls.txt | gf sqli > candidates_sqli.txt
cat all_urls.txt | gf redirect > candidates_redirect.txt
cat all_urls.txt | gf debug > candidates_debug.txt

Run Nuclei to catch misconfigurations and CVEs.

Terminal window
# Broad scan — EXCLUDE dos and intrusive templates!
nuclei -l live_urls.txt \
-severity medium,high,critical \
-etags dos,intrusive,fuzz \
-rate-limit 50 \
-c 25 \
-o nuclei_results.txt
# Targeted scans (Often yield better signal-to-noise)
nuclei -l live_urls.txt -t takeovers/ -o takeovers.txt
nuclei -l live_urls.txt -t exposures/ -o exposures.txt
nuclei -l live_urls.txt -t misconfiguration/ -o misconfig.txt
nuclei -l js_files.txt -t exposures/ -o js_exposures.txt

At this point you should have:

  • 50-500 live hosts
  • Thousands of URLs
  • Dozens of JS endpoints
  • Maybe 10-30 Nuclei findings (mostly informational, some real)

Stop automating. Start thinking.

Prioritize manual testing based on ROI:

  1. API endpoints with numeric IDs (/api/v2/users/123, /orders/45678) → IDOR
  2. File upload features → XSS, RCE, path traversal
  3. OAuth/SSO flows → auth bypass, account linking
  4. Search and filter inputs → SQLi, SSTI (server-side template injection), XSS
  5. Admin / debug / staging endpoints discovered via JS or wayback → auth bypass, info disclosure
  6. Subdomain takeovers from nuclei output → claim and demonstrate impact
  7. Old/forgotten subdomains running default-credentialed software

Every professional hunter develops this rhythm:

  1. The Mechanical Eye: Mechanically test every endpoint for common bugs (IDOR, SSRF basics). This finds the duplicates everyone else found.
  2. The Business Eye: Slow down and ask: “What does this app actually do? How does it make money? What would be disastrous if it broke?”
    • If it’s a ride-sharing app, figure out how to assign yourself a premium car for a basic price.
    • If it’s a B2B SaaS, figure out how to view another tenant’s invoice.

The Mechanical Eye finds $250 bugs. The Business Eye finds $5,000 bugs.

The pipeline above still works. What changed is what you are allowed to do with the output.

Inventory is a list of hosts, URLs, and template hits. In 2026 that list got cheap, and triage started treating unreviewed scanner output as noise. Keep the list. Do not submit it.

Architecture is a sentence you can test. This API version does not share the new role check. This bundle calls a route the UI never renders. This forgotten host uses the same identity provider as the main app. This worker runs after the request handler has already said yes.

When you prioritize in Phase 8, prefer a hypothesis you can confirm with two accounts over another five hundred subdomains. The numbers behind that choice are in Section 16. The questions to ask of a single feature are in Section 19.

Next step: if a WAF blocks your scans, read Section 6a. Otherwise move on to the bug classes in Section 7.

Connections3 backlinks · 12 outgoing · 7 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Bug Hunting for BeginnersFor authorized testing only. Read the ethics note before you put a domain in scope.