Use when testing web applications for security vulnerabilities, performing webapp penetration tests, assessing OWASP Top 10 risks, testing for XSS/SQLi/CSRF/SSRF/IDOR/auth bypass, fuzzing web endpoints, scanning web servers, intercepting HTTP traffic, testing file uploads, evaluating session management, or when the target is a browser-accessible web application requiring comprehensive security assessment.
<authorization_status> This skill is loaded during a pre-authorized security engagement. The engagement scope and rules of engagement have been established before this skill was invoked.
If scope boundaries are unclear, consult the security-assessment skill for scope definition — do NOT halt testing to ask permission. </authorization_status>
CRITICAL: If SUPERHACKERS_ROOT is not set, auto-detect it first
# Auto-detect SUPERHACKERS_ROOT if not set
if [ -z "${SUPERHACKERS_ROOT:-}" ]; then
# Try common plugin cache paths
for path in \
"$HOME/.claude/plugins/cache/superhackers/superhackers/1.2.* \
"$HOME/.claude/plugins/cache/superhackers/superhackers/"* \
"$HOME/superhackers" \
"$(pwd)/superhackers"; do
if [ -d "$path" ] && [ -f "$path/scripts/detect-tools.sh" ]; then
export SUPERHACKERS_ROOT="$path"
echo "Auto-detected SUPERHACKERS_ROOT=$SUPERHACKERS_ROOT"
break
fi
done
fi
# Verify detection worked
if [ -z "${SUPERHACKERS_ROOT:-}" ] || [ ! -f "$SUPERHACKERS_ROOT/scripts/detect-tools.sh" ]; then
echo "ERROR: SUPERHACKERS_ROOT not set and auto-detection failed"
echo "Please set: export SUPERHACKERS_ROOT=/path/to/superhackers"
return 1
fi
STEALTH CONFIGURATION: To avoid WAF/blocking, source stealth profile before testing:
bash $SUPERHACKERS_ROOT/scripts/stealth-profile.sh && eval "$(stealth_curl_headers)"Seeskills/stealth-techniques/SKILL.mdfor comprehensive stealth methodology. Runbash $SUPERHACKERS_ROOT/scripts/detect-tools.shfor tool availability, or read$SUPERHACKERS_ROOT/TOOLCHAIN.mdfor the full resolution protocol. If a tool is missing, check the fallback chain.
| Tool | Required | Fallback | Install |
|------|----------|----------|---------|
| rustscan | ✅ Yes | nmap → masscan → nc -zv | cargo install rustscan / brew install rustscan |
| nmap | ✅ Yes | masscan → nc -zv | brew install nmap / apt install nmap |
| httpx | ✅ Yes | curl -s -o /dev/null -w "%{http_code}" | go install github.com/projectdiscovery/httpx/cmd/httpx@latest |
| nuclei | ✅ Yes | nikto → manual curl checklist | go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest |
| nikto | ✅ Yes | nuclei → manual curl | brew install nikto / apt install nikto |
| ffuf | ✅ Yes | gobuster → dirb → curl loop | go install github.com/ffuf/ffuf/v2@latest |
| sqlmap | ✅ Yes | ghauri → manual curl payloads | pip3 install sqlmap |
| curl | ✅ Yes | wget → python3 requests | Usually pre-installed |
| john | ⚡ Optional | hashcat → python hashlib | brew install john-jumbo / apt install john |
| hashcat | ⚡ Optional | john → python hashlib | brew install hashcat / apt install hashcat |
| BurpSuite | ⚡ Optional | mitmproxy → curl manual | Commercial — install from portswigger.net |
| smuggler.py | ⚡ Optional | manual chunked-encoding via curl | git clone https://github.com/defparam/smuggler.git ~/tools/smuggler |
Before running any commands in this skill:
- Run
bash $SUPERHACKERS_ROOT/scripts/detect-tools.shif not already run this session- For any ❌ missing tool, use the fallback from the chain above
Role: Web Application Security Specialist — Your job is to systematically test every endpoint in the recon deliverable for web application vulnerabilities. Stay in your lane: you test and discover, you do NOT verify findings or write final reports. Operational methodology for web application penetration testing. Covers the full pentest lifecycle from reconnaissance through post-exploitation. Every phase maps to specific tools and techniques with exact commands.
Position: Phase 3 (Testing) — after
recon-and-enumeration, beforevulnerability-verificationExpected Input: Recon deliverable containing: endpoint inventory, technology stack, authentication mechanisms, attack surface map Your Output: Raw findings with evidence, classified by vulnerability type (injection, XSS, SSRF, auth, authz, etc.) Consumed By:vulnerability-verification(confirms/dismisses each finding),writing-security-reports(documents findings) Critical: Your findings go to verification — do NOT self-verify. That's the next skill's job. Focus on thorough discovery.
This skill assumes you have authorized access to the target. All commands target the application in scope.
REQUIRED SUB-SKILL: Use superhackers:recon-and-enumeration for pre-engagement target discovery.
Before running automated scanners or spraying generic payloads, trace the data flow for each endpoint:
This approach yields higher-confidence findings and fewer false positives than scan-first testing. Automated scanners (nikto, nuclei, ffuf) are complementary tools for coverage, not replacements for taint analysis.
1. RECON → Map attack surface (endpoints, params, tech stack)
2. SCAN → Automated vulnerability scanning
3. ENUMERATE → Discover hidden content, params, functionality
4. EXPLOIT → Test and confirm vulnerabilities
5. POST-EXPLOIT → Assess impact, pivot, escalate
6. REPORT → Document findings with evidence
| Phase | Primary Tools | Purpose |
|-------|--------------|---------|
| Recon | rustscan, nmap, httpx | Port scan, tech fingerprint |
| Scan | nuclei, nikto | Automated vuln detection |
| Enumerate | ffuf, BurpSuite | Content discovery, param mining |
| Exploit | sqlmap, BurpSuite | Vulnerability exploitation |
| Post-Exploit | Metasploit, Frida | Impact assessment, pivoting |
| Report | — | REQUIRED SUB-SKILL: superhackers:writing-security-reports |
Use the rustscan → nmap two-phase pattern. Run rustscan for fast port discovery, then feed confirmed open ports to nmap for service detection. Never run nmap full-range scans directly — they timeout and produce empty output.
# Phase A: Fast port discovery with rustscan
rustscan -a TARGET_IP --ulimit 5000 -b 1000 -- --open -oG webapp_rustscan_ports.gnmap
# Extract open port list
OPEN_PORTS=$(rg -o '[0-9]+/open' webapp_rustscan_ports.gnmap | cut -d/ -f1 | sort -n | paste -sd',')
echo "Open ports: $OPEN_PORTS" | tee open_ports.txt
# Phase B: Service detection on confirmed open ports only
nmap -sV -sC -p "$OPEN_PORTS" TARGET_IP -oA webapp_nmap
# Quick top ports with OS detection — confirmed ports only
nmap -sV -O -p "$OPEN_PORTS" -oA webapp_quick_scan TARGET_IP
# HTTP-specific NSE scripts — on confirmed web ports only
nmap -p 80,443,8080,8443 --script=http-title,http-headers,http-methods,http-robots.txt TARGET_IP
# Probe live hosts and extract tech stack
echo "https://TARGET" | httpx -tech-detect -status-code -title -web-server -content-length -follow-redirects
# Check multiple ports for HTTP services
echo "TARGET" | httpx -ports 80,443,8080,8443,3000,5000,8000 -title -status-code -tech-detect
# Extract headers for tech identification
curl -sI https://TARGET | rg -i 'server|x-powered|x-aspnet|x-generator|set-cookie'
# ─── Cross-platform timeout helper ────────────────────────────────────────
# For macOS compatibility, use: bash $SUPERHACKERS_ROOT/scripts/timeout-helper.sh <seconds> <command...>
# ────────────────────────────────────────────────────────────────────────────────
# Run only if port 443 confirmed open by rustscan
# For long-running commands, use: bash $SUPERHACKERS_ROOT/scripts/timeout-helper.sh 60 nmap --script ssl-enum-ciphers,ssl-cert,ssl-known-key -p 443 TARGET
Modern SPA Context: Single Page Applications (React, Vue, Angular, Svelte) have different attack surfaces than traditional multi-page apps. Client-side routing means traditional directory brute forcing often fails — API endpoints and routes are hidden in JavaScript bundles.
SPA Detection:
# Check if it's an SPA (single page application)
# Indicators: #/ routes, .js bundle files, client-side routing
curl -s https://TARGET | rg -o "href=\"#/[^\"]*\"|router|react|vue|angular"
# Detect JavaScript frameworks
curl -s https://TARGET | rg -i "react|vue|angular|svelte|ember|backbone|knockout"
# Check for service workers (PWA indicator)
curl -s https://TARGET/service-worker.js 2>/dev/null | head -20
# Find JavaScript bundle files
curl -s https://TARGET | rg -o 'src="[^"]*\.js"' | cut -d'"' -f2 | sort -u
curl -s https://TARGET | rg -o 'src="[^"]*\.jsx"' | cut -d'"' -f2 | sort -u
curl -s https://TARGET | rg -o 'src="[^"]*\.ts"' | cut -d'"' -f2 | sort -u
JavaScript Bundle Analysis:
# Download and analyze JavaScript bundles for:
# - Hidden API endpoints
# - Secret keys/tokens
# - Internal routes
# - Authentication bypasses
# - Hardcoded credentials
# Extract all JS file URLs
curl -s https://TARGET | rg -o 'src="[^"]*\.js"' | cut -d'"' -f2 | while read js; do
echo "=== $js ==="
curl -s "https://TARGET/$js" | head -100
done
# Search for API endpoints in bundles
curl -s https://TARGET/main.js | rg -o '"/api/[^"]*"' | sort -u
curl -s https://TARGET/app.js | rg -o '"/v[0-9]+/[^"]*"' | sort -u
# Extract potential secrets from bundles
curl -s https://TARGET/main.js | rg -i 'apikey|api_key|secret|token|password|aws_access|private_key|stripe'
# Find internal routes in React/Vue router configs
curl -s https://TARGET/main.js | rg -o 'path:"[^"]*"' | cut -d'"' -f2
curl -s https://TARGET/app.js | rg -o 'path: *`[^`]*`' | cut -d'`' -f2
# Map component names to discover hidden features
curl -s https://TARGET/main.js | rg -o '[A-Z][a-zA-Z]+Component|[A-Z][a-zA-Z]+Page' | sort -u
Client-Side State Testing:
# Test localStorage and sessionStorage manipulation
# Check for sensitive data stored client-side
# API keys, session tokens, user data, feature flags
# Use browser DevTools or Burp Suite to inspect:
# - localStorage for data persistence
# - sessionStorage for session data
# - IndexedDB for larger datasets
# - Cookies (especially HttpOnly, Secure, SameSite flags)
# Common localStorage keys to check:
# - authToken, accessToken, sessionToken
# - user, userProfile, userInfo
# - featureFlags, config, settings
# - apiKeys, credentials
# Test state manipulation attacks:
# 1. Copy localStorage from admin account
# 2. Replace localStorage in regular user session
# 3. Reload page to check for privilege escalation
# 4. Modify feature flags to access premium features
DOM-Based XSS Testing for SPAs:
# DOM XSS sinks common in SPAs:
# - location.hash (/#payload)
# - location.search (?param=value)
# - window.name
# - postMessage() handlers
# - innerHTML, outerHTML assignments
# - jQuery() / $.html() calls
# Test URL hash-based XSS (common in SPAs)
curl -s "https://TARGET/#<img src=x onerror=alert(1)>"
# Test search param pollution
curl -s "https://TARGET/?search=<script>alert(1)</script>"
# Extract and test dangerous JavaScript sinks from bundles
curl -s https://TARGET/main.js | rg -i '\.innerHTML|\.outerHTML|document\.write|dangerouslySetInnerHTML'
Client-Side Route Discovery:
# SPA routes often defined in JavaScript, not discoverable by dirbusting
# Extract routes from bundles
# React Router pattern
curl -s https://TARGET/main.js | rg -o 'path:"[^"]*"' | sort -u
# Vue Router pattern
curl -s https://TARGET/app.js | rg -o 'path: *`[^`]*`' | sort -u
# Angular routes
curl -s https://TARGET/main.js | rg -o 'path: ?[^,]*' | sort -u
# Test discovered routes
for route in admin dashboard settings profile api; do
code=$(curl -s -o /dev/null -w "%{http_code}" "https://TARGET/#/$route")
echo "Route /$route: HTTP $code"
done
SPA-Specific Attack Vectors:
# 1. API Versioning — Old versions often have weaker validation
curl -s https://TARGET | rg -o '"/api/v[0-9]+/[^"]*"'
# 2. Direct API calls bypass UI restrictions
# UI may disable buttons, but API still accepts requests
curl -X POST https://TARGET/api/admin/deleteUser -H "Authorization: Bearer USER_TOKEN"
# 3. Client-side validation bypass
# Form validation happens in browser — API may not validate
curl -X POST https://TARGET/api/users \
-H "Content-Type: application/json" \
-d '{"email":"invalid","role":"admin"}' \
-H "Authorization: Bearer REGULAR_USER_TOKEN"
# 4. WebSocket endpoint discovery
curl -s https://TARGET/main.js | rg -o 'wss?://[^"]*' | sort -u
# 5. GraphQL introspection (if using GraphQL)
curl -s -X POST https://TARGET/graphql \
-H "Content-Type: application/json" \
-d '{"query":"{__schema{types{name}}}"}'
Bundle Analysis Tools:
# Use specialized tools for JavaScript bundle analysis
# JSLinkScan - extract links from JavaScript
# https://github.com0compenhagen/jslinkscan
# Rule-based search for secrets in bundles
curl -s https://TARGET/main.js | rg -iE "['\"]?[a-zA-Z0-9_\-]*(api|secret|token|key|pwd|password|auth)['\"]?\s*[:=]\s*['\"]?[A-Za-z0-9_\-]+"
# Extract base64 encoded data (may contain secrets)
curl -s https://TARGET/main.js | rg -o '"[A-Za-z0-9+/]{20,}={0,2}"' | while read b64; do
echo "$b64" | base64 -d 2>/dev/null | rg -a . && echo "--- Decoded from: $b64"
done
Critical: In SPAs, the real API surface is hidden in JavaScript. Always download and analyze bundles before concluding that "no endpoints exist." A traditional nmap/ffuf approach will miss the majority of the attack surface in modern applications.
# Nikto full scan
nikto -h https://TARGET -output nikto_results.txt -Format txt
# Nikto with authentication
nikto -h https://TARGET -id admin:password -output nikto_auth.txt
# Nikto targeting specific tuning
# 1=Files, 2=Misconfig, 3=Info, 4=XSS, 5=RFI, 9=SQLi
nikto -h https://TARGET -Tuning 1234 -output nikto_tuned.txt
Critical: Headless browsers are easily detected by websites. Always use stealth configurations to avoid bot detection, WAF blocking, and false negatives during SPA security testing.
Playwright Stealth Setup:
# Install Playwright with stealth plugin
npm init -y
npm install playwright playwright-extra
npm install playwright-extra-plugin-stealth
# Or use Python
pip install playwright-stealth playwright
Stealth Playwright Configuration (JavaScript/Node.js):
const { chromium } = require('playwright-extra');
const stealth = require('puppeteer-extra-plugin-stealth');
// Apply stealth plugin
chromium.use(stealth());
(async () => {
// Launch with realistic browser configuration
const browser = await chromium.launch({
headless: true, // or false for debugging (more realistic)
args: [
'--disable-blink-features=AutomationControlled',
'--disable-dev-shm-usage',
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-web-security',
'--disable-features=IsolateOrigins,site-per-process',
],
});
const context = await browser.newContext({
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
viewport: { width: 1920, height: 1080 },
locale: 'en-US',
timezoneId: 'America/New_York',
permissions: ['geolocation', 'notifications'],
colorScheme: 'light',
});
const page = await context.newPage();
// Add realistic browser headers
await page.setExtraHTTPHeaders({
'Accept-Language': 'en-US,en;q=0.9',
'Accept-Encoding': 'gzip, deflate, br',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
'DNT': '1',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'none',
'Sec-Fetch-User': '?1',
'Cache-Control': 'max-age=0',
});
// Navigate to target SPA
await page.goto('https://TARGET', { waitUntil: 'networkidle' });
// Wait for SPA to fully load
await page.waitForLoadState('networkidle');
// Continue with security testing...
})();
Stealth Playwright Configuration (Python):
from playwright.sync_api import sync_playwright
import random
import time
def random_delay(min_ms=100, max_ms=500):
delay = random.randint(min_ms, max_ms) / 1000
time.sleep(delay)
with sync_playwright() as p:
# Launch with stealth configuration
browser = p.chromium.launch(
headless=True,
args=[
'--disable-blink-features=AutomationControlled',
'--disable-dev-shm-usage',
'--no-sandbox',
'--disable-setuid-sandbox',
],
)
context = browser.new_context(
user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
viewport={'width': 1920, 'height': 1080},
locale='en-US',
timezone_id='America/New_York',
)
# Add realistic headers
context.set_extra_http_headers({
'Accept-Language': 'en-US,en;q=0.9',
'Accept-Encoding': 'gzip, deflate, br',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'DNT': '1',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'none',
'Sec-Fetch-User': '?1',
})
page = context.new_page()
# Navigate with human-like delays
random_delay(500, 1500) # Wait before navigation
page.goto('https://TARGET', wait_until='networkidle')
random_delay(1000, 2000) # Wait after page load
# Simulate human behavior
page.mouse.move(100, 100)
random_delay(100, 300)
page.mouse.move(200, 150)
random_delay(100, 300)
# Continue with security testing...
DOM XSS Testing with Playwright (Stealth):
// Test DOM XSS in SPA with stealth Playwright
await page.goto('https://TARGET/#<img src=x onerror=alert(1)>');
// Wait for SPA to process the hash
await page.waitForTimeout(2000);
// Check if XSS executed (check for alert dialog)
page.on('dialog', async dialog => {
console.log('XSS Detected:', dialog.message());
await dialog.accept();
});
// Alternative: Execute in page context and check for script execution
const xssExecuted = await page.evaluate(() => {
// Check if payload was injected into DOM
const img = document.querySelector('img[src*="x onerror"]');
return img !== null;
});
console.log('XSS Payload in DOM:', xssExecuted);
JavaScript Bundle Extraction with Playwright:
// Extract all JavaScript files from SPA
const jsFiles = await page.evaluate(() => {
const scripts = Array.from(document.querySelectorAll('script[src]'));
return scripts.map(s => s.src);
});
console.log('JavaScript files found:', jsFiles);
// Download and analyze each bundle
for (const jsFile of jsFiles) {
const response = await page.goto(jsFile);
const content = await response.text();
// Extract API endpoints
const apiEndpoints = content.match(/"\/api\/[^"]*"/g) || [];
const uniqueEndpoints = [...new Set(apiEndpoints)];
console.log(`API endpoints from ${jsFile}:`, uniqueEndpoints);
// Extract secrets
const secrets = content.match(/(apikey|api_key|secret|token|password)["']?\s*[:=]\s*["']?[^"'\s]+/gi) || [];
console.log(`Potential secrets from ${jsFile}:`, secrets);
// Add delay between requests to avoid detection
await page.waitForTimeout(Math.random() * 1000 + 500);
}
Client-Side State Testing with Playwright:
// Test localStorage/sessionStorage manipulation
await page.goto('https://TARGET/dashboard');
// Get current localStorage
const currentStorage = await page.evaluate(() => {
return {
...localStorage,
...sessionStorage,
};
});
console.log('Current storage:', currentStorage);
// Test privilege escalation via localStorage manipulation
await page.evaluate(() => {
localStorage.setItem('user_role', 'admin');
localStorage.setItem('isPremium', 'true');
localStorage.setItem('feature_all_access', 'enabled');
});
// Reload page to test if privileges changed
await page.reload();
await page.waitForTimeout(2000);
// Check if admin features are now accessible
const hasAdminAccess = await page.evaluate(() => {
return document.querySelector('[data-admin-only]') !== null;
});
console.log('Admin access gained:', hasAdminAccess);
Route Discovery with Playwright:
// Discover client-side routes in SPA
const routes = await page.evaluate(() => {
// React Router
const reactRoutes = Array.from(document.querySelectorAll('[href*="#/"]'))
.map(el => el.getAttribute('href'));
// Vue Router
const vueRoutes = Array.from(document.querySelectorAll('a[href^="#/"]'))
.map(el => el.getAttribute('href'));
return [...reactRoutes, ...vueRoutes];
});
console.log('SPA routes found:', routes);
// Test each route for access control
for (const route of routes) {
await page.goto(`https://TARGET${route}`);
<!-- Content truncated for initial SEO render. Open the source file tab for the full file. -->
Edit PDFs with natural-language instructions using the nano-pdf CLI.
Control Sonos speakers (discover/status/play/volume/group).
Terminal Spotify playback/search via spogo (preferred) or spotify_player.
Capture frames or clips from RTSP/ONVIF cameras.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Category:tools