SQLMap Section 2 of 13

Tamper Scripts (WAF Bypass)

Tamper scripts modify SQLMap payloads to bypass Web Application Firewalls (WAFs), IDS, and input filters. Use --tamper=script1,script2 to apply one or more scripts.

Chaining Multiple Tamper Scripts

You can combine multiple tamper scripts for stronger WAF bypass:

bash
1sqlmap -u 'http://target.com/page?id=1' --tamper=space2comment,randomcase,charencode

All Tamper Scripts

space2commentBasic

Replaces spaces with SQL comments

space2dashBasic

Replaces spaces with dash comments --

space2hashBasic

Replaces spaces with hash comments #

space2multiBasic

Replaces spaces with multi-line comments

randomcaseBasic

Randomizes case of SQL keywords (SeLeCt)

betweenBasic

Replaces > with NOT BETWEEN 0 AND, evades numeric filters

charencodeEncoding

URL-encodes all characters

base64encodeEncoding

Base64-encodes the payload

unicodeEncoding

Unicode-encodes characters

apostrophemaskQuote

Replaces apostrophes with UTF-8 full-width equivalent

apostrophenullencodeQuote

Replaces apostrophes with %00%27

apostropheunicodeencodeQuote

Unicodes apostrophes

equaltolikeOperator

Replaces = with LIKE operator

greatestOperator

Replaces > with GREATEST() function

leastOperator

Replaces < with LEAST() function

modsecurityversionedWAF

Wraps queries in versioned comments for MySQL

modsecurityzeroversionedWAF

ModSecurity zero-versioned technique

versionedkeywordsWAF

Encloses SQL keywords with versioned comments

versionedmorekeywordsWAF

Encloses more keywords with versioned comments

virguleWAF

Adds virgule backslash before quotes

percentageWAF

Adds percentage sign before quotes

halfversionedmorekeywordsWAF

Half-versioned keywords for MySQL

xforwardedforHeader

Tamper for X-Forwarded-For header injection

xforwardedhostnameHeader

Tamper for X-Forwarded-Hostname header injection

xforwardedserverHeader

Tamper for X-Forwarded-Server header injection

refererHeader

Tamper for Referer header injection

refererurlHeader

Tamper for Referer URL injection