Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-4577 PoC — PHP 操作系统命令注入漏洞

Source
Associated Vulnerability
Title:PHP 操作系统命令注入漏洞 (CVE-2024-4577)
Description:PHP是一种在服务器端执行的脚本语言。 PHP存在操作系统命令注入漏洞,该漏洞源于在特定条件下,Windows系统使用“Best-Fit”行为替换命令行中的字符,这可能导致PHP CGI模块错误地将这些字符解释为PHP选项,从而泄露脚本的源代码,在服务器上运行任意PHP代码等。以下版本受到影响:8.1至8.1.29之前版本,8.3至8.3.8之前版本,8.2至8.2.20之前版本。
Description
Bash script that checks if a PHP CGI setup is vulnerable to the CVE-2024-4577 argument injection vulnerability
Readme
*How the Script Works:*
- Input Prompt: The script prompts the user to enter a domain.
- Construct Payload: It constructs a payload that attempts to inject a command using the CGI argument injection.
- HTTP Request: The script uses curl to send a request to the specified domain with the payload.
- Check Response: The response is checked for a unique string (CVE-2024-4577-Vulnerable) to determine if the server is vulnerable.
- Output Result: The script outputs [+] Vulnerable if the server is found to be vulnerable, otherwise [-] Not Vulnerable.


*Usage:*
1. Save the script to a file, e.g., check_cve_2024_4577.sh.
2. Make the script executable: chmod +x check_cve_2024_4577.sh.
3. Run the script: ./check_cve_2024_4577.sh.
4. Enter the domain you want to check when prompted.

Disclaimer:
- Ensure you have permission to test the target server.
- Use this script responsibly and only for legitimate security testing purposes.
- The script is a basic example and may need modifications to handle various edge cases or more complex setups.

This script provides a quick way to check for the CVE-2024-4577 vulnerability, but comprehensive security assessments should always be conducted by professionals.
File Snapshot

[4.0K] /data/pocs/c53eca8846294570bc4b67be63039bc292331684 ├── [ 940] cve_2024_4577.sh └── [1.2K] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.