Skip to main content
Be Bitwise

Reconnaissance & Target Enumeration

Bug Bounty Methodology · Bug Bounty track

5 min read

In this module

Mapping the Attack Surface

Reconnaissance is where every productive engagement starts. Before you can find a vulnerability, you have to know what's actually there: every subdomain, every endpoint, every framework in the stack. Thorough recon is what separates the researchers who find quirky, unique bugs from the ones who only ever poke at the front door.

Subdomain Enumeration

When a programme scopes *.example.com, the first job is figuring out which subdomains actually exist. Each one may host a different application, API, or service, and each is a target in its own right.

Each stage of recon narrows the previous stage's output and feeds the next, so it's worth seeing the whole pipeline before the individual tools. The sample inputs and outputs are illustrative, but the shape is what you'll get on a real programme: a long list of names shrinking to a short list of live, fingerprinted hosts with paths worth testing.

Passive enumeration collects subdomains without sending a single packet at the target. Sources include certificate transparency logs, DNS datasets, and search engine indexes:

bash
# Subfinder: passive subdomain discovery from multiple sources
subfinder -d example.com -o subdomains.txt
# Amass: deeper coverage, combines passive and active techniques
amass enum -passive -d example.com -o amass-results.txt
# Certificate Transparency: query crt.sh directly
curl -s "https://crt.sh/?q=%25.example.com&output=json" | \
jq -r '.[].name_value' | sort -u

Active enumeration sends DNS queries to discover subdomains through brute-forcing with wordlists:

bash
# DNS brute-forcing with a wordlist
gobuster dns -d example.com -w /path/to/wordlist.txt -t 50

Combine passive and active results, remove duplicates, and verify which subdomains resolve to live hosts:

bash
# Check which subdomains are alive
cat all-subdomains.txt | httpx -silent -o alive-hosts.txt

Content Discovery

Once you have your list of live hosts, start digging for hidden directories, files, and endpoints on each one. Most applications quietly expose admin panels, backup files, configuration endpoints, and deprecated functionality that nobody bothered to link from the front-end.

bash
# Directory brute-forcing with ffuf
ffuf -u https://target.example.com/FUZZ -w /path/to/wordlist.txt \
-mc 200,301,302,403 -o results.json
# Gobuster for directory discovery
gobuster dir -u https://target.example.com -w /path/to/wordlist.txt \
-x php,asp,aspx,jsp,html,js,json -t 30
Wordlist Selection Matters

The quality of your content discovery depends entirely on your wordlist. Generic wordlists miss application-specific paths. Build custom wordlists from the target's JavaScript files, disclosed reports, and technology-specific paths. Tools like cewl can generate wordlists from the target's own content. Combine generic wordlists (like SecLists) with custom entries for the best coverage.

JavaScript Analysis

Modern web apps shove a lot of logic into client-side JavaScript. Those bundles routinely leak API endpoint paths, authentication tokens, internal URLs, and configuration data the developers never meant for prying eyes.

bash
# Extract JavaScript files from a target
cat alive-hosts.txt | getJS --complete -o js-files.txt
# Search JavaScript files for sensitive patterns
cat js-files.txt | xargs -I{} curl -s {} | \
grep -Ei "(api_key|apikey|secret|token|password|endpoint|/api/v[0-9])"

Look for:

  • API endpoint paths (/api/v2/admin/users)
  • Hardcoded credentials or API keys
  • Internal hostnames and IP addresses
  • Hidden functionality toggled by feature flags
  • Comments containing developer notes

Technology Fingerprinting

Knowing the stack tells you which vulnerability classes are worth chasing. A PHP application carries a different risk profile from a Node.js or Java one.

Identify technologies through:

  • HTTP response headers: X-Powered-By, Server, X-AspNet-Version
  • Cookie names: PHPSESSID (PHP), JSESSIONID (Java), connect.sid (Express)
  • HTML source: framework-specific meta tags, CSS class naming conventions
  • Browser extensions: Wappalyzer identifies frameworks, CMS, and libraries
  • Error pages: default error pages reveal the server software and framework
text
Common fingerprints:
WordPress: /wp-admin/, /wp-content/, wp-login.php
Django: csrfmiddlewaretoken, __debug__/
Laravel: XSRF-TOKEN cookie, /telescope
Spring Boot: /actuator, /health, /env
ASP.NET: .aspx extensions, __VIEWSTATE

Port Scanning and Service Identification

Web apps live on 80 and 443, but targets often expose plenty more if you bother to look. Development servers, database admin panels, monitoring dashboards, forgotten legacy services — all are fair game on a routine scan.

bash
# Quick scan of common ports
nmap -sV --top-ports 1000 target.example.com
# Full port scan (slower, more thorough)
nmap -sV -p- target.example.com -T4

Always check the programme's rules of engagement before you start scanning. Some programmes ban aggressive scanning outright; others restrict testing to specific ports. Scan responsibly. Use sensible rate limits, and don't take a service offline to find a bug.

Organising Recon Output

Recon generates more data than you'd think. Organise it systematically:

text
recon/
├── subdomains.txt # All discovered subdomains
├── alive-hosts.txt # Subdomains that resolve to live services
├── technologies.md # Technology stack per host
├── endpoints/
│ ├── api-endpoints.txt # Discovered API paths
│ └── js-extracted.txt # Endpoints from JavaScript analysis
└── ports/
└── nmap-results.xml # Port scan results

Recon isn't a one-shot job. Revisit your enumeration regularly. Organisations spin up new subdomains, ship new features, and expose new services every week. The researchers who watch the attack surface drift over time are the ones who keep finding bugs after everyone else has moved on.