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

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

缺陷编号:wooyun-2016-0175738

漏洞标题:海康威视某视频接入网关系统通用型设计缺陷(漏洞集合无需登录)

相关厂商:海康威视

漏洞作者: 路人甲

提交时间:2016-02-14 08:13

修复时间:2016-05-18 18:30

公开时间:2016-05-18 18:30

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

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-02-14: 细节已通知厂商并且等待厂商处理中
2016-02-18: 厂商已经确认,细节仅向厂商公开
2016-02-21: 细节向第三方安全合作伙伴开放(绿盟科技唐朝安全巡航无声信息
2016-04-13: 细节向核心白帽子及相关领域专家公开
2016-04-23: 细节向普通白帽子公开
2016-05-03: 细节向实习白帽子公开
2016-05-18: 细节向公众公开

简要描述:

rt

详细说明:

多处越权访问:
设备类型管理http://xxxxxxxxx:7288/devicetype/
取流服务器配置http://xxxxxxx:7288/mediaconfig/
信令网关信息http://xxxxxxx:7288/mediastatus/
远程升级http://xxxxxxxx:7288/remoteupdate/
服务器日志http://xxxxxxx:7288/serverlog/
信令服务器配置http://xxxxxxx:7288/signalconfig/
信令网关信息http://xxxxxx:7288/signalstatus/
转码服务器配置http://xxxxxx:7288/transformserver/
用户管理http://xxxxxxxxx:7288/userinfo/
任意目录遍历(data/fetchPlugJsonByFolder.php)

<?php
include('../common/connDb.php');
$dirName = $_GET['dirName'];
class TreeNode{
var $id;
var $text;
var $iconCls;
var $state;
var $children=array();
function __construct(){

}
public function setId($id)
{
$this->id = $id;
}
public function setText($text)
{
$this->text = $text;
}
public function setIconCls($iconCls)
{
$this->iconCls = $iconCls;
}
public function setState($state)
{
$this->state = $state;
}
public function setChildren($children)
{
$this->children = $children;
}
public function getId()
{
return $this->id;
}
public function getText()
{
return $this->text;
}
public function getIconCls()
{
return $this->iconCls;
}
public function getState()
{
return $this->state;
}
public function getChildren()
{
return $this->children;
}

}

$jsonArray = array();
$pNode = new TreeNode();
$pNode->setId('0');
$pNode->setText($dirName);
$pNode->setIconCls('icon-plugFold');
array_push($jsonArray,$pNode); //��Ӳ���ļ��и��ڵ�
$floderPath ='../../../../plugins/'.$dirName;
if(is_dir($floderPath)){
$handle=opendir($floderPath);
for(;$file = strtolower(readdir($handle));){
if($file != '..' && $file != '.'){
$cNode = new TreeNode();
$cNode->setId($file);
$cNode->setText($file);
$cNode->setIconCls('icon-systemMenu');
if ($pNode->getChildren() != null) {
$childrenArray = $pNode->getChildren();
array_push($childrenArray,$cNode);
$pNode->setChildren($childrenArray);
}else{
$childrenNodes = array();
array_push($childrenNodes,$cNode);
$pNode->setChildren($childrenNodes);
}
}
}
closedir($handle);
}
print_r(json_encode($jsonArray));
?>


同时发现部分安装了海康威视相关设备系统的计算机会同时开启Java RMI Registry服务,默认端口1099 由于未授权访问导致目录遍历。
1099/tcp open java-rmi Java RMI Registry
任意目录删除(/data/deletePlugFolder.php)

<?php
include('../common/connDb.php');
$fileNames = $_POST['fileNames'];
$foldPath = '../../../../plugins/';
$fileNameArray = explode(",",$fileNames);
for($i=0;$i<count($fileNameArray);$i++){
if(!deldir($foldPath.$fileNameArray[$i])){
echo 1;
return;
}
}
echo 0;
function deldir($dir) {
//先删除目录下的文件:
$dh=opendir($dir);
while ($file=readdir($dh)) {
if($file!="." && $file!="..") {
$fullpath=$dir."/".$file;
if(!is_dir($fullpath)) {
unlink($fullpath);
} else {
deldir($fullpath);
}
}
}
closedir($dh);
//删除当前文件夹:
if(rmdir($dir)) {
return true;
} else {
return false;
}
}
?>

漏洞证明:

多处越权访问(举例三个例子,更多越权可以请参考案例):

aaaaaaaaaaaaa11111111111111111111111.jpg


用户管理右键源码可获取明文密码

aaaaaaaaaaaaaaaaaa22222222222222222222222222.jpg


aaaaaaaaaaaaaa33333333333333333333.jpg


任意目录遍历(data/fetchPlugJsonByFolder.php)

aaaaaaaaaaaaaaaaaaa44444444444444444444444.jpg


aaaaaaaaaaaaaaaa55555555555555555555.jpg


Java RMI Registry服务未授权访问导致目录遍历

aaaaaaaaaaaaaaaaaa66666666666666666666666.jpg


aaaaaaaaaaaaaaaaaa7777777777777777777777.jpg


aaaaaaaaaaaaaaaaaa888888888888888888888.jpg


aaaaaaaaaaaaaaa99999999999999999999.jpg


任意目录删除(/data/deletePlugFolder.php)

aaaaaaaaaaaaaaaaa11111111111111111111111.jpg


案例:

**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
http://**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
http://**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
http://**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:8090/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/
**.**.**.**:7288/


aaaaaaaaaaaaaaaaaaaaa22222222222222222222222.jpg

修复方案:

你们懂的。

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2016-02-18 18:25

厂商回复:

您好,该问题属于旧版本已知问题,已在2015年修复。我们会对使用旧版本的客户进行加固升级。未来公司将逐步替换PHP开发的产品。

最新状态:

暂无