
A school project Capture The Flag (CTF) platform for learning and practicing cybersecurity skills.
Report Bug
·
Pull request
Table of contents
2bgp-ctf is a Capture The Flag (CTF) platform designed to help users learn and practice cybersecurity skills through a series of challenges. The platform is can be self-hosted and can be customized to fit your needs. This project was carried out for educational purposes.
Follow these instructions to set up the 2bgp-ctf platform on your local machine or server.
Ensure you have the following installed:
- Docker
- Docker Compose
- Curl
- Git
-
Clone the Repository
git clone https://github.com/itsmrval/2bgp-ctf cd 2bgp-ctf
-
Build the Docker Images Run the build script to create the necessary Docker images for the levels and frontend/backend:
bash build.sh
-
Verify Docker Images Check that all required images are built successfully:
docker images
You should see a list of images similar to:
2bgp-ctf_level10 latest 97c23908ce72 2 seconds ago 586MB 2bgp-ctf_level4 latest 11d730a5631c 10 seconds ago 526MB 2bgp-ctf_level8 latest cd097699aa08 10 seconds ago 517MB 2bgp-ctf_level6 latest 203b7a2e68d7 10 seconds ago 538MB 2bgp-ctf_level7 latest ee21fa815f5d 10 seconds ago 517MB 2bgp-ctf_level5 latest fbd92b290638 10 seconds ago 513MB 2bgp-ctf_level9 latest 01540d18db8a 10 seconds ago 516MB 2bgp-ctf_level3 latest 34a45762f452 11 seconds ago 513MB 2bgp-ctf_level2 latest 77878bb6128d 12 seconds ago 519MB 2bgp-ctf_level1 latest 8278a9cf3f5e 12 seconds ago 513MB 2bgp-ctf_backend latest 9241d8460298 18 seconds ago 1.16GB 2bgp-ctf_frontend latest f0e0a7d519ab 21 seconds ago 67.3MB
-
Modify Configuration
- Navigate to the
dist
directory:cd dist
- Edit the
ADMIN_SYSTEM_TOKEN
inconfig/backend.env
. - Optionally, modify MongoDB credentials in
config/backend.env
andconfig/mongodb.env
.
- Navigate to the
-
Modify Hosts File
- Add
2bgp-ctf.rvcs.fr
to127.0.0.1
in your/etc/hosts
file. - For Windows, edit
C:\Windows\System32\drivers\etc\hosts
.
- Add
-
Start Docker Containers
docker compose up -d
-
Access the Platform
- Once all containers are running and the backend is healthy, access the platform at https://2bgp-ctf.rvcs.fr.
- Note: the first user registered is an admin.