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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2012-1823 PoC — PHP ‘php-cgi’ 参数信息泄漏漏洞

Source
Associated Vulnerability
Title: PHP ‘php-cgi’ 参数信息泄漏漏洞 (CVE-2012-1823)
Description:sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle query strings that lack an = (equals sign) character, which allows remote attackers to execute arbitrary code by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'd' case.
Description
Prova de conceito de PHP CGI Argument Injection.
Readme
## CVE-2012-1823
![bandicam 2024-07-19 18-51-50-822](https://github.com/user-attachments/assets/749d7f95-e6f8-4cda-ad77-86d4f7085ce7)
PHP CGI Argument Injection é uma vulnerabilidade que afeta servidores configurados para executar PHP como CGI (Common Gateway Interface). Quando um servidor web não filtra corretamente os argumentos passados via URL, é possível injetar comandos maliciosos que o servidor executa. Isso pode permitir que um atacante execute código arbitrário no servidor, comprometa a segurança do sistema e acesse dados sensíveis.

Essa vulnerabilidade geralmente ocorre em versões desatualizadas do PHP e servidores mal configurados. A exploração típica envolve adicionar argumentos no URL que são interpretados pelo PHP de forma inesperada, levando a execução de comandos do sistema.

## Baixar e Executar
para baixar a ferramenta a seguir segue os comandos
a seguir:
```bash
git clone https://github.com/Fatalityx84/CVE-2012-1823
cd CVE-2012-1823
php exploit.php <RHOST> "<COMANDO>"
```
após executar php exploit.php, ele vai  pedir a url e o comando

![edf907f5ebb5b3811a01af2cf94764749d665b0a_00 (2)](https://github.com/user-attachments/assets/a7860ede-1c73-4a65-b933-6be6232b62c0)
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →