A web application penetration test is a structured, authorized simulation of real attacks against a web app, done to find weaknesses before criminals do. This skill is the conductor: it defines scoping, mapping, testing phases, and reporting, and it composes the specialist skills (recon-active for discovery, web-sqli and web-xss for injection, auth-attacks for login and session flaws) at the right moments. Everything here assumes written authorization, a defined scope, and agreed test windows.
Quick Workflow
- Define scope, rules of engagement, test windows, and contacts before touching the target.
- Gather credentials, map the application, and build the asset and route inventory.
- Run phased testing: recon, authentication, session, input handling, injection, access control, business logic, and client side.
- Exploit confirmed flaws only far enough to prove impact, within the agreed boundaries.
- Collect evidence continuously: requests, responses, screenshots, and timestamps.
- Re-test after fixes when the engagement includes it.
- Write the report: executive summary, findings with risk ratings, reproduction steps, and remediation advice.
- Debrief the client and securely delete test data and credentials.
1. Scoping and rules of engagement
No testing starts without this in writing.
# Create the engagement folder structure on your machine
mkdir -p ~/engagements/clientA/{scope,evidence,notes,reports,loot}
cat > ~/engagements/clientA/scope/SCOPE.md <<'EOF'
Target URLs:
Excluded paths/hosts:
Test windows (timezone):
Credentials provided:
Rate limits / request caps:
Forbidden actions (DoS, social engineering, third-party systems):
Client contacts (technical + emergency):
Data handling (storage, retention, deletion date):
EOF
Confirm: which environments (staging vs production), whether automated scanning is allowed and at what rate, how to report critical findings immediately, and what counts as out of scope (usually third party services, other tenants, and real user data). Get the sign-off in an email or signed document, and store it in the scope folder.
2. Mapping and discovery
Build a complete picture of the application before attacking it. This phase leans on the recon-active skill for infrastructure and on manual browsing for the app itself.
# Infrastructure baseline (see recon-active for depth)
nmap -sV -p 80,443 --script http-title,http-server-header target.example
# TLS baseline
curl -sI 'https://target.example/' | grep -i -E 'server|strict-transport|content-security'
# Crawl with the proxy: browse every feature in Burp's browser,
# then export the site map and count routes per function
# Burp > Target > Site map > save, then review unvisited parameters
Inventory to produce: every URL and API route, every parameter and its type, authentication and role matrix (which role can reach which page), file upload points, and third party integrations. Mark the highest value targets: login, payment, admin, password reset, and data export features.
3. Testing phases
Run phases in order; each phase's output feeds the next.
Phase A: authentication and session (uses the auth-attacks skill). Test enumeration, brute force limits, MFA, session fixation, cookie flags, logout, and password reset flows.
# Session and cookie baseline for the report
curl -s -c /tmp/jar.txt 'https://target.example/login' -o /dev/null
curl -s -b /tmp/jar.txt -c /tmp/jar2.txt -X POST \
'https://target.example/login' -d 'user=test&pass=Test123!'
grep -i 'httponly\|secure\|samesite' /tmp/jar2.txt || echo "check flags manually"
Phase B: access control. With two accounts of different roles, replay every privileged request as the lower role. Test direct object references and hidden endpoints. This is horizontal and vertical privilege testing.
Phase C: input handling and injection (uses the web-sqli and web-xss skills). Walk the parameter inventory and test each input for SQLi, XSS, command injection, XXE, and template injection, one technique per input with notes.
# Parameter inventory from Burp site map, exported to a checklist
# For each parameter: type, context, tested techniques, result
printf '%-30s %-12s %-30s\n' "parameter" "context" "result"
Phase D: business logic. Abuse the intended workflow: price or quantity tampering, negative values, skipping checkout steps, replaying coupons, race conditions on limited resources. These need human creativity; automation rarely finds them.
# Example: tamper a price field and watch the order total
curl -s -X POST 'https://target.example/api/cart/checkout' \
-b /tmp/jar2.txt -H 'Content-Type: application/json' \
-d '{"items":[{"id":7,"qty":1,"price":0.01}]}' | head -c 300
Phase E: client side and configuration. DOM XSS, postMessage, CORS misconfiguration, open redirects, security headers, and information disclosure in JavaScript bundles and error pages.
# CORS check
curl -s -H 'Origin: https://evil.example' \
'https://target.example/api/v1/users/me' -D - -o /dev/null \
| grep -i 'access-control-allow'
# Open redirect probe
curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' \
'https://target.example/go?next=https://evil.example'
4. Safe exploitation boundaries
Prove impact, then stop. The line is agreed in scoping, but these defaults hold unless the client widened them.
# Allowed: read-only proof such as current DB user through SQLi
# Allowed: alert(document.domain) for XSS with your own test account
# Allowed: reading another TEST account's data for IDOR proof
# Forbidden: dumping full production tables, reading real user data,
# persisting shells, pivoting to internal networks
If a finding could cause damage to prove (deleting data, DoS), describe the impact theoretically and prove the precondition only. When you hit a critical flaw (remote code execution, mass data access), notify the agreed contact immediately instead of continuing to exploit it.
5. Evidence handling
# Naming convention: phase-finding-timestamp
# ~/engagements/clientA/evidence/phaseC-sqli-login-20261023-1030/
mkdir -p ~/engagements/clientA/evidence/phaseC-sqli-login-20261023-1030
# Save the raw request/response pair from Burp (right-click > save)
# Screenshot the rendered proof with the URL bar visible
# Log every significant test for correlation with client logs
echo "2026-10-23 10:30 CEST | phaseC | SQLi boolean probe on /login user field | 12 requests" \
>> ~/engagements/clientA/notes/test-log.txt
Store evidence encrypted, keep credentials in a vault (never in notes), and set a deletion date per the data handling agreement.
6. Reporting
Structure every report the same way so clients can compare engagements.
- Executive summary: business risk in plain language, top 3 findings.
- Scope and methodology: what was tested, what was excluded, which phases ran.
- Findings, each with: title, severity (Critical/High/Medium/Low/Info), CVSS-style vector or score, affected URL/parameter, description, reproduction steps with exact requests, evidence references, business impact, and remediation advice with code-level guidance.
- Appendix: route inventory, test log summary, tools used.
# Severity guide used in this methodology
# Critical: RCE, auth bypass to admin, mass PII exposure
# High: SQLi with data read, stored XSS, IDOR on sensitive data
# Medium: reflected XSS with CSP limits, verbose errors, weak rate limits
# Low: missing headers, informative disclosures
# Info: observations without direct risk
Write remediation for developers: the exact fix (parameterized queries, output encoding, server side authorization checks), not just the flaw name. Re-test fixed findings when the engagement includes a retest window, and mark each as fixed, partially fixed, or still vulnerable.
Edge cases
- The app is a single page app with no server rendered pages. Shift effort to API testing and DOM XSS; the route inventory comes from the JS bundle and proxy logs.
- Staging differs from production. Note every difference you find and flag findings that may not reproduce in production.
- The client gives no test accounts. Test registration, anonymous flows, and anything reachable; mark authenticated areas as untested.
- Rate limiting blocks your scanner. Throttle, use the agreed window, and do manual phased testing instead of broad scans.
- A finding needs chaining to show impact. Build the chain with test accounts only, document each link, and stop before real data.
- Time runs short. Prioritize by the route inventory: auth, admin, payment, and data export first; cosmetic pages last.
Escalation
- Automated scans find nothing: go manual on business logic and access control, where scanners are weakest.
- One phase is blocked (no credentials for role testing): ask the client for the accounts; do not create privilege by exploiting your way up unless that is the agreed test.
- Critical finding mid-test: pause that attack path, notify the contact, and continue with unrelated phases.
- Client disputes a finding: replay the exact saved request/response pair live in the debrief; evidence ends arguments.
Detection and defender view
Defenders see a pentest as Burp-marked traffic, scanner user agents, enumeration patterns, and off-hours testing inside the agreed window, which is why the test log and allowlisted source IPs matter. A good client blue team uses the test to tune detections: alerting on ID enumeration, mass assignment probes, and authentication bursts. The methodology doubles as a detection checklist: every phase maps to log sources the defenders should already collect.
Key references
- MITRE ATT&CK T1190 (Exploit Public-Facing Application).
- OWASP Testing Guide v4: the phase structure this methodology follows.
- OWASP Top 10 2021: risk categories for findings.
- CWE-89 (SQL Injection), CWE-79 (XSS), CWE-287 (Improper Authentication), CWE-639 (Authorization Bypass Through User-Controlled Key): the most reported web findings.
- NIST SP 800-115: technical guide to security testing and assessment.
- Burp Suite 2026.2 docs: https://portswigger.net/burp/documentation
## See also
- `ctf-web-challenges`: Use it instead for the competition workflow, focused on mapping routes and inputs to reach a flag.
