Defining a CTF Event
The platform stores a CTF event in a Git repository. This repository should contain event metadata and all challenges.
To get started, create a event.yml in the root of your repository with metadata like this:
event_name: MyCTF
front_page_md: |
# My CTF
This is a CTF description in markdown.
rules_md: |
# Rules
- Write your rules in markdown here!
start_time: 2025-11-13T10:00:00Z
end_time: 2026-11-20T10:00:00Z
use_teams: true # Setting this to false makes this a solo competition
max_team_size: 4 # Optional, maximum number of members per team
# Optional, if you want to limit registration time
#registration_start_time: 2025-11-13T10:00:00Z
#registration_end_time: 2026-11-20T10:00:00Z
points_fn: |
setPointsFn((challengeMetadata, totalSolves, currentSolveIndex, totalCompetitors) => {
// This closure receives the challenge metadata, amount of solves, at which solve this was (1st, 2nd, ..., 0 if the current actor did not solve it yet)
// and the total number of competitors (teams in team CTFs, users otherwise)
// It should return an integer (Number, not a BigInt).
})
categories: # This gives internal category IDs (used on the challenges) names and descriptions
misc:
name: Misc
description: "A short **Markdown** description of the category"
color: "#f00"
rev:
name: rev
color: green
no_llm: true # Optional, forbids LLMs for challenges in this category, see below
difficulties: # This gives internal difficulty IDs (used on the challenges) names
easy:
name: Easy
color: green # Optional
index: 0 # This is used to sort the difficulties, lower index means easier
medium:
name: Medium
index: 1 # This is used to sort the difficulties, lower index means easier
hard:
name: Hard
index: 2 # This is used to sort the difficulties, lower index means easier
certificate: # Optional, enables attendance certificates
title: Certificate of Participation
min_solves: 1
brackets: # Optional, see below
open:
name: Open
can_self_enter: true
students:
name: Students
can_self_enter: false
no_llm: true # Optional, forbids LLMs for teams in this bracket, see below
anticheat: # Optional, see the anti-cheat documentation
review_threshold: 20Your challenges should be placed in the challs subdirectory of the repository.
Points
If points_fn is not set, every challenge is worth 100 points.
For example, this is a simple dynamic scoring function that starts at 500 points and decreases with the share of competitors that solved the challenge, down to a minimum of 100 points:
points_fn: |
setPointsFn((challengeMetadata, totalSolves, currentSolveIndex, totalCompetitors) => {
if (challengeMetadata.additional_metadata?.static_points) {
return challengeMetadata.additional_metadata.static_points;
}
return Math.max(100, Math.round(500 - 400 * (totalSolves / Math.max(totalCompetitors, 1))));
})The challengeMetadata contains the fields from the challenge's x-ctf-metadata, apart from the flag. You can use additional_metadata to pass custom data to your points function.
Teams
If use_teams is enabled, players must be in a team to submit flags. Players can create a team or join an existing team using its join code.
If max_team_size is set, players can't join a team that already has this many members.
Players can't leave a team once they've joined it, so they can't solve challenges in one team and then switch to another.
Brackets
Brackets allow you to split the scoreboard into multiple groups, for example to have a separate ranking for students.
Every team can be part of one bracket. When challenges are listed for a specific bracket, totalSolves and totalCompetitors in the points function only count solves and competitors in that bracket.
- If
can_self_enteristrue, teams can choose this bracket themselves, either when creating the team or later. - If
can_self_enterisfalse, only admins can assign a team to this bracket.
If a team is created without choosing a bracket, it's automatically assigned to the only bracket (if there is exactly one), or to the only bracket with can_self_enter enabled. If several brackets allow self-entry, the team has to choose one.
Once the event has started, teams can't change their bracket anymore, so they can't move to the bracket where they rank best, or leave a no-LLM bracket after using LLMs. Admins can still change brackets. To allow changes during the event, set lock_brackets_after_start: false in the anticheat section. While the final scoreboard is locked, nobody can change brackets.
No-LLM mode
Set no_llm: true on a bracket to forbid the use of LLMs for all teams in it, or on a category to forbid them for the challenges in that category:
brackets:
humans:
name: Humans only
can_self_enter: true
no_llm: true
categories:
web:
name: Web
no_llm: trueThe bracket is the main switch. No-LLM mode applies whenever the team is in a no_llm bracket or the challenge is in a no_llm category. Flag submissions marked as LLM-assisted are then rejected, and signs of LLM usage count towards the team's suspicion score. See no-LLM mode for what is detected.
Anti-cheat
The optional anticheat section configures cheat detection: the weights of suspicion events, the review threshold, submission rate limits and the thresholds of the detectors. Everything has defaults, so you only need it to change something. See anti-cheat for all options.
Certificates
If the certificate section is set, players can download an attendance certificate. See attendance certificates for all options.