Mapping builds the application's blueprint: every page, parameter, function, and role, before any attack begins. This skill covers the mapping phase of web tests: combining automated spidering with disciplined manual walkthroughs, discovering hidden content, and producing the map that prioritizes everything after. Rushed mapping is the top cause of missed vulnerabilities; the map is the test plan.
Quick Workflow
- Proxy all traffic and walk the application as each role, slowly.
- Spider from the walked pages to find linked content.
- Fuzz for hidden paths, files, and parameters.
- Map the API surface: endpoints, methods, and schemas.
- Note technologies, roles, and data flows as you go.
- Prioritize areas by sensitivity and complexity.
- Freeze the map and brief the team before exploitation starts.
1. Manual walkthrough
# Walkthrough discipline (in Burp, with the proxy on):
# - Visit every menu item, tab, and link as the lowest role first
# - Submit every form with benign data and watch the requests
# - Note which actions change data versus just display it
# - Repeat for each higher role; diff what appears
# Save the site map from Burp for the record
# Target -> Site map -> Save (or use the project file)
# Quick parameter inventory from the proxy history
# (Burp: filter by MIME type, export; or parse logs)
grep -o -E '\?[a-zA-Z_]+=' /tmp/proxy.log | sort | uniq -c | sort -rn | head -20
The manual walk finds what spiders miss: multi-step flows, JavaScript driven navigation, and role-specific content. Budget real hours for it; there is no automated substitute.
2. Content discovery
# Directory and file fuzzing with ffuf (stay in scope, respect rate limits)
ffuf -u https://target.example/FUZZ -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt \
-mc 200,301,302,403 -o /tmp/ffuf_dirs.json
# Backup and config files often hide beside the app
ffuf -u https://target.example/FUZZ -w /usr/share/wordlists/seclists/Discovery/Web-Content/Common-DB-Backups.txt \
-mc 200 -o /tmp/ffuf_backups.json
# Parameter discovery on interesting endpoints
ffuf -u 'https://target.example/search?FUZZ=test' \
-w /usr/share/wordlists/seclists/Discovery/Web-Content/burp-parameter-names.txt \
-mc 200 -fs <baseline_size> -o /tmp/ffuf_params.json
Tune the match codes per target: a 403 on /admin is a lead, not a
dead end. Record the baseline response size so parameter fuzzing can
filter noise with -fs.
3. API surface mapping
# Find API docs the developers left exposed
for p in /api/docs /swagger.json /openapi.json /graphql /api/v1; do
code=$(curl -s -o /dev/null -w '%{http_code}' "https://target.example$p")
echo "$p -> $code"
done
# JavaScript bundles leak API endpoints; grep the bundles
curl -s https://target.example/static/app.js | grep -o -E '"/api/[^"]*"' | sort -u | head -30
# OPTIONS requests reveal allowed methods per endpoint
curl -s -X OPTIONS https://target.example/api/users -D - -o /dev/null | grep -i allow
An exposed OpenAPI spec is a gift: it lists every endpoint, parameter, and schema. Save it; the api-security-testing phases will work from it directly.
Edge cases
- The app is a single-page app with no crawlable links. Drive it in a browser with the proxy on and exercise every view; the API calls are the real map.
- Rate limiting blocks fuzzing. Slow down, narrow the wordlists to the most likely entries, and note the limit for later phases.
- Content differs by role or tenant. Map each role separately; the union is the attack surface, and the differences are the authz test targets.
- The map keeps growing. Time-box mapping (typically 10 to 20 percent of the test), freeze it, and let exploitation findings reopen it.
Escalation
- You need deeper API coverage: hand the endpoint list to api-discovery for systematic work.
- Hidden functionality is suspected but unfound: review JavaScript bundles and mobile apps for endpoint references the web UI hides.
- The map reveals a huge scope: reprioritize with the test lead using data sensitivity and exposure as the ranking.
Detection and defender view
Defenders see mapping as spidering patterns (rapid sequential page fetches), fuzzing bursts (many 404s from one source), and odd API probing. It is the reconnaissance phase of the web test and the easiest to detect. Defenses are WAF rate limiting, alerting on 404 bursts and enumeration patterns, and not exposing docs, backups, or debug endpoints in the first place.
Key references
- OWASP Testing Guide: Information Gathering.
- PTES (Penetration Testing Execution Standard): intelligence gathering.
- ffuf 2.1 documentation.
