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

目标: 1000 元 · 已筹: 1359 元

100%

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
Vulnerable docker container for Apache Struts 2 RCE CVE-2023-50164
介绍
# CVE-2023-50164 : Apache Struts 2 vulnerable Docker container 

Apache has recently released an advisory regarding CVE-2023-50164, a critical vulnerability with a severity rating of 9.8 that affects Apache Struts 2.

CVE-2023-50164 is intricately tied to an organization's Apache Struts architecture and the way it uses its file upload feature, enabling unauthorized path traversal that could be abused to upload a malicious file and perform remote code execution (RCE). 

This repository contains a Dockerfile to understand and manipulate the vulnerability. **The weaponized exploit code is not supplied.**

## Usage

Below, commands to run the lab (you can copy/paste in your shell) :

```bash
git clone https://github.com/Trackflaw/CVE-2023-50164-ApacheStruts2-Docker.git
cd CVE-2023-50164-ApacheStruts2-Docker
docker build --ulimit nofile=122880:122880 -m 3G -t cve-2023-50164 .
docker run -p 8080:8080 --ulimit nofile=122880:122880 -m 3G --rm -it --name cve-2023-50164 cve-2023-50164
curl http://localhost:8080/upload.action
```

Verify with CUrl to check app availability.

```html
curl http://localhost:8080/upload.action

<html>
<head>
    <title>File upload</title>
</head>
<body>
    <h1>💣 CVE-2023-50164</h1>
    <p>Welcome to CVE-2023-50164 lab. You can practice with the file upload feature below. Find a way yo bypass the filter 😉</p>

    <form id="upload" name="upload" action="/upload.action" method="post" enctype="multipart/form-data">
        <table class="wwFormTable">
            <tr>
                <td class="tdLabel"></td>
                <td class="tdInput"><input type="file" name="upload" id="upload_upload" /></td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="formButton"><input type="submit" value="Submit" id="upload_0" />
                    </div>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
```

Happy pwning ! 😉

## Video

![Apache Struts 2 - RCE](video.gif)

## Source

This project is heavily inspired from [Jakabakos work](https://github.com/jakabakos/CVE-2023-50164-Apache-Struts-RCE/tree/main).

Below, list of articles to understand the flaw : 

- https://xz.aliyun.com/t/13172
- https://www.trendmicro.com/en_no/research/23/l/decoding-cve-2023-50164--unveiling-the-apache-struts-file-upload.html


文件快照

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

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