Self-Learning AI for Manual Web Penetration Testing
π― Manual Testing First | Self-Learning AI | WAF Bypass | Context-Aware | Bug Bounty Ready
βββββββββββββββ ββββββββ βββββββββββββββββββββββ ββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββ βββ βββ ββββββββββββββ
βββββββββββββββ ββββββ βββ βββ ββββββββββββββ
βββββββββββ ββββββββββββββββ βββ βββ βββββββββββ
βββββββββββ ββββββββ βββββββ βββ βββ βββββββββββ
βββ ββββββββββββββββββ
βββ βββββββββββββββββββ
βββ ββ βββββββββ ββββββββ
ββββββββββββββββ ββββββββ
ββββββββββββββββββββββββββ
ββββββββ βββββββββββββββ
| Tool | Limitation |
|---|---|
| Nuclei, Nikto | Blocked by WAFs, signature-based, easy to detect |
| Burp Scanner | Slow, expensive license, not AI-native |
| OWASP ZAP | Noisy, many false positives |
| Generic automated tools | Rate limited, IP banned, miss logic bugs |
Spectreweb is not an auto scanner β it is an AI-powered assistant for manual penetration testing:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π― SPECTREWEB AI PHILOSOPHY β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β Auto scan β Blocked by WAF β Fail β
β β
AI analyzes β Human decides β Smart tests β Success β
β β
β "Donβt brute force the target β outsmart it." |
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Feature | Traditional | Spectreweb AI |
|---|---|---|
| Approach | Blind auto-scanning | AI-guided, operator-driven testing |
| WAF Bypass | Hope it works | Generate 10+ smart bypass variants |
| Payloads | Static wordlists | Context-aware, mutated payloads |
| Rate Limits | Get blocked | Detect, adapt, and throttle |
| False Positives | Many | AI-assisted validation |
| Logic Bugs | Often missed | AI suggests business-logic test cases |
| Session | Stateless | Persists findings and context |
Spectreweb AI includes a self-learning local AI that becomes smarter with your usage:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π§ SELF-LEARNING AI ARCHITECTURE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Your Scans ββββββΆβ Learning ββββββΆβ Local AI β β
β β & Feedback β β Store (SQL) β β Models β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β β β
β βΌ βΌ β
β ββββββββββββββββββββββββββββββββββββββββ β
β β AI Orchestrator β β
β β Local AI ββ Remote AI (hybrid) β β
β ββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Model | Learns From | Purpose |
|---|---|---|
| SecretClassifier | Your true/false positive feedback | Reduce false positives in secret detection |
| EndpointRiskScorer | Attack history & results | Prioritize high-risk endpoints |
| PayloadRanker | Payloads that actually worked | Prefer effective payloads first |
# 1. Just use the tools normally - data is collected automatically!
deep_secret_hunt("target.com") # β Secrets saved to learning store
attack_session.run_attack(...) # β Attack results saved to learning store
# 2. Label findings to teach the AI (via MCP tools or API)
learning_label("secret_abc123", "false_positive")
learning_label("secret_xyz789", "true_positive")
# 3. Auto-train when ready (or manually trigger)
ai_auto_train() # β Trains if 50+ labeled samples & 10+ new since last train
ai_train() # β Force train immediately
# 4. Get smart insights from your history
ai_insights()
# β {"attack_effectiveness": {"sqli": 0.15, "xss": 0.08}, "recommendations": [...]}
# 5. Future scans use learned models automatically!
ai_classify_secret(secret_type="aws_key", entropy=4.8, in_test_file=True)
# β {"is_real": false, "confidence": 0.85, "model_used": "ml"}| Tool | Description |
|---|---|
ai_status |
Get AI models & learning store status |
ai_train |
Manually train models |
ai_auto_train |
Auto-train if enough new data |
ai_insights |
Get smart recommendations from history |
ai_classify_secret |
Classify a secret using local AI |
ai_score_endpoint |
Score endpoint vulnerability risk |
learning_stats |
View learning store statistics |
learning_list_findings |
List stored findings |
learning_label |
Label a finding (feedback loop) |
learning_export |
Export learning data to JSON |
-
Local AI (fast, free, personalized):
- Secret classification
- Endpoint risk scoring
- Payload ranking
-
Remote AI (heavier, for complex reasoning):
- Deep vulnerability analysis
- Exploit ideation and refinement
- Report drafting and polishing
The AI orchestrator automatically chooses the most appropriate backend.
# Generate 10+ bypass variants for any payload
waf_bypass("<script>alert(1)</script>")
# Output: URL encoded, double encoded, unicode, hex,
# mixed case, null byte, comments, etc.# Mutate payload with multiple techniques
mutate_payload("' OR '1'='1", "case,encode,whitespace,comments")
# Output: 15+ variations to bypass filters# Generate IDOR test cases for any ID
generate_idor_tests("12345")
# β decrement, increment, zero, negative, array injection
generate_idor_tests("550e8400-e29b-41d4-a716-446655440000")
# β null UUID, modified UUID, etc.# 26 techniques to bypass authentication
generate_auth_bypass("/admin")
# β method override, path manipulation, header bypass# Test cases for privesc
generate_privesc_tests("user")
# β role params, hidden params, JWT claims# Analyze error for info disclosure
analyze_error_response(error_page)
# β stack traces, DB errors, paths, versions
# Extract secrets from response
extract_secrets(response_body)
# β API keys, tokens, passwords, internal IPsgit clone https://github.com/your-repo/spectreweb-ai
cd spectreweb-ai
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt# ProjectDiscovery tools
go install github.com/projectdiscovery/httpx/cmd/httpx@latest
go install github.com/projectdiscovery/subfinder/cmd/subfinder@latest
go install github.com/projectdiscovery/katana/cmd/katana@latest
go install github.com/projectdiscovery/naabu/v2/cmd/naabu@latest
# Other tools
go install github.com/tomnomnom/waybackurls@latest
go install github.com/lc/gau/v2/cmd/gau@latest
go install github.com/hahwul/dalfox/v2@latest
# Add to PATH`
echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.zshrcpython server.py
# Output:
# π» Spectreweb AI v5.3.1 - Starting...
# β
Server running at http://127.0.0.1:8888{
"mcpServers": {
"spectreweb-ai": {
"command": "python",
"args": ["/path/to/spectreweb-ai/mcp_client.py"],
"env": {
"SPECTREWEB_SERVER": "http://127.0.0.1:8888"
}
}
}
}| Tool | Description |
|---|---|
mutate_payload |
π Mutate payloads with bypass techniques |
get_polyglot |
π― Polyglot payloads for multiple contexts |
waf_bypass |
π‘οΈ Generate WAF bypass variants |
test_rate_limit |
β±οΈ Test rate limiting behavior |
generate_idor_tests |
π IDOR test cases (numeric, UUID, b64) |
generate_privesc_tests |
π Privilege escalation tests |
generate_auth_bypass |
π 26 auth bypass techniques |
analyze_error_response |
π Info disclosure analysis |
extract_secrets |
π Extract secrets from responses |
suggest_tests |
π‘ AI-suggested next tests |
| Tool | Description |
|---|---|
ai_analyze |
Auto-analyze for vulns & tech detection |
ai_detect_tech |
Identify CMS, frameworks, WAF |
ai_classify_endpoint |
Classify URL β attack vectors |
ai_get_hints |
Context-aware hunting hints |
| Tool | Description |
|---|---|
load_context |
π¨ Load previous findings (call first!) |
get_report |
Get/create persistent report |
add_finding |
Add finding with severity |
get_next_steps |
AI-suggested next steps |
| Tool | Description |
|---|---|
httpx_probe |
HTTP probing with tech detect |
subfinder_scan |
Subdomain discovery |
katana_crawl |
Modern web crawler |
waybackurls |
Historical URLs (with limit) |
gau_urls |
URLs from multiple sources |
naabu_scan |
Fast port scanning |
| Tool | Description |
|---|---|
test_xss / get_xss_advanced |
XSS with context-aware payloads |
test_sqli / get_sqli_advanced |
SQLi with DB-specific payloads |
test_ssrf / get_ssrf_bypasses |
SSRF with bypass techniques |
test_race |
Race condition testing |
test_graphql |
GraphQL introspection & attacks |
jwt_attack_* |
JWT none/confusion/injection |
get_nosql_payloads |
NoSQL injection payloads |
| Tool | Description |
|---|---|
encode_payload |
URL, Base64, HTML, Hex |
decode_payload |
Decode any format |
get_wordlist |
SecLists with auto-resolve |
You: "Test target.com for vulnerabilities"
Spectreweb AI:
1. π Recon: httpx_probe β Cloudflare WAF detected
2. π‘οΈ Adapt: waf_bypass payloads generated
3. π― Test: mutate_payload for XSS with 15 variations
4. π Analyze: Found reflected input, WAF blocking <script>
5. π‘ Suggest: "Try event handlers: onerror, onload"
6. β
Success: <img src=x onerror=alert(1)> bypassed WAF
Finding saved β Persists across sessions
Session 1:
> "Scan api.target.com"
> Found: JWT auth, GraphQL endpoint, rate limiting at 100 req/min
> Note: "GraphQL introspection enabled"
Session 2 (new chat):
> load_context("target.com")
> AI knows everything from Session 1
> Suggests: "Test JWT none algorithm, GraphQL batching attack"
spectreweb-ai/
βββ server.py # Flask server
βββ mcp_client.py # MCP client (67 tools)
βββ config/
β βββ settings.py # Configuration
β βββ wordlists.py # SecLists (auto-resolve)
βββ core/
β βββ executor.py # Command execution
β βββ analyzer.py # AI analysis engine
β βββ reporter.py # Smart reporting
β βββ context.py # Session persistence
β βββ learning_store.py # π Learning data storage (NEW!)
β βββ local_ai.py # π§ Self-learning ML models (NEW!)
β βββ ai_orchestrator.py # π Hybrid AI routing (NEW!)
β βββ utils.py # Utilities
βββ web/
β βββ client.py # HTTP client
β βββ manual_testing.py # Manual testing helpers
β βββ attack_session.py # π― Advanced attack sessions (NEW!)
β βββ deep_secrets.py # π Deep secret hunting (NEW!)
β βββ advanced_attacks.py # Advanced attack techniques
β βββ advanced_scanner.py # Vuln scanners
β βββ exploits.py # Exploitation helpers
β βββ payloads.py # Payload generation
βββ api/
βββ routes.py # API endpoints
| Metric | Value |
|---|---|
| API Endpoints | 110+ |
| MCP Tools | 67 |
| Manual Testing Functions | 20+ |
| WAF Bypass Techniques | 10+ |
| Auth Bypass Techniques | 26 |
| Payload Mutation Methods | 7 |
| Local AI Models | 3 |
| Learning Store Tables | 4 |
| Self-Learning MCP Tools | 10 |
- Obtain written permission before any assessment.
- Respect scope, rate limits, and rules of engagement.
- Follow responsible disclosure practices when reporting vulnerabilities.
MIT License β Use responsibly.