A capture-the-flag (CTF) exercise is a simulated cybersecurity competition that challenges participants to find and exploit vulnerabilities in a computer system in order to ‘capture a flag’. The ‘flag’ may be a specific piece of data or code hidden within the system. Participants will rehearse working seamlessly together. The goal of a capture-the-flag exercise is to provide a realistic and challenging cybersecurity experience that helps participants to develop and refine their skills in a controlled environment.
CTF exercises typically involve multiple teams, each consisting of several participants, who compete against each other to capture as many flags as possible within a specified time period. In Jeopardy-style CTFs participants can also compete as individuals.
The teams are given a set of objectives and rules at the beginning of the exercise, and must work together to devise and execute a strategy for finding and capturing the flags.
Jeopardy, Attack-Defence and King of the Hill
CTFs come in a few formats. In a Jeopardy CTF, teams or individuals score points by solving standalone challenges grouped into categories. In an Attack-Defence CTF, each team runs its own vulnerable services that it must patch and defend while attacking the identical services of other teams. In King of the Hill, teams compete to take and hold control of a shared target. Which format fits depends on the goal: broad skills practice (Jeopardy), realistic offence-and-defence under pressure (Attack-Defence), or sustained control of a contested system (King of the Hill).
Why organisations run CTFs
Organisations use CTFs to identify and recruit talent, benchmark the skills of new hires, teach students and newcomers, build team cohesion, and run community and outreach events.
Because the tasks are independent and the scoring is automatic, a CTF also scales in a way most exercises do not. The same event can run for a handful of people or several hundred, in one room or spread across several countries, without adding staff to run it.
It is not the right instrument for every question, though. A CTF shows what people can solve on their own, not how a team copes when one environment is under sustained attack. That is what a live fire exercise is built for, and the two are often run for the same organisation at different points in its development.
Common CTF challenge categories
Jeopardy-style challenges usually span a familiar set of categories:
- Web exploitation
- Cryptography
- Reverse engineering
- Digital forensics
- Binary exploitation (pwn)
- Open-source intelligence (OSINT)
How hacking works in a CTF
Most CTF tasks ask participants to do something that would count as an attack anywhere else: read a file they have no rights to, recover a password from a hash, get their own code running on a server, or pull credentials out of a captured network stream. The techniques are the ones used against real systems, which is why security teams treat CTFs as practice rather than as a game for students.
What keeps it legitimate is not that the techniques are watered down. It is that the target is purpose-built and isolated. Participants work on systems created for the exercise, on a cyber range kept apart from anything in production, with the boundaries written into the rules before the event starts. Nothing outside that environment is in scope, and nobody needs to ask for permission during the exercise, because permission is the premise of it.
That distinction is worth something to an employer in two directions. A CTF gives staff a sanctioned place to build offensive skills they would otherwise pick up informally, and it leaves a record of who attempted what, which unstructured practice never does.
Teams, instructors and scoring
The role of the instructor in a CTF exercise is to oversee the competition, monitor the progress of the teams, and ensure that the exercise is conducted safely and ethically. The instructor may also provide guidance and assistance to the teams as needed, and may adjust the difficulty of the exercise to ensure that it is appropriately challenging for the participants.
The participating teams must work together to identify and exploit vulnerabilities in the system, and they may need to use a variety of skills and techniques, such as network analysis, reverse engineering, and cryptography , drawn from the categories above . The teams must also maintain good communication and coordination in order to be successful.
The scoreboard presents the participant with the final scores and an overview of each team’s results. The number of tasks available is configurable and is the main means of defining the length and complexity of the training event.
The task board presents the participant with an overview of the progress of the event. The participant can see which tasks are solved, on hold, open, or locked.

Teams compete while the live scoreboard is displayed during a CTF event.
Steps in a typical CTF exercise
Process-wise, let us go through the steps in a typical CTF exercise:
- Planning and Preparation: The exercise organisers and instructors develop the scenario and objectives for the CTF, create the virtual environment, and set up the necessary tools and resources for the participants. This may involve selecting a theme or scenario for the exercise, designing the systems to be attacked and defended, and creating the flags that the teams will need to capture.
- Kickoff and Rules: The organisers will then hold a kickoff event to introduce the exercise to the participants and provide them with the rules, objectives, and guidelines. This may include a briefing on the scenario, an overview of the virtual environment, and instructions on how to access the tools and resources.
- Reconnaissance: The teams begin to explore and analyse the virtual environment in order to identify vulnerabilities and potential attack vectors. This may involve performing network scans, analysing system configurations, and gathering information on other teams.
- Exploitation: Once the teams have identified potential vulnerabilities, they begin to develop and execute strategies for exploiting them. This may involve launching attacks or manipulating data in order to gain access to systems and capture flags.
- Defence: (mainly in Attack-Defence CTFs) As the exercise progresses, teams may also need to defend their own systems against attacks from other teams. This may involve monitoring network traffic, analysing logs, and implementing defensive measures such as firewalls and intrusion detection systems.
- Scoring and Evaluation: Throughout the exercise, the organisers and instructors track the progress of the teams and score their performance based on the number of flags captured and other criteria. At the end of the exercise, the scores are tallied and the winners are announced.
- Debriefing: After the exercise is complete, the organisers and instructors typically hold a debriefing session with the participants to review their performance, provide feedback on their strategies and techniques, and offer insights into the vulnerabilities and attacks used in the exercise. This helps the participants to learn from their experiences and improve their skills for future cybersecurity challenges.
Frequently asked questions
What does CTF stand for?
Capture the flag, a name borrowed from the outdoor team game. In a cybersecurity CTF the flag is a short string of text, something like flag{s0me_r4nd0m_str1ng} , which a participant submits to the scoreboard to claim the points for a task.
How long does a CTF last?
Jeopardy events are commonly a single session of four to eight hours, which fits a training day or a conference slot. Attack-Defence needs longer, because teams have to find and patch weaknesses in their own services before the attacking starts, so it is usually scheduled across one or two days.
What do participants need in order to take part?
A browser for the scoreboard and an attack machine for the tasks, normally a Linux virtual machine with the standard tooling. A hosted event supplies all of it, reached over a browser or VPN, so nobody loses the first hour to fixing their own setup.
Is a CTF a useful way to assess candidates or new hires?
For specific technical ability it is one of the better instruments available, because the result is verifiable instead of self-reported: a submitted flag proves the work was done. What it does not measure is how somebody handles the routine parts of a security job, such as sustained monitoring, writing an incident up so a colleague can act on it, or working one problem across several days. As one input among several it is strong. As the only filter it selects for people who are good at competitions.