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

目标: 1000 元 · 已筹: 1000

100.0%

CVE-2023-50164 PoC — Apache Struts 安全漏洞

来源
关联漏洞
标题:Apache Struts 安全漏洞 (CVE-2023-50164)
Description:Apache Struts是美国阿帕奇(Apache)基金会的一个开源项目,是一套用于创建企业级Java Web应用的开源MVC框架,主要提供两个版本框架产品,Struts 1和Struts 2。 Apache Struts 存在安全漏洞,该漏洞源于file upload参数存在路径遍历漏洞。攻击者可利用该漏洞上传恶意文件并执行远程代码。受影响的产品和版本:Apache Struts 2.0.0至2.5.32版本,6.0.0至6.3.0.1版本。
Description
Proof-of-concept for CVE-2023-50164 (Apache Struts 2), originally by jakabakos and adapted for the HTB Strutted lab environment. For educational use only.
介绍
# CVE-2023-50164:

A critical security vulnerability, identified as CVE-2023-50164 (CVE: 9.8) was found in Apache Struts, allowing attackers to manipulate file upload parameters that can potentially lead to unauthorized path traversal and remote code execution (RCE).

It is intended **only for educational, CTF, or lab use** on systems you own or are authorized to test.  
**Do not use this code on production or unauthorized systems.**

## Overview

This PoC demonstrates the file upload behavior related to CVE-2023-50164:

- Original source: [jakabakos/CVE-2023-50164-Apache-Struts-RCE](https://github.com/jakabakos/CVE-2023-50164-Apache-Struts-RCE)
- Modifications: Adapted for the HTB “Strutted” lab environment for safe learning.
## Usage
Install PIP packages:
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```

Then, run the exploit script with for example:
```bash
python3 exploit.py --url http://strutted.htb/upload.action
```

Note that the exploit needs a full URL where the file upload functionality is implemented.


## Disclaimer
This exploit script has been created solely for the purposes of research and for the development of effective defensive techniques. It is not intended to be used for any malicious or unauthorized activities. The author and the owner of the script disclaim any responsibility or liability for any misuse or damage caused by this software. Users are urged to use this software responsibly and only in accordance with applicable laws and regulations. Use responsibly.
文件快照

[4.0K] /data/pocs/ea651072da035cadffc697be6c20d1687041fb5b ├── [4.0K] exploit │   ├── [4.3K] exploit.py │   ├── [ 963] requirements.txt │   ├── [ 528] webshell.jsp │   └── [ 723] webshell.war ├── [1.5K] README.md ├── [4.0K] struts-app │   ├── [8.9K] mvnw │   ├── [5.7K] mvnw.cmd │   ├── [3.7K] pom.xml │   └── [4.0K] src │   └── [4.0K] main │   ├── [4.0K] java │   │   └── [4.0K] org │   │   └── [4.0K] vicarius │   │   └── [4.0K] example │   │   └── [1.8K] Upload.java │   ├── [4.0K] resources │   │   └── [ 869] struts.xml │   └── [4.0K] webapp │   ├── [ 190] index.html │   └── [4.0K] WEB-INF │   ├── [ 579] error.jsp │   ├── [ 600] success.jsp │   ├── [ 570] upload.jsp │   └── [ 780] web.xml └── [5.0K] Vagrantfile 11 directories, 16 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →