关联漏洞
            
                
                    标题:
                    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之前版本。
                
        
 
        
            描述
            A PHP CGI Vulnerability Scanner for CVE-2024-4577
        
        
            介绍
            # PHP CGI Scanner
## Screenshot

## Overview
**PHP CGI Scanner** is a Python 3 utility designed to help identify
systems potentially exposed to
[CVE-2024-4577](https://nvd.nist.gov/vuln/detail/CVE-2024-4577).\
It checks for visible PHP versions, common CGI endpoints, and phpinfo
outputs to provide a quick risk assessment.
> **Disclaimer:** This tool is for authorized security testing only. Use
> responsibly.
## Features
-   Detects PHP version from headers and phpinfo output.
-   Scans for common PHP-CGI endpoints.
-   Classifies server API (CGI, FPM, module).
-   Provides clear verdicts (SAFE, POTENTIALLY VULNERABLE,
    INCONCLUSIVE).
-   Optional colorized output and ASCII banners.
## Requirements
-   Python 3.6+
-   [requests](https://pypi.org/project/requests/)
-   [colorama](https://pypi.org/project/colorama/) (optional)
-   [pyfiglet](https://pypi.org/project/pyfiglet/) (optional)
## Installation
Clone the repository and install dependencies:
``` bash
git clone https://github.com/yourusername/PHPCGIScanner.git
cd PHPCGIScanner
pip install -r requirements.txt
```
## Usage
### Basic Scan
``` bash
python3 PHPCGIScanner.py <target>
```
Example:
``` bash
python3 PHPCGIScanner.py http://example.com
```
### With phpinfo URL
``` bash
python3 PHPCGIScanner.py <target> --phpinfo-url http://example.com/phpinfo.php
```
### Ignore TLS Warnings
``` bash
python3 PHPCGIScanner.py <target> --insecure
```
## Exit Codes
-   **0** -- SAFE / Not vulnerable
-   **1** -- POTENTIALLY VULNERABLE (needs review)
-   **2** -- UNKNOWN / Error
## Notes
-   Vulnerable PHP versions checked:
    -   8.3.0--8.3.7
    -   8.2.0--8.2.19
    -   8.1.0--8.1.28
-   Designed for security engineers and penetration testers with
    permission.
## License
MIT License. See `LICENSE` file for details.
        
        文件快照
        
            
                
 [4.0K]  /data/pocs/02b1855828fc33750e2dcb7d4e85510d3b64a327
├── [1.0K]  LICENSE
├── [ 11K]  PHPCGIScanner.py
├── [237K]  poc.png
├── [1.8K]  README.md
└── [  27]  requirements.txt
0 directories, 5 files
                
             
         
        备注
        
            
                1. 建议优先通过来源进行访问。
                2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
                3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。