Security operations

What Is Capture the Flag in Cyber Security? Formats, Skills and Start

A CTF is a legal, hands-on security game: solve a challenge, find the hidden flag, submit it for points. Here is how the formats work and where beginners should start.

Cysoro Security TeamPublished · 7 min read
flag{found_it} SECURITY OPERATIONS Capturethe flag Find the flag. Learn the skill.
Quick answer

Capture the Flag, or CTF, is a cyber security competition in which participants find hidden text strings called flags in intentionally vulnerable programs, websites, devices or systems. In jeopardy CTFs, teams solve standalone challenges in categories such as web exploitation, cryptography and forensics for points. In attack-defense CTFs, teams defend their own services while attacking opponents.

Key takeaways

  • A CTF flag is a hidden string, usually shaped like flag{...}, that proves you solved a challenge.
  • Jeopardy CTFs are the best starting point; attack-defense CTFs are live, team-based and much harder.
  • CTFs teach real defensive skills too: web security, cryptography, forensics and reverse engineering.

Reading about security is useful. Breaking a vulnerable website, decoding a secret message, or finding evidence hidden in a file is better. That is what Capture the Flag does: it turns security skills into a game you can play legally, with real systems built to be attacked.

What is capture the flag in cyber security?

Capture the Flag, or CTF, is a cyber security exercise in which participants find hidden text strings called flags in intentionally vulnerable programs, websites, devices or other systems. A flag usually looks like flag{y0u_found_it}, and submitting it to the scoring system earns points.

CTFs are used for competitive and educational purposes, in academic, professional and recreational settings. The first major cyber security CTF ran at DEF CON in 1996, according to Splunk's CTF guide, and the format has since spread to hundreds of events a year.

The idea is simple: you are given a challenge, you investigate, you exploit a vulnerability or decode something, and you submit the flag. The challenge is deliberately vulnerable, and the organizers invite you to attack it. That makes a CTF the single best way to practice offensive security legally and safely.

How does a CTF work?

A CTF starts with registration, a scoreboard, and a set of challenges or targets. You pick a challenge, work on it, find the flag, and submit it through the competition portal. Harder challenges are worth more points, and the team or player with the most points at the end wins.

Flags are planted where only a successful attack will reveal them: inside a database reached through a web flaw, in a decrypted message, in a reversed binary, or in a packet capture. Some flags are worth points on their own; in attack-defense events, flags change over time and must be stolen repeatedly from opponents.

Most events run for 24 to 48 hours, with a live scoreboard, as described in the Snyk guide to getting started with CTF. Practice platforms are different: they are available year-round, with no deadline, so you can work through challenges at your own pace. After an event, teams often publish write-ups explaining how they solved each challenge, which is one of the best ways to learn.

The CTF loop, in five steps1Pick a challengeweb, crypto,forensics, pwn2Investigateinspect files,traffic, code3Exploit ituse the flaw toreach the flag4Find the flagflag{...} hiddenin the target5Submit itscore points,climb the boardStuck? Read a write-up after the event — that is how most players learn.
Every CTF challenge follows the same loop: investigate, exploit, find the flag, submit it. Illustration by Cysoro.

What are the main CTF formats?

The two most common formats are jeopardy and attack-defense. A third format, king of the hill, rewards taking and holding control of a shared target. Mixed competitions combine jeopardy challenges with attack-defense targets.

FormatHow it worksBest forDifficulty
JeopardyStandalone challenges in categories, each worth pointsBeginners, solo playersBeginner to advanced
Attack-defenseTeams defend identical vulnerable services while attacking opponentsExperienced teamsAdvanced
King of the hillTeams take and hold a shared targetCompetitive playersIntermediate to advanced
MixedJeopardy challenges plus live attack-defense targetsTeams that want bothIntermediate to advanced

Jeopardy is the most common format and the best starting point. Challenges are independent, so you can focus on web exploitation or cryptography without needing a team or live opponents. Attack-defense is closer to real incident response: you must patch your own bugs while exploiting the same bugs in opponents, under time pressure. The DEF CON CTF finals use attack-defense, and only the top teams from the qualifier reach them.

