目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-3400 PoC — Palo Alto Networks PAN-OS 命令注入漏洞

来源
关联漏洞
标题: Palo Alto Networks PAN-OS 命令注入漏洞 (CVE-2024-3400)
Description:Palo Alto Networks PAN-OS是美国Palo Alto Networks公司的一款下一代防火墙软件。 Palo Alto Networks PAN-OS 10.2、11.0、11.1存在命令注入漏洞,该漏洞源于GlobalProtect 功能中存在命令注入漏洞,可能使未经身份验证的攻击者在防火墙上以 root权限执行任意代码。
介绍
# CVE-2024-3400 RCE Test Script

## Overview

This Python script is designed to test for a remote code execution (RCE) vulnerability, specifically CVE-2024-3400, which affects certain Palo Alto Networks GlobalProtect portals. The vulnerability allows unauthorized command execution via cookie manipulation.

The script sends a benign HTTP GET request to a list of specified URLs with a cookie payload that includes a base64-encoded command (`echo test`). If the command executes, it indicates potential vulnerability.

## How It Works

### Components

- **Base64 Encoding**: Commands are encoded in base64 to simulate how an attacker might obscure malicious commands to bypass basic security filters.
- **HTTP Requests**: The script uses the `requests` Python library to send HTTP GET requests with the malicious cookie.
- **File Handling**: It reads a list of target URLs from an input file and writes the test results to an output file.

### Steps

1. **Command Encoding**: The `echo test` command is encoded into base64.
2. **Cookie Crafting**: A cookie payload is crafted with the encoded command inserted in a way that would be executed if the system is vulnerable.
3. **Request Sending**: For each URL, the script sends an HTTP request with the crafted cookie.
4. **Response Analysis**: The script checks the HTTP response to see if the test command's output appears, indicating command execution.
5. **Result Logging**: Results are logged to an output file, noting whether each URL is potentially vulnerable.

## Usage

Run the script from the command line by providing the input file (containing URLs to test) and the output file (to store results):

```bash
python script_name.py input_file.txt output_file.txt
```

Replace `script_name.py` with your script's filename, `input_file.txt` with your input file, and `output_file.txt` with your desired output file.

## Dependencies

- Python 3.x
- `requests` library (install via `pip install requests`)

## Articles and References

- [Watchtowr Labs Analysis on CVE-2024-3400](https://labs.watchtowr.com/palo-alto-putting-the-protecc-in-globalprotect-cve-2024-3400/)
  This article provides an in-depth look at the CVE-2024-3400 vulnerability, detailing how it can be exploited and its potential impact.

- [LinkedIn Post by Justin Elze](https://www.linkedin.com/posts/justinelze_palo-alto-putting-the-protecc-in-globalprotect-activity-7186009203759624192-RTle)
  Justin Elze discusses the significance of the CVE-2024-3400 discovery and its implications for security in enterprise environments.

## Disclaimer

This script is for educational and testing purposes only. Use it responsibly. Executing this script without authorization on systems you do not own or have permission to test is unethical and illegal. Always ensure compliance with all applicable laws and regulations.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →