POC详情: 4346350799bb6474f6f6904cd6e2648ab6d6fc4b

来源
关联漏洞
标题: Apache Tomcat 安全漏洞 (CVE-2024-50379)
描述:Apache Tomcat是美国阿帕奇(Apache)基金会的一款轻量级Web应用服务器。用于实现对Servlet和JavaServer Page(JSP)的支持。 Apache Tomcat存在安全漏洞。攻击者利用该漏洞可以在不区分大小写的文件系统上远程执行代码。以下版本受到影响:11.0.0-M1版本和11.0.1版本、10.1.0-M1版本至10.1.33版本和9.0.0.M1版本至9.0.97版本。
描述
CVE-2024-50379 is a critical vulnerability affecting multiple versions of Apache Tomcat, an open source web server and servlet container widely used for deploying Java-based web applications. The vulnerability arises from a  Time-of-Use (TOCTOU) race condition that occurs when compiling JavaServer Pages (JSPs).
介绍
# CVE-2024-50379 Proof of Concept (PoC)

This repository contains a proof of concept (PoC) script to exploit **CVE-2024-50379**, a vulnerability in Apache Tomcat. The vulnerability is a Time-of-Check Time-of-Use (TOCTOU) race condition that can lead to remote code execution (RCE) if the server's configuration allows writable directories.

---

## Features

- Uploads a malicious JSP shell to the vulnerable Apache Tomcat server.
- Executes arbitrary system commands via the uploaded shell.
- Demonstrates the exploitation process for CVE-2024-50379.

---

## Requirements

- **Python**: Version 3.x
- **Python Libraries**: `requests`
  - Install using:
    ```bash
    pip3 install requests
    ```

---

## Usage

### 1. Setup Vulnerable Environment

Ensure you have a vulnerable version of Apache Tomcat (e.g., 10.1.33) configured with:
- Writable `/uploads` directory.
- An upload handler JSP file (`upload.jsp`).


### 2. Run the PoC Script

To run the script, use the following command:
```bash
python3 poc.py <command>
文件快照

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