
CVE-2024-4577 Exploit POC

This repository contains a proof-of-concept (PoC) exploit for CVE-2024-4577, a critical vulnerability affecting all versions of PHP running on Windows. The vulnerability allows attackers to execute arbitrary code remotely. The flaw also impacts the XAMPP development environment installed on Windows systems. Researchers have observed active scanning for this vulnerability, making it crucial for affected organizations to update their PHP installations promptly.
The vulnerability stems from an argument injection bug resulting from an incomplete fix for a separate vulnerability dating back to 2012 (CVE-2012-1823). The PHP development team overlooked the Best-Fit feature of encoding conversion within the Windows operating system, allowing unauthenticated attackers to bypass previous protections. This oversight enables attackers to execute arbitrary code on remote PHP servers through an argument injection attack.
Install the tool using the command:
go install -v github.com/zomasec/CVE-2024-4577/cmd/CVE-2024-4577
Use the tool with the following flags:
CVE-2024-4577 -l/-d <hostsFile>/<host> -c <concurrency> -timeout <timeout>
-l: File containing a list of hosts to scan.-d: Single host to scan.-c: Number of concurrent scans (default is 10).-timeout: Request timeout in seconds (default is 5).Example:
CVE-2024-4577 -l hosts.txt -c 20 -timeout 10
You can use these dorks :
Hunter:header.server="PHP"
FOFA: server="PHP"
SHODAN: server: PHP os:Windows