目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

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

来源
关联漏洞
标题: 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
CVE-2024-4577 is a critical vulnerability in PHP affecting CGI configurations, allowing attackers to execute arbitrary commands via crafted URL parameters.
介绍
Orange Tsi 🍊

This vulnerability was found by Orange Tsai (@orange_8361) of DEVCORE (@d3vc0r3). Make sure to follow his outstanding research, our role was to only recreate and develop the exploit for this issue.
Security Alert: CVE-2024-4577 PHP CGI Argument Injection Vulnerability

Overview
CVE-2024-4577 is a critical vulnerability in PHP affecting CGI configurations, allowing attackers to execute arbitrary commands via crafted URL parameters.

Affected Versions
PHP 8.3 < 8.3.8
PHP 8.2 < 8.2.20
PHP 8.1 < 8.1.29

Attack Vector
Attackers can exploit this by sending specially crafted requests to the PHP CGI script, injecting malicious parameters to execute arbitrary commands. This can lead to full system compromise.

Mitigation
- Upgrade to the latest PHP version(It is strongly recommended that all users upgrade to the latest PHP versions of 8.3.8, 8.2.20, and 8.1.29)
- Sanitize and validate input parameters.
- Use secure configuration settings to limit CGI parameter handling.


How to Use
Python Script
Install the requests library:
pip install requests
Run the script:
python test_cgi_vulnerability.py
Enter the URL to test when prompted.


Go Script
Make sure Go is installed on your system.
Run the script:
go run test_cgi_vulnerability.go
Enter the URL to test when prompted.
Notes
These scripts check for the vulnerability by sending harmless payloads and examining the response.
Ensure you have permission to test the target server.
Adjust the payloads or URLs as necessary for your specific setup.
Install the requests library:
pip install requests
Run the script:
python test_cgi_vulnerability.py
Enter the URL to test when prompted.

Go Script
Run the script:
go run test_cgi_vulnerability.go
Enter the URL to test when prompted.
Notes
These scripts check for the vulnerability by sending harmless payloads and examining the response.
Ensure you have permission to test the target server.
Adjust the payloads or URLs as necessary for your specific setup.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →