关联漏洞
标题:
Apache Struts 安全漏洞
(CVE-2023-50164)
描述: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版本。
描述
A scanning utility and PoC for CVE-2023-50164
介绍
# CVE-2023-50164
A scanning utility and PoC for CVE-2023-50164
# Considerations
CVE-2023-50164's exploitation is very environment specific. This PoC attempts to generalize the exploitation process by requiring the user to enter environment specific details through the script flags.
The script attempts to upload a benign file and overwrite it with a file path passed by the user. Although the script (necessarily) allows users to upload their own file paths, the file content written to that path is completely benign, it's simply "SUCCESSFULLY EXPLOITED CVE-2023-50164 AT <datetime>"
Original Reference: https://xz.aliyun.com/t/13172
# Installation
Before running the script you need to install the requirements.txt
```
python3 -m pip install -r requirements.txt
```
# Usage
The script accepts the following flags:
- --url: The URL of the target
- --uploadvar: The name of the variable that the script will use to upload the file,in the reference this would be "Upload"
- --filenamevar: The name of the variable that the script will use for the uploadFileName value, in the reference this would be "uploadFileName"
- --payloadpath: The path of the payload file that will be uploaded
- --follow302: A boolean which indicates whether the script should follow 302 redirects or not
- --verbose: A boolean which indicates whether the script should print verbose output or not
# Example
```
python3 cve202350164.py --url http://localhost:8080 --uploadvar Upload --filenamevar uploadFileName --payloadpath /tmp/payload.txt --follow302 --verbose
```
文件快照
[4.0K] /data/pocs/3eca19f640b9f975d02c16f758b9426aee757ead
├── [4.7K] cve202350164.py
├── [1.5K] README.md
└── [ 35] requirements.txt
0 directories, 3 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。