关联漏洞
标题:
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之前版本。
描述
Exploit (C) CVE-2024-4577 on PHP CGI
介绍
# CVE-2024-4577 PHP CGI Remote Code Execution Exploit
**Author:** Byte Reaper
**CVE:** CVE-2024-4577
**Category:** Web Exploitation
**Target Versions:** PHP CGI 8.1, 8.2, 8.3
**Target OS:** Windows
**License :** MIT
---
## Overview
This repository contains a proof-of-concept exploit for the **CVE-2024-4577** vulnerability in PHP CGI versions 8.1, 8.2, and 8.3 running on Windows systems. This vulnerability allows remote code execution (RCE) by exploiting insecure PHP CGI configurations.
---
## Features
- Remote code execution via crafted HTTP POST requests
- Supports execution of arbitrary commands on the target server
- Reverse shell functionality to gain interactive access
- Activity logging and response analysis for verification
---
## Requirements
- Windows Operating System (to run the exploit)
- libcurl for HTTP requests
- Winsock2 for networking
- Compatible C compiler (e.g., MSVC)
---
## Building
- => C:\Users\pc\Downloads\gcc\bin\gcc.exe .\exploit.c .\argparse.c -I"C:\Users\pc\Downloads\curl-8.14.1_2-win64-mingw\include" -L "C:\Users\pc\Downloads\curl-8.14.1_2-win64-mingw\lib" -lcurl -lws2_32 -o CVE-2024-4577
## Usage
- -u : Target URL PHP CGI
- -c : Execute the command on the server
- -p : Listen Port
- => CVE-2024-4577.exe -u http://target/cgi-bin/php-cgi.exe "system(whoami)"
Or Argument listen port :
=> CVE-2024-4577.exe -u http://target/cgi-bin/php-cgi.exe "system(whoami)" -p 1234
## Important Disclaimer
WARNING: This tool is for educational and authorized security testing only!
Do NOT use this exploit on systems without explicit permission from the owner.
Unauthorized usage may lead to legal consequences.
## Contact
Telegrame : @ByteReaper0
文件快照
[4.0K] /data/pocs/22695e928bc660f2d7829f3c2052d15caffb9b30
├── [ 19K] exploit.c
├── [1.0K] LICENSE
└── [1.8K] README.md
0 directories, 3 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。