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

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

缺陷编号:wooyun-2014-079972

漏洞标题:某系统通用型任意文件上传导致GetShell # 2(无需登录/涉及多所大学)

相关厂商:cncert国家互联网应急中心

漏洞作者: Coody

提交时间:2014-10-21 10:19

修复时间:2015-01-19 10:20

公开时间:2015-01-19 10:20

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

危害等级:高

自评Rank:19

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

某系统通用型任意文件上传导致GetShell # 2(无需登录/涉及多所大学)

详细说明:

百度搜索:卓越课程中心3.0
技术支持:卓越电子 http://www.able-elec.com/

收集的部分案例: 
http://218.241.222.230/G2S/AdminSpace/QE/AddCustomForm.aspx
http://kczx.hnist.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://biz.sandau.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://gxk.scu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://www9.xjmu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://sducc.sandau.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://kczx.sppc.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://kczx.sus.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://course.hzau.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://course.ujn.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://202.194.131.160/G2S/AdminSpace/QE/AddCustomForm.aspx
http://ocw.sjtu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://116.236.150.117/G2S/AdminSpace/QE/AddCustomForm.aspx
http://wlkc.forestpolice.net/G2S/AdminSpace/QE/AddCustomForm.aspx
http://202.201.224.60/G2S/AdminSpace/QE/AddCustomForm.aspx
http://kczx.xhu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.usst.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://220.163.113.53/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.xjtu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.jlu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.xjtu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.xjtu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.scu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://e-learning.ecust.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.shnu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.sjtu.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
http://cc.sbs.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx


--------------------------
问题页面:http://www.xxoo.com/G2S/AdminSpace/QE/AddCustomForm.aspx
查看该页面的源文件,同目录下有个AddCustomForm.js,重点代码如下:

//上传格式及存放目录:
$("#fileUpload").uploadify({
'uploader': '../../js/jquery.uploadify.swf',
'script': 'AddCustomForm.ashx?action=FileUpload',
'cancelImg': '../../ico/cancel.png',
'buttonImg': '../../images/button_select.gif',
'wmode': 'transparent',
'folder': '../../ewebeditor/uploadfile/QEData',
'queueID': 'FileQueue',
……省略部分代码……
//本地验证格式为xml,可以抓包改包
fileName = fileObj.name;
if (fileObj.type !== ".xml") {
alert("该格式已经被限定,请重新上传");
black;
}
$("#btnConfirm").attr("disabled", false);
fileName1 = fileName;
……省略部分代码……
//保存上传信息,保存之前系统会返回生成的文件名
function SaveUploadUrl(fileName, fileUrl) {
$.ajax({ url: 'AddCustomForm.ashx?action=SaveUploadUrl&flag='+flag +'&fFileTitle=' + encodeURI(fileName) + '&fFileName=' + encodeURI(fileUrl) + "&fType=" + encodeURI(fType) + "&fFileID=" + encodeURI(fFileID), cache: false,
success: function(data) {
if (flag == 1) {
alert("上传成功");
}
else {
alert("编辑成功");
}
window.parent.win_Class_AddTemplateFile.hide();
}
});

}


漏洞演示:
1# 打开 http://www.xxoo.com/G2S/AdminSpace/QE/AddCustomForm.aspx

QQ图片20141019124443.jpg


2# 选择xml文件上传(文件内容为asp代码)

QQ图片20141019124627.jpg


QQ图片20141019124856.jpg


QQ图片20141019125018.jpg


3# 最后反问路径 http://www.xxoo.com/G2S/ewebeditor/uploadfile/QEData/201410191249041576193_1.asp即为webshell地址。

QQ图片20141019130123.jpg


通用型证明:
1# http://202.201.224.60/G2S/AdminSpace/QE/AddCustomForm.aspx
Webshell地址:
http://202.201.224.60/G2S/ewebeditor/uploadfile/QEData/201410191300093842049_1.asp

QQ图片20141019131130.jpg


2# http://kczx.hnist.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
Webshell地址:
http://kczx.hnist.cn/G2S/ewebeditor/uploadfile/QEData/201410191306367939596_1.asp

QQ图片20141019131240.jpg


3# http://biz.sandau.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
Webshell地址:
http://biz.sandau.edu.cn/G2S/ewebeditor/uploadfile/QEData/201410191307389348371_1.asp

QQ图片20141019131350.jpg


4# http://kczx.sus.edu.cn/G2S/AdminSpace/QE/AddCustomForm.aspx
Webshell地址:
http://kczx.sus.edu.cn/G2S/ewebeditor/uploadfile/QEData/201410191305088518359_1.asp

QQ图片20141019131508.jpg


<完>

漏洞证明:

……

修复方案:

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:14

确认时间:2014-10-25 23:52

厂商回复:

最新状态:

暂无