What are the main CTF challenge categories?

Most jeopardy CTFs divide challenges into six categories: web exploitation, cryptography, binary exploitation, reverse engineering, forensics, and OSINT, plus a miscellaneous bucket for puzzles and steganography. Each category maps onto a real defensive skill.

Web exploitation

You are given a URL to a vulnerable web application and must exploit it, using flaws such as injection, broken access control or insecure file handling. This category builds web application security and secure coding skills.

Cryptography

You are given a ciphertext and must decrypt it, often by spotting a weak or misused algorithm such as RSA or AES, or a custom cipher with a flaw. This teaches you to spot crypto mistakes in real code.

Binary exploitation (pwn)

You receive a binary or a service address and must exploit a memory-safety bug to get the flag. This is the hardest category for most beginners, but it teaches how memory safety and remote code execution work.

Reverse engineering

You take a compiled program and work out what it does, to find the correct input or key. This is the same skill used in malware analysis and debugging.

Forensics

You recover evidence from files, memory dumps or network packet captures, including hidden data and steganography. This maps directly onto incident response and digital forensics work.

OSINT

You find information from public sources: social media, websites, metadata and public records. This builds attack-surface mapping skills, and it is often the most accessible category for beginners.

Where did CTFs come from?

The first CTF competition ran at DEF CON in 1996, organized by computer security experts. It used custom vulnerable services on a shared system, and it set the pattern for the attack-defense format that DEF CON still uses today.

CTFs went mainstream in the mid-2000s as a training tool in academia and industry. Government-supported competitions followed, including the DARPA Cyber Grand Challenge and the ENISA European Cybersecurity Challenge. Today, dozens of CTFs run every year, many of them online and open to all, and organizers register them on the CTFtime platform, which lists events and tracks team rankings.

Modern CTFs have expanded beyond the classic categories. Recent events include AI security scenarios, cloud infrastructure attacks, supply chain compromises and container escapes, reflecting the actual threat landscape. Some events also allow AI assistants, while others test AI systems themselves.

What skills do CTFs actually teach?

CTFs teach hands-on skills that are hard to learn from reading alone: how to inspect a web request, how to read a packet capture, how to spot a weak cipher, and how to work through a problem when the answer is not obvious. They also teach teamwork, time management and clear note-taking under pressure.

Just as important, CTFs teach defensive thinking. To exploit a web flaw, you must understand how the application should have been built. To reverse a binary, you must understand how software works. That is why employers value CTF experience: it shows you can find and understand vulnerabilities, not just name them. If you are building a wider security habit, our small business cybersecurity checklist covers the defensive side.

CTFs are not a complete education on their own. They rarely cover governance, risk, compliance or the business side of security, and some techniques are deliberately unrealistic. Treat them as practice for the technical core, and combine them with structured learning for the rest.

Where should beginners start?

Start with a free jeopardy platform, pick one category, and solve one easy challenge. Do not try to learn everything first. The fastest way to learn is to attempt a challenge, get stuck, read a hint or a write-up, and try again.

  • PicoCTF: run by Carnegie Mellon University, free, with year-round practice challenges that start from zero. The best on-ramp for complete beginners.
  • OverTheWire Bandit: a free, terminal-based wargame that teaches Linux command-line basics, one level at a time.
  • TryHackMe: guided rooms with learning paths, including a free tier and a complete beginner path.
  • Hack The Box: realistic vulnerable machines and challenges, with a starting point track for beginners and harder content as you advance.
  • CTFtime: the calendar and ranking system for live events. Find a beginner-friendly online jeopardy CTF and enter it.

Set up a Linux environment first, even if it is just a virtual machine. Learn basic terminal commands, how to use Python for small scripts, and how to inspect a web page and its requests. Those three skills unlock most beginner challenges.

Our free hash generator is handy for the encoding puzzles that appear in early CTFs.

