A production-grade, modular SQL Injection testing and exploitation framework for security professionals. Built with advanced detection logic, real exploitation capabilities, and comprehensive reporting.
- Overview
- Key Features
- Requirements
- Installation
- Quick Start
- Architecture
- Usage Examples
- Configuration
- Documentation
- Performance & Methodology
- Security & Disclaimer
SQLMap Tool v2 is a sophisticated SQL Injection (SQLi) detection and exploitation framework designed for:
- Security Researchers: Advanced detection techniques with multi-metric validation
- Penetration Testers: Real data extraction with DBMS-specific payloads and WAF evasion
- Developers: Modular, extensible codebase for custom integration and testing
- Teams: Structured reporting (JSON/HTML), logging, and collaboration-friendly output
Unlike basic SQLi scanners, this tool implements advanced techniques:
- Similarity-Based Detection using difflib for reduced false positives
- Multi-Metric Response Analysis (status, length, time, headers, content)
- DBMS Fingerprinting to identify database systems and version
- Binary Search Data Extraction for efficient and accurate dumping
- Boolean, Error, Time-Based, and Union-Based SQLi detection
- WAF Bypass Techniques and adaptive payload generation
- Multi-metric response analysis (similarity, status code, response length, timing)
- DBMS-specific fingerprinting and version detection
- Baseline comparison to reduce false positives
- Support for error-based, boolean-based, time-based, and union-based SQLi
- Per-parameter testing with granular injection points
- Binary search algorithm for efficient data extraction
- Multi-trial validation to ensure accuracy
- DBMS-specific payloads (MySQL, PostgreSQL, Oracle, SQL Server, SQLite)
- WAF and IDS evasion techniques
- Comment stripping, encoding, and payload obfuscation
- Scanner: Injection and detection engine
- Analyzer: Response analysis and fingerprinting
- Exploiter: Data extraction and exploitation
- Utils: Logging, HTTP handling, reporting
- Easy to extend, test, and integrate
- Structured JSON reports with full exploitation details
- HTML reports for stakeholder presentation
- Findings summary with confidence scores
- Extracted data organized by database/table/column
- 6-level logging framework (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- File and console output with timestamps
- Detailed operation tracking for debugging and auditing
- Multi-threaded scanning and exploitation
- Concurrent parameter testing
- Configurable thread pool and timeouts
- Efficient binary search extraction (logarithmic complexity)
- Python: 3.7 or higher
- Libraries:
requests(for HTTP handling) - Optional: Modern browser (for viewing HTML reports)
- Permissions: Authorized testing target only
git clone <repo-url> sqlmap_tool
cd sqlmap_toolpip install requestsOr using a virtual environment (recommended):
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install requestspython3 main.py --helppython3 main.py -u "http://target.com/page?id=1"python3 main.py \
-u "http://target.com/page?id=1" \
--techniques=all \
--threads=10 \
--report=reports/target.json \
--htmlpython3 main.py -u "http://target.com/page?id=1" --log-level=DEBUGSee QUICKSTART.md for detailed instructions.
sqlmap_tool/
├── main.py # CLI entry point and orchestrator
├── scanner/
│ ├── __init__.py
│ ├── detection_engine.py # Detection logic (error, boolean, time, union)
│ ├── injector.py # Multi-threaded injection orchestrator
│ └── payloads.py # Payload library (40+ payloads)
├── analyzer/
│ ├── __init__.py
│ ├── response_analyzer.py # Response analysis and fingerprinting
├── exploiter/
│ ├── __init__.py
│ ├── exploitation_engine.py # Binary search extraction engine
│ └── extractor.py # Full exploitation workflow
├── utils/
│ ├── __init__.py
│ ├── logger.py # Structured logging framework
│ ├── request_handler.py # HTTP handling with retry logic
│ ├── payloads.py # Payload utilities
│ └── report_generator.py # JSON/HTML report generation
├── logs/ # Log files
├── reports/ # Generated reports
└── *.md # Comprehensive documentation
| Module | Purpose |
|---|---|
| scanner.detection_engine | Error, Boolean, Time, Union-based detection |
| scanner.injector | Multi-threaded test orchestration |
| scanner.payloads | DBMS-specific payload library |
| analyzer.response_analyzer | Similarity, fingerprinting, multi-metric analysis |
| exploiter.exploitation_engine | Binary search data extraction |
| exploiter.extractor | Full exploitation workflow coordination |
| utils.logger | Structured logging (6 levels, file+console) |
| utils.request_handler | HTTP requests with retry, timeout, injection |
| utils.report_generator | JSON/HTML reporting |
python3 main.py -u "http://dvwa.local/login.php?login=admin" \
--parameter=login \
--techniques=errorpython3 main.py -u "http://target.com/product?id=123&category=books" \
--techniques=all \
--threads=15 \
--timeout=10 \
--log-level=INFOpython3 main.py -u "http://target.com/page?id=1" \
--detect \
--extract \
--database=test_db \
--table=users \
--column=password \
--report=reports/extraction.json \
--html \
--threads=10See EXAMPLES.md for 20+ advanced scenarios.
The tool supports extensive CLI arguments and configuration:
| Argument | Description |
|---|---|
-u, --url |
Target URL (required) |
--technique |
Injection technique (error, boolean, time, union, all) |
--threads |
Number of concurrent threads (default: 5) |
--parameter |
Target parameter (auto-detect if omitted) |
--detect |
Run detection phase only |
--extract |
Run extraction phase |
--database |
Database name (for extraction) |
--table |
Table name (for extraction) |
--column |
Column name (for extraction) |
--timeout |
Request timeout in seconds (default: 10) |
--report |
Save JSON report to file |
--html |
Generate HTML report alongside JSON |
--log-level |
Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
See CONFIGURATION.md for complete options.
- QUICKSTART.md — Installation, setup, and basic usage
- EXAMPLES.md — 20+ real-world usage scenarios
- CONFIGURATION.md — All CLI arguments and settings
- UPGRADE_NOTES.md — Version history and migration guide
- IMPLEMENTATION_SUMMARY.md — Technical architecture and algorithms
- DELIVERY_SUMMARY.md — Delivery checklist and roadmap
- Baseline Establishment: Extract baseline response (status, length, headers)
- Payload Injection: Test DBMS-specific payloads
- Response Analysis: Compare against baseline using:
- Similarity (difflib)
- Status code changes
- Response length variance
- Timing analysis
- Error messages
- Multi-Metric Validation: Combine metrics for accurate detection
- Fingerprinting: Identify DBMS and version via error patterns
- Binary Search: Efficiently extract one character at a time
- Multi-Trial Validation: Confirm each character with multiple tests
- Adaptive Payloads: Use DBMS-specific queries for accuracy
- Progress Tracking: Resume interrupted extractions
- Threading: O(n/t) where n = tests, t = threads
- Binary Search: O(log n) queries per character
- Typical Execution: ~5-15 seconds for detection, ~1-5 minutes for full extraction
This tool is intended exclusively for:
- ✅ Authorized penetration testing
- ✅ Security research on systems you own
- ✅ Educational purposes in controlled environments
- Obtain written authorization before testing any system you don't own
- Comply with local laws regarding penetration testing and cybersecurity
- Responsible disclosure: Report findings responsibly
- No malicious use: This tool must not be used for unauthorized access or data theft
- Use a dedicated VPN/proxy for testing
- Test in isolated environments first
- Maintain logs of all testing activities
- Document findings professionally
- Clean up after testing
- Issues: Report bugs via GitHub issues
- Documentation: See wikis and guides in
*.mdfiles - Contribution: Fork, test locally, submit PRs
- Roadmap: See
DELIVERY_SUMMARY.mdfor Version 3 features
This tool is for authorized security testing only. Users are responsible for ensuring compliance with applicable laws and obtaining proper authorization before use.
Planned enhancements for future releases:
- UI dashboard for real-time monitoring
- Machine learning-based detection
- Distributed scanning capabilities
- Advanced CAPTCHA handling
- Database schema enumeration
- Automated remediation suggestions
See full roadmap in DELIVERY_SUMMARY.md.
-
Made with ❤️ by 7ima-SR
-
🌐 Website: https://ibrahim-elsaied.netlify.app/
Version 2.0 — Professional Edition — April 2026