xctf

A simple CTF platform written in go. An ode to the illustrious CTFd.

We just ran a competition for 200 high schoolers in person using this framework.

Have ideas about what should go in here? Come talk to us on Discord!

Currently in alpha.

Goals

Development

Tech Stack

xctf is developed with:

Running Locally

Server

Run this command to start the backend:

go run main.go

Plugins

Under development. Python is the only plugin currently. Read the README for more information.

Backups

To have automatic backups with sqlite, run minio:

docker run -t -p 9000:9000 -p 9090:9090 -v PATH:/mnt/data -v "$(pwd)/deploy/minio/config:/etc/config.env" -e "MINIO_CONFIG_ENV_FILE=/etc/config.env" --rm quay.io/minio/minio server --console-address ":9090"

Open up http://localhost:9090, login with minio:minio123, and create the bucket xctf.

Web site

Run this command to start the frontend:

npm run dev

Build the client for production:

npm run build

Protoc Generation

go generate ./...

Adding a challenge

Written in go
  1. Update Challenge message to include the new challenge.
  2. Run go generate ./...
  3. Implement the challenge in the Handle method.
Written in python
  1. Update PythonChallenge message to include the new challenge.
  2. Run go generate ./...
  3. Implement the challenge in the Generate method.