某酒业网 会员注册上传漏洞漏洞预警 -电脑资料

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

   

    发布作者:xiaokis

    漏洞类型:文件上传

    漏洞描述:

    文件:sub_upload.asp

    01

    02 <%if session("admin_name")="" and Session("ME_name")="" then%>

    03

    11

    12

    19 对不起,您不是会员,不会进行此项操作!

    20 <%else%>

    21 <%

    22 dim arr(3)

    23 dim upload,file,formName,formPath,iCount,filename,fileExt,i

    24 set upload=new upload_5xSoft ''建立上传对象

    25

    26 formPath="" '图片存放的路径:product目录下的uploadimages文件夹 ''在目录后加(/)

    27

    28 ''列出所有上传了的文件

    29 for each formName in upload.file

    30 set file=upload.file(formName)

    31 if file.filesize>0 then

    32 if file.filesize>10000000 then

    33 response.write "图片大小超小了限制[

    34

    35 nclick=history.go(-1)>重新上传]"

    36 response.end

    37 end if

    38 fileExt=lcase(right(file.filename,4))

    39 if fileExt<>".jpg" then

    40 response.write "文件格式限制[请重新上

    41

    42 传]"

    43 response.end

    44 end if

    45 end if

    46

    47 filename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)

    48

    49 &file.FileName

    50

    51 if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据

    52 file.SaveAs Server.mappath(formpath&filename) ''保存文件

    53 'response.write file.FilePath&file.FileName&"("&file.FileSize&") =>

    54

    55 "&formPath&File.FileName&"上传成功"

    56 response.write "上传成功 请返回"

    57

    58 end if

    59 set file=nothing

    60 next

    61 set upload=nothing

    62 Response.Write ""

    63 %>

    64 <%end if%>

    文件上传是自定义名字的,所以利用IIS 解析漏洞,

某酒业网 会员注册上传漏洞漏洞预警

电脑资料

某酒业网 会员注册上传漏洞漏洞预警》(https://www.unjs.com)。

    利用方法:首先注册用户,然后填写黄页,上传x.asp;.jpg

    上传页面upImgFile/upload.htm

    提交页面:upImgFile/sub_upload.asp

    文件上传后存在目录下:upImgFile

    漏洞证明:http://www.xxx.com/upImgFile/2011129204147jiami.asp;.jpg

    修复方案:临时限制上传目录脚本执行或者加强文件过滤。

最新文章