Skip to content

tuannguyen14/SpectreWeb-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘» Spectreweb AI v5.3.1

Self-Learning AI for Manual Web Penetration Testing

🎯 Manual Testing First | Self-Learning AI | WAF Bypass | Context-Aware | Bug Bounty Ready

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘        β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  
β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘        β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•  
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•   β•šβ•β•   β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•
               β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
               β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
               β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
               β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
               β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
                β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•

🎯 Why Spectreweb AI Is Different

❌ Problems with Traditional Auto Scanners

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 AI: Manual Testing with AI

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."                     |
β”‚                                                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”₯ Key Differentiators

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

🧠 Self-Learning AI (NEW in v4.1.0!)

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)      β”‚        β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚                                                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸŽ“ What the AI Learns

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

πŸš€ How It Works (Automatic!)

# 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"}

πŸ”§ MCP Tools for Self-Learning

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

πŸ”„ Hybrid AI Strategy

  • 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.

⚑ Core Capabilities

πŸ›‘οΈ WAF Bypass & Evasion

# 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.

πŸ”€ Payload Mutation

# Mutate payload with multiple techniques
mutate_payload("' OR '1'='1", "case,encode,whitespace,comments")

# Output: 15+ variations to bypass filters

πŸ”‘ IDOR Testing

# 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.

πŸ”“ Auth Bypass

# 26 techniques to bypass authentication
generate_auth_bypass("/admin")
# β†’ method override, path manipulation, header bypass

πŸ‘‘ Privilege Escalation

# Test cases for privesc
generate_privesc_tests("user")
# β†’ role params, hidden params, JWT claims

πŸ“Š Response Analysis

# 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 IPs

πŸš€ Quick Start

1. Clone & Install

git 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

2. Install Security Tools (Recommended on Kali Linux)

# 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"' >> ~/.zshrc

3. Start the Spectreweb Server

python server.py

# Output:
# πŸ‘» Spectreweb AI v5.3.1 - Starting...
# βœ… Server running at http://127.0.0.1:8888

4. Configure MCP (for Windsurf / Claude / MCP-compatible clients)

{
  "mcpServers": {
    "spectreweb-ai": {
      "command": "python",
      "args": ["/path/to/spectreweb-ai/mcp_client.py"],
      "env": {
        "SPECTREWEB_SERVER": "http://127.0.0.1:8888"
      }
    }
  }
}

πŸ› οΈ Tools Overview (60+ MCP Tools)

🎯 Manual Testing (Operator-First)

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

🧠 AI Analysis

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

πŸ“‹ Smart Reporting

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

πŸ” Reconnaissance

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

βš”οΈ Attack Tools

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

πŸ” Payload & Encoding

Tool Description
encode_payload URL, Base64, HTML, Hex
decode_payload Decode any format
get_wordlist SecLists with auto-resolve

πŸ’‘ Real-World Workflow

Bug Bounty Example

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 Persistence

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"

πŸ“ Project Structure

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

πŸ“Š Statistics

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

πŸ”’ Legal & Ethical Use

⚠️ IMPORTANT: Only test systems you are explicitly authorized to test.

  • Obtain written permission before any assessment.
  • Respect scope, rate limits, and rules of engagement.
  • Follow responsible disclosure practices when reporting vulnerabilities.

πŸ“ License

MIT License – Use responsibly.


Built for bug bounty hunters and security engineers who think, not just scan.

πŸ‘» Spectreweb AI v5.3.1

Version Tools API AI

"AI that learns from your hacking style and becomes stronger every day."