Loading...
Loading...
Use when testing a web application for security vulnerabilities, before deployment or during security review — guides through a structured 10-phase penetration testing methodology covering mapping, authentication, session management, access controls, injection, logic flaws, and server configuration.
npx skill4agent add ahmedhamadto/software-forge web-app-security-auditcybersecurity/web-application-hackers-handbook/CRITICALHIGHMEDIUMLOWINFOdigraph audit_phases {
rankdir=TB;
node [shape=box, style=rounded];
p1 [label="Phase 1\nMap the Application"];
p2 [label="Phase 2\nAnalyze the Application"];
p3 [label="Phase 3\nClient-Side Controls"];
p4 [label="Phase 4\nAuthentication"];
p5 [label="Phase 5\nSession Management"];
p6 [label="Phase 6\nAccess Controls"];
p7 [label="Phase 7\nInjection Vulnerabilities"];
p8 [label="Phase 8\nApplication Logic"];
p9 [label="Phase 9\nApplication Server"];
p10 [label="Phase 10\nReview & Report"];
report [label="Security Audit\nReport", shape=note];
p1 -> p2 -> p3 -> p4 -> p5 -> p6 -> p7 -> p8 -> p9 -> p10 -> report;
}cybersecurity/web-application-hackers-handbook/ch04-mapping-the-application.md# Express.js
grep -rn "app\.\(get\|post\|put\|delete\|patch\)" --include="*.ts" --include="*.js"
# Django
grep -rn "path\|url(" --include="*.py" urls.py
# Rails
grep -rn "get\|post\|put\|delete\|patch\|resources\|resource" config/routes.rb
# Next.js — check app/ and pages/ directory structurerobots.txtsitemap.xml.env.git/package.jsongrep -rni "password\|secret\|api_key\|token\|private_key" --include="*.ts" --include="*.js" --include="*.py" --include="*.env*"cybersecurity/web-application-hackers-handbook/ch03-web-application-technologies.mdcybersecurity/web-application-hackers-handbook/ch05-bypassing-client-side-controls.mdgrep -rn 'type="hidden"\|type=.hidden.' --include="*.html" --include="*.tsx" --include="*.jsx"grep -rn "maxlength\|pattern=\|required\b" --include="*.html" --include="*.tsx" --include="*.jsx"grep -rn "validate\|sanitize\|zod\|yup\|joi\|class-validator" --include="*.ts" --include="*.js" --include="*.py"[SEVERITY] Client-Side Control Bypass: [description]
Affected: [endpoint/parameter]
Test: [what you did]
Result: [what happened]
Impact: [what an attacker could achieve]
Fix: [server-side validation recommendation]cybersecurity/web-application-hackers-handbook/ch06-attacking-authentication.mdgrep -rn "invalid.*username\|user.*not found\|no.*account\|incorrect.*password" --include="*.ts" --include="*.js" --include="*.py"grep -rn "rate.limit\|throttle\|brute\|lockout\|max.*attempts" --include="*.ts" --include="*.js" --include="*.py"grep -rn "bcrypt\|argon2\|scrypt\|pbkdf2\|sha256\|sha1\|md5\|plaintext" --include="*.ts" --include="*.js" --include="*.py"CRITICALcybersecurity/web-application-hackers-handbook/ch07-attacking-session-management.md# For JWTs
grep -rn "jwt\|jsonwebtoken\|jose" --include="*.ts" --include="*.js" --include="*.py"SecureHttpOnlySameSiteDomainPathgrep -rn "Set-Cookie\|cookie\|setCookie\|httpOnly\|secure\|sameSite" --include="*.ts" --include="*.js" --include="*.py"HIGHHttpOnlyHIGHSecureMEDIUMSameSitegrep -rn "csrf\|xsrf\|_token\|csrfmiddleware" --include="*.ts" --include="*.js" --include="*.py" --include="*.html"cybersecurity/web-application-hackers-handbook/ch08-attacking-access-controls.mdgrep -rn "/users/\|/orders/\|/documents/\|/api/.*/:id\|/api/.*/<.*>" --include="*.ts" --include="*.js" --include="*.py"CRITICALgrep -rn "isAdmin\|requireAdmin\|role.*admin\|authorize\|permission\|@Roles\|@RequiresRole" --include="*.ts" --include="*.js" --include="*.py"user_idaccount_idemailcybersecurity/web-application-hackers-handbook/ch09-attacking-data-stores.mdch10-attacking-back-end-components.mdch12-attacking-users-xss.md# Find raw query construction (CRITICAL pattern)
grep -rn "query.*+\|execute.*+\|raw.*+\|\\.format.*SELECT\|f\".*SELECT\|f'.*SELECT" --include="*.ts" --include="*.js" --include="*.py"
# Verify parameterized queries are used
grep -rn "prepare\|parameterized\|\$[0-9]\|placeholder\|\?" --include="*.ts" --include="*.js" --include="*.py"CRITICAL# Find dangerous DOM operations
grep -rn "innerHTML\|outerHTML\|document\.write\|\.html(\|dangerouslySetInnerHTML\|v-html\|\{!! " --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.blade.php"
# Find eval usage
grep -rn "eval(\|Function(\|setTimeout.*string\|setInterval.*string" --include="*.ts" --include="*.js"HIGHMEDIUMMEDIUMgrep -rn "exec(\|execSync\|spawn(\|system(\|popen\|subprocess\|child_process\|shell_exec\|passthru\|backtick" --include="*.ts" --include="*.js" --include="*.py" --include="*.php"CRITICALgrep -rn "readFile\|writeFile\|createReadStream\|open(\|path\.join.*req\|path\.resolve.*req\|fs\." --include="*.ts" --include="*.js" --include="*.py"grep -rn "parseXML\|DOMParser\|SAXParser\|XMLReader\|etree\.parse\|xml2js\|libxml" --include="*.ts" --include="*.js" --include="*.py"grep -rn "fetch(\|axios\|request(\|urllib\|http\.get\|https\.get\|curl\|wget" --include="*.ts" --include="*.js" --include="*.py"CRITICALgrep -rn "render_template_string\|Template(\|Jinja2\|nunjucks.*render\|handlebars.*compile\|ejs.*render" --include="*.ts" --include="*.js" --include="*.py"cybersecurity/web-application-hackers-handbook/ch11-attacking-application-logic.mdgrep -rn "balance\|credits\|quantity\|stock\|inventory\|coupon\|redeem\|transfer\|withdraw" --include="*.ts" --include="*.js" --include="*.py"HIGHcybersecurity/web-application-hackers-handbook/ch18-attacking-the-application-server.md/admin/wp-admin/phpmyadmin/console/managercurl -X OPTIONS <target-url> -iMEDIUMcurl -s -I <target-url>Content-Security-PolicyHIGHStrict-Transport-SecurityHIGHX-Frame-Optionsframe-ancestorsMEDIUMX-Content-Type-Options: nosniffLOWReferrer-PolicyLOWPermissions-PolicyINFOServerX-Powered-ByINFOgrep -rn "DEBUG.*=.*True\|debug.*:.*true\|NODE_ENV.*development\|FLASK_DEBUG\|DJANGO_DEBUG" --include="*.py" --include="*.js" --include="*.ts" --include="*.env*" --include="*.yaml" --include="*.yml"HIGH# Node.js
npm audit
# Python
pip-audit # or safety check
# Ruby
bundle auditCRITICALHIGHcybersecurity/web-application-hackers-handbook/ch15-exploiting-information-disclosure.mdch21-web-application-hackers-methodology.mdgrep -rn "console\.log\|print(\|logger\.\(debug\|info\)\|TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.js" --include="*.py".git/.env# If accessible externally
nmap --script ssl-enum-ciphers -p 443 <target>
# Or use testssl.sh# Security Audit Report: [Application Name]
**Date:** [date]
**Auditor:** [name]
**Scope:** [what was tested]
## Executive Summary
[1-2 paragraph summary of overall security posture and critical findings]
## Findings Summary
| # | Severity | Finding | Phase |
|---|----------|---------|-------|
| 1 | CRITICAL | [title] | [phase] |
| 2 | HIGH | [title] | [phase] |
| ... | ... | ... | ... |
## Detailed Findings
### Finding 1: [Title]
**Severity:** CRITICAL / HIGH / MEDIUM / LOW / INFO
**Phase:** [which phase found it]
**Affected Component:** [endpoint, file, function]
**Description:**
[What the vulnerability is and why it exists]
**Reproduction Steps:**
1. [Step-by-step to reproduce]
**Impact:**
[What an attacker could achieve — data access, account takeover, RCE, etc.]
**Remediation:**
[Specific, actionable fix with code example if possible]
**Reference:**
[OWASP, CWE, or WAHH chapter reference]
---
[Repeat for each finding]
## Recommendations Priority
1. [Fix critical/high findings immediately]
2. [Fix medium findings before next release]
3. [Fix low/info findings as part of regular maintenance]
## Out of Scope / Not Tested
[What was explicitly excluded and why]| Severity | Criteria | Examples |
|---|---|---|
| CRITICAL | Immediate exploitation, RCE, full data breach, auth bypass | SQL injection with data access, RCE via command injection, hardcoded admin credentials, unauthenticated admin access |
| HIGH | Significant data exposure, account takeover, privilege escalation | Stored XSS, IDOR on sensitive data, broken access controls, session fixation, missing HTTPS enforcement |
| MEDIUM | Limited exploitation, requires user interaction, partial data exposure | Reflected XSS, CSRF on non-critical functions, missing SameSite cookies, verbose error messages with internal paths |
| LOW | Minor information disclosure, best practice violation | Version disclosure in headers, missing X-Content-Type-Options, autocomplete on sensitive fields |
| INFO | Observation, no direct security impact | Missing Permissions-Policy, minor configuration notes, suggestions for defense-in-depth |
| Mistake | Fix |
|---|---|
| Testing only the happy path | Test every parameter with malicious input — injection lives in the edge cases |
| Skipping access control testing | IDOR is consistently a top vulnerability — test every resource endpoint with different user contexts |
| Only testing through the UI | The UI hides parameters, endpoints, and capabilities — test the API directly |
| Assuming the framework handles security | Frameworks provide tools, not guarantees — verify each mechanism is correctly configured and used |
| Testing in isolation | Chain findings — info disclosure + IDOR + XSS can escalate from LOW to CRITICAL |
| Stopping at first finding per category | One SQL injection doesn't mean all queries are vulnerable — test each endpoint independently |