POC详情: dc3b826163803e1e398e5f236e6025720a467d35

来源
关联漏洞
标题: Fortinet FortiOS和FortiProxy 安全漏洞 (CVE-2024-55591)
描述:Fortinet FortiOS和Fortinet FortiProxy都是美国飞塔(Fortinet)公司的产品。Fortinet FortiOS是一套专用于FortiGate网络安全平台上的安全操作系统。该系统为用户提供防火墙、防病毒、IPSec/SSLVPN、Web内容过滤和反垃圾邮件等多种安全功能。Fortinet FortiProxy是一种安全的网络代理,通过结合多种检测技术,如Web过滤、DNS过滤、DLP、反病毒、入侵防御和高级威胁保护,可以保护员工免受网络攻击。FortiProxy有助于减
描述
#PoC for CVE-2024-55591 Authentication bypass Affects: FortiOS 7.0.0 to 7.0.16 , FortiProxy 7.0.0 to 7.0.19 ,FortiProxy 7.2.0 to 7.2.12
介绍
# Proof of Concept for CVE-2024-55591 Exploit

This script is a **Proof of Concept (PoC)** designed to test and exploit the **CVE-2024-55591** vulnerability in vulnerable versions of **FortiOS** and **FortiProxy**. It bypasses authentication on Fortinet devices running vulnerable firmware, potentially allowing unauthorized access to sensitive management interfaces.

**Warning**: This PoC is intended for educational purposes and to demonstrate the exploitability of the CVE. It should only be used in a controlled environment with explicit permission from the target system's owner.

## Affected Versions
- **FortiOS**: v7.0.0 to v7.0.16
- **FortiProxy**: v7.0.0 to v7.0.19, v7.2.0 to v7.2.12

For more information about this vulnerability, refer to the [FortiGuard PSIRT advisory](https://fortiguard.fortinet.com/psirt/FG-IR-24-535).

## Prerequisites

The script requires the following Python libraries to be installed:
- **requests**: A simple HTTP library to make requests to the target system.
- **urllib3**: To handle SSL certificates and HTTP requests securely.

You can install these dependencies via `pip`:

```bash
pip install requests urllib3
```

### Optional: WebSocket & SSL Handling
The script handles WebSocket connections for exploitation and optionally uses SSL to connect to the target system.

## Usage

1. **Clone the repository** (or copy the script):
   
   ```bash
   git clone https://github.com/rawtips/CVE-2024-55591.git
   cd CVE-2024-55591
   ```

2. **Run the exploit**:

   ```bash
   python3 exploit.py
   ```

3. The script will guide you through a series of prompts to gather input:
   - **Target IP/Hostname**: Enter the IP address or hostname of the target system.
   - **Ports**: Input a port to connect to (usually the management port, like `443` for SSL).
   - **SSL Option**: Choose whether to use SSL (recommended for secure connections).
   - **Command Selection**: Choose an initial command to run on the target system after successful exploitation (e.g., `get system info`, `execute reboot`).
   - **Post-Exploitation**: Optionally run additional commands (e.g., diagnostic tools, shell access).

4. **Exploitation Process**:
   - The script will attempt to connect to the target system's management interface and exploit CVE-2024-55591 by bypassing the login mechanism.
   - Once connected, it will send the initial command and, if desired, execute post-exploitation commands.

## How It Works

1. **Pre-flight Checks**:
   - The script will check if the target system is running a vulnerable version of FortiOS or FortiProxy on the specified port.
   - If it detects the target system and verifies it's running the vulnerable software version, it proceeds with the exploitation.

2. **WebSocket Connection**:
   - After the pre-flight check, the script establishes a WebSocket connection to the management interface.

3. **Exploitation**:
   - Once connected, the script sends the required login context and then sends a predefined or custom command (such as `get system info`) to the target.

4. **Post-Exploitation**:
   - If post-exploitation is enabled, the script will run additional commands on the target system to gather further information or provide a shell access.

## Notes

- **Legal Warning**: You must have permission to test and exploit the target system. Unauthorized access or actions may be illegal and unethical.
- **Intended Use**: This PoC is for educational purposes only and should only be used in a safe, controlled environment.
- **Target Systems**: This PoC is intended for FortiOS and FortiProxy systems running the affected versions listed above. It will not work on patched or updated systems.

文件快照

[4.0K] /data/pocs/dc3b826163803e1e398e5f236e6025720a467d35 ├── [ 15K] exploit.py └── [3.6K] README.md 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。