目标达成 感谢每一位支持者 — 我们达成了 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
CVE-2023-50164 PoC Application & Exploit script
介绍
# CVE-2023-50164 PoC

This repository is a proof of concept (PoC) of the CVE-2023-50164 vulnerability.

## 1. About CVE-2023-50164

**CVE-2023-50164** is a file path traversal vulnerability that occurs in Apache Struts web application.   
An attacker could exploit this vulnerability to upload malicious file (WebShell or other Malware) to arbitrary location and make secondary attacks such as remote code execution. 

## 2. Building the Vulnerable Environment

The vulnerable web application, StrutsUploadApp, is containerized using Docker. Follow these steps to build and deploy the environment.

Use the provided `Dockerfile` to build the Docker image for `StrutsUploadApp`.

```bash
docker build -t struts-upload-app .
docker run -d -p 8080:8080 --name StrutsUploadApp struts-upload-app 
```

## 3. Exploit
Run the exploit script to trigger the vulnerability.

```bash
python exploit.py --url=http://localhost:8080/StrutsUploadApp/upload.action /
    --file=webshell.jsp /
    --file-parameter=upload /
    --attemps=5
```
文件快照

[4.0K] /data/pocs/283274645f13cdfb28f914c299cc4570f5778016 ├── [ 34] docker-compose.yml ├── [ 268] Dockerfile ├── [3.9K] exploit.py ├── [1.0K] README.md └── [4.0K] StrutsUploadApp ├── [ 10K] mvnw ├── [6.6K] mvnw.cmd ├── [1.9K] pom.xml └── [4.0K] src └── [4.0K] main ├── [4.0K] java │   └── [4.0K] com │   └── [4.0K] nikitapark │   └── [4.0K] app │   └── [1.7K] UploadAction.java ├── [4.0K] resources │   └── [ 776] struts.xml └── [4.0K] webapp ├── [ 270] index.jsp └── [4.0K] WEB-INF ├── [ 683] error.jsp ├── [1.0K] input.jsp ├── [ 896] success.jsp └── [ 603] web.xml 10 directories, 14 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →