Simple CTF platform for hosting CTFs. This is a work in progress.
- Docker
- PHP >= 8.1
- MySQL
- Create a database
- Create a user with full access to the database
- Create /src/config.json
{
"dbHost": "db",
"dbName": "dbname",
"dbUser": "dbuser",
"dbPass": "dbpassword",
"siteName": "",
"flagPrefix": "",
"restrict": "0", // TODO: Handling this
"devmode": "0", // Enables error logs
"startDate": false, // TODO: Handling this
"startTime": false // TODO: Handling this
}
- Clone the repository
git clone https://github.com/k1k9/CTFPlatform.git
- Install docker
- Run the container
docker compose up --build -d
- Visit http://localhost:8003/install.php
- Remove /src/public/install.php
- Visit http://localhost:8003
($points > 0 && $points <= 30): $level = 'easy';
($points > 30 && $points <= 60): $level = 'medium';
($points > 60 && $points <= 100): $level = 'hard';
- 0: Forbidden
- 1: Casual user
- 2: Admin
- 3: CTF purpose
When adding tasks, they are saved into src/tasks.json.