What is a CTF? Capture-the-flag competitions explained
By DevSafar · Updated November 14, 2026
Short answer
A CTF (capture the flag) is a cybersecurity competition in which teams solve security challenges to find hidden strings called flags and submit them for points. Most CTFs run online over 24 to 48 hours, are free, and are played in teams. They are the most common way to practise offensive and defensive security skills legally.
The two main formats
- JeopardyA board of independent challenges sorted by category and difficulty. Solving one reveals a flag worth points. This is the most common format and the one beginners should start with.
- Attack-defenceEach team runs the same set of vulnerable services. You patch your own and exploit other teams' to steal flags, round after round. It needs more experience and coordination.
Challenge categories
- WebFinding and exploiting flaws in web applications, such as injection or broken access control.
- CryptographyBreaking weak or misused encryption.
- Binary exploitation (pwn)Exploiting memory bugs in compiled programs.
- Reverse engineeringWorking out what a program does without its source code.
- ForensicsRecovering evidence from files, disk images, memory dumps or network captures.
- Miscellaneous and OSINTEverything else, including challenges solved with public information.
How to start
Pick one category rather than all of them; web and forensics are the usual entry points. Practise on beginner platforms that stay open all year, then enter a live Jeopardy CTF with one or two friends. After every event, read the write-ups other teams publish for the challenges you could not solve. That is where most of the learning happens.
Only attack systems you are explicitly allowed to. A CTF gives you that permission for its own challenges and nothing else.
Where CTFs are listed
CTFtime is the community calendar for CTFs worldwide and also ranks teams. DevSafar includes CTFtime events in its cybersecurity list alongside security hackathons from other platforms, so they appear next to deadlines you are already tracking.
Common questions
What does CTF stand for?
Capture the flag. In cybersecurity it means a competition where the flags are secret strings hidden behind security challenges.
Are CTFs legal?
Yes. You attack only the challenges the organisers built for the competition. That permission does not extend to any other system.
Are CTFs free?
Most online CTFs are free to enter.
Can beginners play CTFs?
Yes. Jeopardy-style CTFs include easy challenges, and some events are designed specifically for beginners and students.
© 2026 DevSafar · v1.0.0