A beginner path into CTFs1. Learn LinuxOverTheWire Banditfree, terminal-based2. Solve easy flagspicoCTF practicefree, guided, year-round3. Go structuredTryHackMe pathsguided rooms4. Try realistic machinesHack The Box Starting Pointharder, more realistic5. Enter a live CTFFind one on CTFtime, play soloor with a team, aim for one flag
Start free, start easy, and enter a live event once you have solved a few practice flags. Illustration by Cysoro.

How do you prepare for your first CTF?

Prepare by practicing, not by studying in the abstract. Solve a few easy challenges on picoCTF, learn to take notes as you go, and build a small toolkit of commands and scripts you reuse. Join a team if you can; CTFs are team sports, and different people spot different things.

During the event, read the challenge description carefully, check the files you are given, and try the obvious things first. Many beginners skip the easy checks and jump to advanced tools. If you are stuck for more than an hour, move to another challenge and come back later.

Keep your work legal and safe. Only attack targets the organizers provide, use a separate virtual machine for CTF work, and do not reuse CTF techniques on real systems without permission. The skills are powerful, and the boundary is clear: authorized targets only.

The bottom line

Capture the Flag is the most hands-on way to learn cyber security. You find a flag by breaking something that was built to be broken, and every flag you submit proves a skill you actually used, not just read about.

Start with picoCTF, solve one easy challenge, and read the write-up when you get stuck. You can practice the encoding puzzles that show up early with the free base64 decoder.

Test your phishing awareness with our phishing quiz between challenges.

Frequently asked questions

What does CTF stand for in cyber security?

CTF stands for Capture the Flag. It is a competition where participants solve security challenges to find hidden strings called flags, usually in the format flag{...}, and submit them for points.

Is capture the flag legal?

Yes, when you play on an authorized platform or in an organized competition. The targets are built to be attacked, and the organizers invite you to do it. Attacking real systems without permission is illegal, even if you use the same techniques.

Do I need to know how to code to start a CTF?

No. Many beginner challenges need no coding at all, and you can learn the basics as you go. Some Python, Linux command-line skills and an understanding of how the web works will help you solve more challenges over time.

What is the difference between jeopardy and attack-defense CTFs?

In a jeopardy CTF, you solve standalone challenges in categories for points, in any order. In an attack-defense CTF, each team runs identical vulnerable services, patches its own bugs, and attacks opponents to steal their flags, all at the same time.

What is the best CTF for beginners?

PicoCTF, run by Carnegie Mellon University, is the best starting point for complete beginners. It is free, with guided challenges that start from zero. TryHackMe is a good next step if you want structured learning paths, and OverTheWire Bandit teaches Linux basics.

How long does a CTF last?

It varies. Online jeopardy CTFs often run for 24 to 48 hours, while practice platforms are available year-round. Attack-defense finals at conferences such as DEF CON run over several days, with qualifiers held earlier in the year.

Can CTFs help you get a cyber security job?

Yes. A consistent CTFtime ranking, a handful of well-documented write-ups, or a strong showing in a known competition is one of the few beginner-accessible ways to show real, verifiable skill to an employer. It does not replace experience, but it demonstrates hands-on ability.

What tools do I need for a CTF?

A Linux environment, a browser, and a few common tools are enough to start: a terminal, Python, and tools for inspecting web traffic and files. Most platforms explain what you need per challenge, and you can add tools such as Burp Suite, Wireshark and Ghidra as you advance.

Sources

  1. Wikipedia — Capture the flag (cybersecurity)
  2. Splunk — What is CTF? Capture The Flag Competitions for Cybersecurity
  3. Snyk — Getting started with CTF
  4. CyberTalents — How CTF Competitions Make You a Better Cybersecurity Professional?
  5. HackerNoob — CTF Challenges in 2026: Where to Start and What Changed
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Wikipedia's CTF overview, Splunk and Snyk CTF guides, and CyberTalents' beginner guide.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free