Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
opnsense-uidfield-system-uid0 — OPNsense 26.7.6 - 高危 - 远程 - 权限残留 - UidField uid 0 | Kitploit
工具/GitHubGitHub/abraxas/opnsense-uidfield-system-uid0
身份验证与授权权限提升漏洞分析漏洞利用安全虚拟化Web安全渗透测试实验室与实践

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
GitHub
abraxas/opnsense-uidfield-system-uid0

opnsense-uidfield-system-uid0

OPNsense 26.7.6 - 高危 - 远程 - 权限残留 - UidField uid 0

查看仓库
2天前尚未审核

Abraxas Labs - opnsense-uidfield-system-uid0

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  [email protected]  ·  opnsense-uidfield-system-uid0

opnsense-uidfield-system-uid0

类别: 权限残留 可达性: 远程

OPNsense core 26.7.6 (a842fe48) - opnsense.org

委托的 page-system-usermanager 分两步执行 scope=system 然后 uid=0。UidField::setValue 仅在 scope 不是 system 时自动分配 2000+。setNodes 在 scope 之前应用 uid,因此一次添加无法标记为 0。第二次 POST 可以。auth sync user 然后执行 pw useradd -o -u 0,主目录为 /root,组为 wheel。授权密钥落入 /root/.ssh/authorized_keys。权限为 System: Access: Management,而非 page-all。

ID暂无 CVE
类别权限残留
可达性远程(已认证 WebGUI / 本地 API 密钥)
CWECWE-269 / CWE-284
CVSS高危:8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
产品OPNsense core(Deciso B.V.)
受影响OPNsense core 26.7.6 (a842fe48c21288d11a422cb944678e8eb308becf) UidField / user-manager
认证WebGUI 会话或具有 page-system-usermanager 的本地 API 密钥
许可证GNU Affero GPL v3.0
实验环境仅 127.0.0.1

我固定了标签 26.7.6 "Xenial Xenops"。实验环境是一个 PHP gadget,由固定的 UidField::setValue 加上 local_user_set 组成,回环身份为 127.0.0.1:18810。stable/26.7 在 2026-10-09 以 ea4f01fe 回退了 UID-0 写入。该回退并非此固定版本。无 GHSA。

攻击者能做什么

方法汇聚点权限
两步添加 scope=system 然后设置 uid=0 然后 auth sync user固定 UidField::setValue 然后桩 pw useradd -o -u 0 (auth.inc:345-397)完整性(实验证明): 第二个 Unix UID 0,主目录 /root,组 wheel。实验:after-add=2000 after-set=0 pw-o-u0=yes。
相同设置 + authorizedkeysfile_put_contents /root/.ssh/authorized_keys (auth.inc:407-416)完整性(实验证明): 见证文件位于 /root/.ssh/authorized_keys。
若 sshd 开启则以该名称 SSH(AllowGroups wheel;PermitRootLogin 不适用于非 root 用户名)sshd侦察 + 完整性(推断): 以新的 wheel 名称登录,读取 /root。Gadget 未启动 sshd。
相同 POST 使用 scope=user uid=0UidField 自动分配 2000+否定(实验证明): uid 保持 2000。scope-user-uid0-ignored=yes。
set 原装 root uuid uid=80pw usermod -u 80完整性 + 可用性(推断): 将原装 root 移出 UID 0。Gadget 未对 root 执行 usermod。
set root uuid name=hax + scope=user重命名检查被跳过;对新名称执行 auth sync user完整性(推断): 系统用户重命名,26.7.6 检查本应阻止。

实验证明 vs 推断: 两步 UID 0、pw useradd -o -u 0、密钥路径以及 scope=user 忽略均为实验成功。实时 sshd 接受和原装 root usermod/重命名为推断。Gadget,而非完整 OPNsense VM。

要求: WebGUI 会话或具有 page-system-usermanager 的本地 API 密钥。会话路径上的 CSRF。非 page-all。默认 config.xml.sample 仅向组 admins 授予 page-all。

保持关闭的相邻攻击面

攻击面实验
POST /api/auth/user/* 无 page-system-usermanagerACL 关闭
user-config-readonlysave() 仍 throwReadOnly()
CSV 上传剥离 uid/scope
CVE-2026-44194 email-as-shellmwexecf %s + email 正则
密码页面会话绑定
page-all 执行相同 POST此固定版本上的 changelog 功能
未认证关闭
Unix su 在 master.passwd 中使用 *GUI 哈希保留在 config.xml 中,除非安装程序强制

无未认证。无需 page-all。26.7.6 将系统范围用户的选定 UID 呈现为管理员功能。未匹配的遍历是一个没有 page-all 的委托 user-manager。

实验

cd lab
./run.sh

回环 127.0.0.1:18810。Compose 项目 opnsense-uidfield-system-uid0。镜像来自固定版本 26.7.6。见证 OPNSENSE-UIDFIELD-SYSTEM-UID0-WITNESS。最后一行:

SUCCESS opnsense-uidfield-system-uid0 two-step-uid=0 scope-user-uid0-ignored=yes pw-o-u0=yes keys=/root/.ssh/authorized_keys OPNSENSE-UIDFIELD-SYSTEM-UID0-WITNESS

修复

除非调用者是完整管理员,否则拒绝 UID 0(以及冲突的服务 UID)。在 setNodes 中先应用 scope 再应用 uid,或拒绝同时翻转两者的 POST。将 26.7.6 重命名检查保持在 pre-setNodes scope 上,而非提交的 scope。ea4f01fe 后来在 stable/26.7 上回退了 UID-0 写入;该提交并非此固定版本。

参考

  • github.com/opnsense/core a842fe48c21288d11a422cb944678e8eb308becf
  • UidField.php
  • auth.inc local_user_set
  • 已命名页面(非此残留):CVE-2026-44194 / GHSA-f59w email-as-shell
  • 后续回退(非此固定版本):stable/26.7 上的 ea4f01fe
  • CWE-269 / CWE-284
下载工具