This repository contains a Proof of Concept (PoC) exploit for CVE-2024-23334, demonstrating a vulnerability in a web application that allows unauthorized access to sensitive files on the server. The PoC includes a Dockerized web server and an exploit script to test for the vulnerability.
.
├── .gitattributes
├── .git/
├── Dockerfile
├── exploit.py
├── requirements.txt
├── server.py
├── static/
│ └── safe_file.txt
└── test.log
- Dockerfile: Docker configuration file to build and run the vulnerable web server.
- exploit.py: The exploit script that demonstrates how the vulnerability can be exploited to access sensitive files on the server.
- server.py: The vulnerable web server implemented using
aiohttp
. - requirements.txt: List of Python dependencies required to run the server and exploit script.
- static/: Directory containing a safe file to serve as a placeholder for legitimate static content.
- test.log: Log file generated during testing (example content, not crucial for the exploit).
- Docker
- Python 3.10+
pip
(Python package installer)
-
Clone the repository
git clone https://github.com/binaryninja/CVE-2024-23334.git cd CVE-2024-23334
-
Build and Run the Docker Container
docker build -t cve-2024-23334 . docker run -p 8081:8081 cve-2024-23334
The server will start and be accessible at
http://localhost:8081
. -
Run the Exploit Script
python exploit.py -s http://localhost:8081 -v -o results.json
This command runs the exploit script against the running server, with verbose output and results saved to
results.json
.
The server.py
file sets up a vulnerable web server using aiohttp
. The server exposes a static file directory and includes an endpoint /
that returns a simple text response.
The exploit.py
script sends requests to the server to test for the vulnerability. It attempts to access various sensitive files by traversing the directory structure using path manipulation techniques. The results, including any successfully accessed files and their contents, are logged and optionally saved to a JSON file.
docker build -t cve-2024-23334 .
docker run -p 8081:8081 cve-2024-23334
python exploit.py -s http://localhost:8081 -v -o results.json
The script will output the results of the exploit attempts to the console and save detailed results in results.json
.
This project is licensed under the MIT License - see the LICENSE file for details.
This repository is for educational purposes only. Use it at your own risk. The author is not responsible for any damage caused by the use or misuse of this software.
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.