A comprehensive SQL injection testing toolkit written in C, featuring modern detection techniques, verification capabilities, and support for multiple database systems.
This toolkit is designed for:
- Educational purposes and learning about SQL injection vulnerabilities
- Authorized penetration testing and security assessments
- Testing your own applications and systems
- Security research with proper authorization
โ DO NOT USE FOR:
- Unauthorized testing of third-party systems
- Malicious attacks or illegal activities
- Testing without explicit written permission
Users are solely responsible for compliance with local laws and regulations.
- Fast preliminary vulnerability detection
- Simple error-based SQL injection detection
- Lightweight and efficient
- Perfect for quick initial assessments
-
Error-based SQL Injection Detection
- MySQL, PostgreSQL, Oracle, MSSQL support
- Comprehensive error pattern database
- 16+ specialized payloads
-
Time-based SQL Injection Detection
- Intelligent timing analysis
- Database-specific delay functions
- Response time measurement and validation
-
Boolean-based SQL Injection Detection
- Logic-based vulnerability testing
- Conditional payload analysis
- True/false response comparison
-
Modern 2025 Features
- Professional ASCII art interface
- User-Agent spoofing
- SSL/TLS support with bypass options
- HTTP redirect following
- Detailed vulnerability reporting
- Rate limiting to avoid detection
- Reduces false positives by 90%+
- Baseline response comparison
- Confidence scoring system (0-100%)
- Multi-method validation
- Comprehensive manual verification guidance
- GCC compiler
- libcurl development libraries
- Linux/Unix environment
- Internet connection for testing
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install gcc libcurl4-openssl-dev build-essential gitCentOS/RHEL/Fedora:
sudo yum install gcc libcurl-devel git
# or for newer versions:
sudo dnf install gcc libcurl-devel gitArch Linux:
sudo pacman -S gcc curl git base-develgit clone https://github.com/yourusername/sql-injection-toolkit-2025.git
cd sql-injection-toolkit-2025make all./sql_injection "http://example.com/page.php?id=1"./advanced_sqli "http://example.com/vulnerable.php"./verify_sqli "http://example.com/vulnerable.php"# Clone repository
git clone https://github.com/yourusername/sql-injection-toolkit-2025.git
cd sql-injection-toolkit-2025
# Build all tools
make all
# Clean compiled files (if needed)
make clean
# Build individual tools
make sql_injection # Basic scanner
make advanced_sqli # Advanced scanner
make verify_sqli # Verification tool
# Run tests
make test# Simple vulnerability test
./sql_injection "http://testsite.com/product.php?id=1"
# Test with existing parameters
./sql_injection "https://example.com/search.php?q=test&category=1"# Full vulnerability assessment
./advanced_sqli "http://vulnerable-site.com/page.php"
# The tool will automatically test:
# - 16 error-based payloads
# - 7 time-based payloads
# - 8 boolean-based payloads
# - Provide detailed reporting# Verify potential vulnerabilities
./verify_sqli "http://potentially-vulnerable.com/page.php"
# This tool will:
# - Establish baseline responses
# - Test multiple validation methods
# - Provide confidence scoring
# - Suggest manual verification steps- Basic Syntax Errors:
',",\ - Logic Operators:
OR,AND,UNION - Database Functions:
VERSION(),DATABASE(),USER() - Information Schema:
information_schema.tables
- MySQL:
SLEEP(5),BENCHMARK() - PostgreSQL:
PG_SLEEP(5) - MSSQL:
WAITFOR DELAY '00:00:05' - Oracle: Custom delay techniques
- True Conditions:
AND 1=1,AND 'a'='a' - False Conditions:
AND 1=2,AND 'a'='b' - Conditional Logic:
IF(),CASE WHEN
| Database | Error Detection | Time Detection | Boolean Detection | Confidence |
|---|---|---|---|---|
| MySQL | โ Excellent | โ Excellent | โ Excellent | 95%+ |
| PostgreSQL | โ Excellent | โ Excellent | โ Excellent | 95%+ |
| Microsoft SQL Server | โ Very Good | โ Excellent | โ Very Good | 90%+ |
| Oracle | โ Good | 80%+ | ||
| SQLite | โ No | 60%+ |
๐ฏ Advanced SQL Injection Scanner 2025
=====================================
Target: http://vulnerable-app.com/page.php
๐ Testing Error-based SQL Injection...
Testing payload: 1'
โ ๏ธ VULNERABLE! Detected MySQL error: You have an error in your SQL syntax
โฑ๏ธ Testing Time-based SQL Injection...
Testing time delay with: 1' AND SLEEP(5)--
โ ๏ธ VULNERABLE! Response time: 5.23s (indicates time delay)
๐ SCAN RESULTS SUMMARY
======================
Total payloads tested: 31
Vulnerabilities found: 5
Confidence level: HIGH (95%)
๐จ DETAILED VULNERABILITY REPORT:
================================
โข Payload: 1'
Method: ERROR_BASED_MySQL
Details: You have an error in your SQL syntax
Confidence: 95%
โ ๏ธ RECOMMENDATION: This application is vulnerable to SQL injection.
Implement proper input validation and parameterized queries immediately.
๐ SQL Injection Verification Tool 2025
========================================
๐ Establishing baseline response...
โ
Baseline established (Size: 1,247 bytes, Time: 0.45s, HTTP: 200)
๐ VERIFICATION RESULTS:
========================
Total tests: 15
Confirmed vulnerabilities: 3
Confidence level: HIGH (92%)
๐จ CONFIRMED VULNERABLE PAYLOADS:
โข 1'
โข 1' OR '1'='1
โข 1' AND SLEEP(5)--
Modify payload arrays in source files:
// In advanced_sqli.c
const char* custom_payloads[] = {
"your_custom_payload_here",
"another_payload' OR 1=1--",
NULL // Always end with NULL
};// Adjust timing thresholds
#define SLEEP_DELAY 2 // Base delay for time-based tests
#define CONFIDENCE_THRESHOLD 70 // Minimum confidence for reporting// Modify buffer sizes
#define MAX_RESPONSE_SIZE 16384 // Maximum response size
#define MAX_URL_SIZE 1024 // Maximum URL length# Missing libcurl development package
sudo apt-get install libcurl4-openssl-dev
# Missing build tools
sudo apt-get install build-essential
# Manual compilation
gcc -o sql_injection sql_injection.c -lcurl -lm- Connection refused: Check if target URL is accessible
- SSL certificate errors: Tool automatically bypasses SSL verification
- Timeout errors: Increase timeout in source code
- Permission denied: Ensure executable permissions (
chmod +x)
- Use the verification tool:
./verify_sqli <url> - Check confidence scores (>70% recommended)
- Manual verification with multiple payloads
- Cross-validate with professional tools like SQLMap
- DVWA (Damn Vulnerable Web Application)
- WebGoat
- bWAPP (Buggy Web Application)
- SQLi Labs
- Mutillidae
# Using Docker for safe testing
docker run -d -p 80:80 vulnerables/web-dvwa
docker run -d -p 8080:8080 webgoat/webgoat-8.0
# Test against local setup
./advanced_sqli "http://localhost/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit"- OWASP SQL Injection Prevention Cheat Sheet
- PortSwigger SQL Injection Labs
- SQLMap Documentation
- NIST Vulnerability Testing Guide
- Our Comprehensive Validation Guide
We welcome contributions! Please read our guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/enhancement) - Follow C coding standards
- Add comprehensive comments
- Test thoroughly
- Commit changes (
git commit -am 'Add new feature') - Push to branch (
git push origin feature/enhancement) - Create Pull Request
- Follow K&R C style
- Include comprehensive error handling
- Add comments for complex logic
- Test on multiple distributions
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
This software is provided for educational and authorized testing purposes only. The authors and contributors:
- Are not responsible for any misuse of this software
- Do not encourage or support unauthorized testing
- Strongly advocate for responsible disclosure
- Recommend following all applicable laws and regulations
Always ensure you have explicit written permission before testing any systems you do not own.
- OWASP for security research and guidelines
- libcurl team for the excellent HTTP library
- Security community for continuous improvement
- Ethical hackers who use tools responsibly
- Issues: Use GitHub Issues for bug reports
- Documentation: Check VALIDATION_GUIDE.md
- Security: Report security issues privately
- Web interface for easier usage
- XML/JSON output formats
- Integration with CI/CD pipelines
- Mobile app testing capabilities
- Advanced evasion techniques
- Machine learning detection improvements
โญ If you find this toolkit useful, please consider starring the repository!
๐ก๏ธ Remember: With great power comes great responsibility. Use ethically!