| name | full-security-pentest |
| description | Comprehensive security penetration testing skill covering all attack surfaces - info gathering, web vulnerability scanning, SQL injection, XSS, directory bruteforce, Python code audit, git secret scanning, auth bypass, CSRF/SSRF, and configuration audit. Records all findings with severity ratings. |
| origin | custom |
Full Security Penetration Testing Skill
Comprehensive, no-blind-spot security attack and assessment covering all attack vectors.
When to Activate
- Running a full security penetration test on a project
- Auditing an application for all known vulnerability classes
- Pre-release security assessment
- Authorized red team engagement
Attack Execution Order
Execute all phases sequentially. Each phase produces findings recorded in the report.
Phase 1: Information Gathering
Reconnaissance and service fingerprinting.
1A. Port Scanning (nmap)
nmap -sV -sC -oN nmap-quick.txt <TARGET>
nmap -p- -sV -oN nmap-full.txt <TARGET>
nmap -sV -O -A -oN nmap-detailed.txt <TARGET>
nmap --script=vuln -oN nmap-vuln.txt <TARGET>
1B. Service Fingerprinting
curl -I <TARGET_URL>
httpx -u <TARGET_URL> -tech-detect -status-code -title -server 2>/dev/null || curl -sI <TARGET_URL>
1C. Subdomain & DNS Enumeration
subfinder -d <DOMAIN> -o subdomains.txt 2>/dev/null
nmap --script=dns-brute <DOMAIN>
Phase 2: Web Vulnerability Scanning
Automated scanning for known web vulnerabilities.
2A. Nuclei (Template-Based Scanner)
nuclei -u <TARGET_URL> -o nuclei-report.txt -severity critical,high,medium
nuclei -u <TARGET_URL> -tags cve,misconfig,exposure -o nuclei-cve.txt
nuclei -u <TARGET_URL> -tags api,token -o nuclei-api.txt
2B. Nikto (Web Server Scanner)
nikto -h <TARGET_URL> -o nikto-report.txt -Format txt
nikto -h <TARGET_URL> -Tuning 1234567890 -o nikto-full.txt
Phase 3: SQL Injection Testing
3A. Automated Detection (sqlmap)
sqlmap -u "<TARGET_URL>?param=value" --batch --banner --level=3 --risk=2
sqlmap -u "<TARGET_URL>" --data="param1=value1¶m2=value2" --batch --banner
sqlmap -u "<TARGET_URL>" --cookie="session=xxx" --batch --banner
sqlmap -u "<TARGET_URL>?param=value" --batch --dbs
3B. Manual SQL Injection Checks
Test these payloads manually on all input fields:
' OR '1'='1
" OR "1"="1
' OR '1'='1' --
' UNION SELECT NULL--
' AND 1=CONVERT(int,@@version)--
1; WAITFOR DELAY '0:0:5'--
Record which inputs are vulnerable and which are properly sanitized.
Phase 4: XSS Testing
4A. Reflected XSS
Test all URL parameters and form inputs:
<script>alert('XSS')</script>
"><script>alert('XSS')</script>
<img src=x onerror=alert('XSS')>
javascript:alert('XSS')
<svg/onload=alert('XSS')>
4B. Stored XSS
Test all user-input fields that persist data:
- Profile fields (name, bio, etc.)
- Comments / reviews
- Product descriptions (seller side)
- Messages / chat
4C. DOM-Based XSS
grep -rn "innerHTML\|outerHTML\|document\.write\|eval(" <REPO_PATH> --include="*.js" --include="*.ts" --include="*.html"
grep -rn "dangerouslySetInnerHTML\|v-html\|\|safe\|mark_safe\|Markup(" <REPO_PATH> --include="*.py" --include="*.js" --include="*.html"
Phase 5: Directory Brute Force
5A. ffuf
ffuf -w /opt/homebrew/share/wordlists/dirb/common.txt -u <TARGET_URL>/FUZZ -mc 200,301,302,403 -o ffuf-dirs.json
ffuf -w /opt/homebrew/share/wordlists/dirb/common.txt -u <TARGET_URL>/FUZZ -e .php,.py,.js,.env,.bak,.sql,.conf,.yml,.json -mc 200,301,302,403
ffuf -w <WORDLIST> -u <TARGET_URL> -H "Host: FUZZ.<DOMAIN>" -mc 200
5B. Sensitive File Discovery
for f in .env .env.local .env.production .git/config .git/HEAD robots.txt sitemap.xml .htaccess web.config package.json composer.json debug.log error.log; do
code=$(curl -s -o /dev/null -w "%{http_code}" "<TARGET_URL>/$f")
echo "$f -> $code"
done
Phase 6: Python Code Security Audit
6A. Bandit (Static Analysis)
bandit -r <REPO_PATH> -f json -o bandit-report.json
bandit -r <REPO_PATH> -ll -f json -o bandit-high.json
bandit -r <REPO_PATH> -t B101,B102,B103,B104,B105,B106,B107,B108,B110
6B. Manual Code Audit Checklist
grep -rn "password\s*=\s*['\"]" <REPO_PATH> --include="*.py"
grep -rn "eval(\|exec(\|__import__\|subprocess\.call\|os\.system\|os\.popen" <REPO_PATH> --include="*.py"
grep -rn "pickle\.load\|yaml\.load\|marshal\.load" <REPO_PATH> --include="*.py"
grep -rn "execute.*%s\|execute.*format\|execute.*f'" <REPO_PATH> --include="*.py"
grep -rn "DEBUG\s*=\s*True\|debug=True\|FLASK_DEBUG\|DJANGO_DEBUG" <REPO_PATH> --include="*.py" --include="*.env*" --include="*.yaml"
Phase 7: Git History Secret Scanning
gitleaks detect --source=<REPO_PATH> --report-format=json --report-path=gitleaks-report.json -v
trufflehog filesystem <REPO_PATH> --json > trufflehog-report.json
find <REPO_PATH> -name "*.pem" -o -name "*.key" -o -name "*.p12" -o -name "*.pfx" -o -name "*.jks" -o -name "id_rsa*" -o -name "*.sqlite" -o -name "*.db" 2>/dev/null
cat <REPO_PATH>/.gitignore 2>/dev/null
Phase 8: Authentication & Authorization Bypass
8A. Authentication Testing
curl -v <TARGET_URL>/api/protected-endpoint
curl -H "Authorization: Bearer invalid" <TARGET_URL>/api/protected-endpoint
curl -H "Authorization: " <TARGET_URL>/api/protected-endpoint
8B. Authorization Testing (IDOR)
8C. Code Audit for Auth Issues
grep -rn "def \w\+.*request" <REPO_PATH> --include="*.py" | head -30
grep -rn "@login_required\|@authenticated\|@requires_auth\|@permission" <REPO_PATH> --include="*.py"
grep -rn "@app\.route\|@router\.\|path(" <REPO_PATH> --include="*.py" -l
Phase 9: CSRF / SSRF Detection
9A. CSRF Testing
grep -rn "csrf\|csrftoken\|_token\|authenticity_token" <REPO_PATH> --include="*.py" --include="*.html" --include="*.js"
grep -rn "CsrfViewMiddleware\|csrf_protect\|csrf_exempt\|@csrf_exempt" <REPO_PATH> --include="*.py"
grep -rn "methods.*POST\|methods.*PUT\|methods.*DELETE\|@csrf_exempt" <REPO_PATH> --include="*.py"
9B. SSRF Testing
grep -rn "requests\.get\|requests\.post\|urllib\|urlopen\|fetch\|http\.client\|aiohttp" <REPO_PATH> --include="*.py"
grep -rn "request\.\(args\|form\|json\|data\).*requests\.\|request\.\(args\|form\|json\|data\).*url" <REPO_PATH> --include="*.py"
Phase 10: Configuration Audit
find <REPO_PATH> -name ".env" -o -name ".env.*" ! -name ".env.example" 2>/dev/null
grep -rn "DEBUG\s*=\s*True\|debug\s*=\s*True\|FLASK_ENV.*development" <REPO_PATH> --include="*.py" --include="*.env*" --include="*.yaml" --include="*.yml"
grep -rn "admin.*password\|root.*password\|test.*password\|password.*123\|default.*key" <REPO_PATH> --include="*.py" --include="*.yaml" --include="*.env*" --include="*.json"
grep -rn "http://" <REPO_PATH> --include="*.py" --include="*.js" --include="*.env*" | grep -v "localhost\|127\.0\.0\.1\|http://schemas"
grep -rn "traceback\|stack_trace\|full_traceback\|DEBUG.*True" <REPO_PATH> --include="*.py"
grep -rn "Access-Control-Allow-Origin.*\*\|CORS_ALLOW_ALL\|allow_all_origins\|CORS.*True" <REPO_PATH> --include="*.py" --include="*.js"
curl -sI <TARGET_URL> | grep -i "strict-transport\|x-content-type\|x-frame\|content-security-policy\|referrer-policy\|permissions-policy"
Finding Report Template
# Security Penetration Test Report
**Target**: [project name / URL]
**Date**: [YYYY-MM-DD]
**Tester**: Claude (Authorized Pentest)
## Executive Summary
- Total findings: X
- Critical: X | High: X | Medium: X | Low: X
## Findings
### [FINDING-001] [SEVERITY] Title
- **Phase**: (which phase discovered this)
- **Category**: Secret Leak / SQLi / XSS / Auth Bypass / IDOR / CSRF / SSRF / Config / etc.
- **Severity**: CRITICAL / HIGH / MEDIUM / LOW
- **Location**: file:line or endpoint
- **Description**: What was found
- **Evidence**: Command output or code snippet
- **Impact**: What an attacker could exploit
- **Recommendation**: How to fix
- **CVSS (optional)**: Base score estimate
---
(repeat for each finding)
## Tools Used
- nmap, nikto, nuclei, sqlmap, ffuf, gitleaks, trufflehog, bandit, manual review
## Appendix
- Full scan outputs attached as separate files
Severity Classification
| Severity | Criteria | Examples |
|---|
| CRITICAL | Immediate exploitation possible, data breach risk | Hardcoded API keys with admin access, unauthenticated admin endpoints, SQLi on prod DB |
| HIGH | Exploitable with some effort, significant impact | Secrets in git history, IDOR on sensitive data, privilege escalation |
| MEDIUM | Requires specific conditions, moderate impact | Missing rate limiting, CSRF on non-critical forms, verbose errors |
| LOW | Informational, minimal direct impact | HTTP used internally, missing security headers, debug endpoints on non-prod |
Output Directory
All reports saved to docs/security/:
nmap-*.txt — network scan results
nuclei-report.txt — vulnerability scan
nikto-report.txt — web server scan
sqlmap-*.txt — SQL injection results
ffuf-dirs.json — directory brute force
bandit-report.json — Python code audit
gitleaks-report.json — git secret scan
trufflehog-report.json — deep secret scan
pentest-report.md — consolidated findings report