
Exploiting CVE-2023-2825 on a VM
This repository documents my journey and deliverables during the MassCyber Center mentorship program. This mentorship program tasked us with completing a cybersecurity project and then presenting it at a showcase event attended by cybersecurity professionals. The goal for this project was to build, break, secure, and administer a virtual machine. Specifically, my goal was to exploit a known Gitlab vulernability, CVE-2023-2825, to understand security weaknesses and implement mitigation strategies.
To build the virtual machine, I utilized VirtualBox, a powerful x86 and AMD64/Intel64 virtualization product.
Environment Setup:
GitLab version 16.0.0 was installed on the VM, which is affected by CVE-2023-2825, a vulnerability that allows unauthenticated users to read arbitrary files on the server by exploiting a path traversal bug. After conducting extensive research, I found a publicly available exploit on GitHub here: .
For this project, I customized the exploit by editing the original Python code to allow user input at runtime and implementing error handling to make the script more interactive and robust. Below are the steps I followed to implement and execute the exploit on the vulnerable VM:

In order to secure the VM, I updated to the latest Gitlab patch version, which was 17.5.1. Here are some steps I took in order to do so:
gitlab-rake gitlab:env:info
sudo gitlab-backup create
sudo apt-get update
sudo apt-get install gitlab-ee
sudo gitlab-ctl restart
gitlab-rake gitlab:env:info
To administer the VM effectively, I implemented several measures to ensure secure and efficient management. These included restricting administrative access, applying regular updates, and following best practices for system administration:
getent group sudo This project was an incredible learning experience that allowed me to delve deep into the lifecycle of a virtual machine—from building and exploiting vulnerabilities to securing and administering it. By exploiting CVE-2022-2825, I gained valuable insights into identifying and mitigating real-world security threats. The process of securing the VM reinforced the importance of proactive system maintenance and staying updated with the latest patches and best practices.
Through this mentorship program, I honed my skills in:
Overall, this experience has strengthened my technical abilities and deepened my understanding of cybersecurity. It has also underscored the critical role of vigilance and continuous learning in protecting systems against evolving threats.
I am grateful for the guidance provided by the MassCyberCenter mentorship program and look forward to applying these skills to future challenges in cybersecurity.