You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every challenge has its own directory in the /challenges directory
Every challenge has at-least 1 task. Each task is solved by submitting a correct flag.
Adding a challenge
Create a new directory in the /challenges directory (preferably copy and update a prepared challenge template located at /challenges/template)
Create/update mandatory files:
meta.json specifies metadata of the challenge such as name, id, description, difficulty and all tasks with appropriate flags. The file is used by the dashboard server to show tasks' descriptions and to verify submitted flags.
docker-compose.yml defines services started for the challenge when user starts the challenge from the dashboard
Use external network playground-net to connect a container to the base lab network
Assign a static IP address to every service. Look below to a table of IP allocations, choose free IP and add a record to the table.
Ideally set stop_grace_period: 0s for all services to speed-up stopping of containers
README.md with simple description of the challenge and a section with steps how to solve the challenge
auto_solve.sh bash script that tests challenge functionality. This script is automatically imported by the root run_tests.sh script and is executed from the hackerlab container. The script should ideally perform all required steps to solve all tasks and submit the flags in the dashboard via an API.
optional other source code, data or docker files for the challenge
To test the new challenge, run the lab using command docker compose up --force-recreate so the dashboard loads the new challenge information
How to add a new class environment
Create a new class directory in the /classes directory
Create files:
meta.json specifies metadata such as name, id and a description shown to the user in the web dashboard
optional docker-compose.yml file
if present, the dashboard offers to start the defined services
Use external network playground-net to connect a container to the base lab network
Assign a static IP address to every service. Look below to a table of IP allocations, choose free IP and add a record to the table.
Ideally set stop_grace_period: 0s for all services to speed-up stopping of containers
optional other source code, data or docker files needed for the class
To run all tests, use script run_tests.sh. The script starts the lab, fires up all challenges and runs all existing auto-solve.sh scripts from within the hackerlab container.