POC详情: 658e0611507817be9d5d375ba238d0eb7fed84aa

来源
关联漏洞
标题: PHP 操作系统命令注入漏洞 (CVE-2024-4577)
描述:PHP是一种在服务器端执行的脚本语言。 PHP存在操作系统命令注入漏洞,该漏洞源于在特定条件下,Windows系统使用“Best-Fit”行为替换命令行中的字符,这可能导致PHP CGI模块错误地将这些字符解释为PHP选项,从而泄露脚本的源代码,在服务器上运行任意PHP代码等。以下版本受到影响:8.1至8.1.29之前版本,8.3至8.3.8之前版本,8.2至8.2.20之前版本。
介绍
# 🚀 CVE-2024-4577: PHP CGI Argument Injection Scanner and Exploit

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)
[![CVSS Score](https://img.shields.io/badge/CVSS-9.8-critical)](https://www.first.org/cvss/)

## 🛡️ Overview
![image](https://github.com/user-attachments/assets/af8c5025-9e39-42a9-8799-626673463c83)

CVE-2024-4577 is a **critical vulnerability** affecting PHP applications that utilize the **Common Gateway Interface (CGI)**. This tool serves as both a **scanner** and an **exploit**, enabling cybersecurity professionals to:

- Detect PHP CGI Argument Injection flaws
- Exploit vulnerabilities leading to **Remote Code Execution (RCE)**
- Execute arbitrary PHP code on vulnerable systems

## 🔑 Key Features

- **🔍 Vulnerability Detection:** Robust scanning process to identify susceptible PHP applications
- **💥 Exploit Functionality:** Customizable payloads for targeted vulnerability exploitation
- **🔧 Flexible Payload Management:** Specify PHP payload files for post-exploitation execution
- **👥 User-Friendly Interface:** Simple command-line options with clear, actionable output

## 📦 Installation

```bash
# Clone the repository
git clone https://github.com/your-username/CVE-2024-4577-scanner.git

# Navigate to the project directory
cd CVE-2024-4577-scanner

# Install required dependencies
pip install -r requirements.txt
```

## 📖 Usage

Ensure you have **Python 3** installed on your system. Use the following command structure:

```bash
python3 CVE-2024-4577.py [-h] -t TARGET_FILE [-s] [-e] [-p PAYLOAD_FILE]
```

### Arguments:

- `-h, --help`: Show help message and exit
- `-t TARGET_FILE, --target-file TARGET_FILE`: File containing target URLs (required)
- `-s, --scan`: Perform vulnerability scan only
- `-e, --exploit`: Attempt to exploit the vulnerability
- `-p PAYLOAD_FILE, --payload-file PAYLOAD_FILE`: PHP payload file for exploitation

### Example:

```bash
python3 CVE-2024-4577.py -t targetsite.txt -e -p rev_shell.php
```

## 🔍 Discovering Vulnerable Hosts

Utilize powerful search engines to identify potentially vulnerable hosts:

### 🌐 Shodan Query

Search for servers running PHP versions 8.1, 8.2, and 8.3:

```
server: PHP 8.1, server: PHP 8.2, server: PHP 8.3, html:"phpinfo"
```

### 🌐 FOFA Query

```
protocol="http" && (header="X-Powered-By: PHP/8.1" || header="X-Powered-By: PHP/8.2" || header="X-Powered-By: PHP/8.3")
```

## ⚠️ Disclaimer

This tool is intended for authorized security testing and research purposes only. Ensure you have explicit permission before scanning or attempting to exploit any systems you do not own or have the right to test.

## 📞 Support

If you encounter any issues or have questions, please file an issue on the GitHub issue tracker.

---
文件快照

[4.0K] /data/pocs/658e0611507817be9d5d375ba238d0eb7fed84aa ├── [4.5K] CVE-2024-4577.py └── [2.9K] README.md 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。