Skip to content
Pwnversity
CTF-METODOLOGIAbasic · 6 min · upd. 2026-10

CTF methodology

A CTF (Capture The Flag) is a competition where you solve security challenges to get secret strings called flags (usually formatted as flag{...} or picoCTF{...}). They’re the best way to practice hacking legally and in a structured way: they train the same skills as a real pentest, but in a controlled environment with a guaranteed solution. This card sets the method so you don’t get lost: what types exist, how to approach a challenge, and the workflow that solves most of them.

The goal is to find a flag hidden behind a vulnerability or a puzzle and submit it to the platform to score. Two realities live under the same name:

  • Jeopardy — independent challenges grouped by category (web, pwn, crypto, forensics, reversing, OSINT, misc). Each solved flag adds points; it’s the most common format and the one used by picoCTF or most CTFtime events.
  • Boot2root / machines — compromise a system end to end (Hack The Box or OSCP style). There are no categories: there’s a machine, a user.txt and a root.txt.
  • Jeopardy: standalone challenges by category, scored per challenge. The most accessible to start with.
  • Attack-Defense: each team defends its services and attacks the others’ live; you patch and exploit at the same time. A finals format (DEF CON CTF).
  • King of the Hill (KotH): compromise a machine and keep control of it against other teams.
  • Boot2root / machines: a vulnerable machine compromised end to end; the format of HTB, VulnHub and OSCP prep.

The prompt, the file name and the point value are hints. Before attacking, identify the category and the attack surface.

Ventana de terminal
# Identify an attached file before anything else
file challenge
strings -n 8 challenge | less
# If it's a binary, check its protections and architecture
checksec --file=./challenge
  • Low points = warm-up, usually a direct technique.
  • High points = a multi-step chain or a convoluted vulnerability.
  • Map the challenge to its area in this wiki (see Categories) and use the technical cards as reference instead of improvising.

The workflow that solves most machines. Enumeration is everything: almost every stall comes from not enumerating enough.

flowchart TD
    A[Enumeration: ports and services] --> B[Analysis: versions, vulns, creds]
    B --> C[Foothold: initial access = user flag]
    C --> D[Local enum: user, permissions, SUID, cron]
    D --> E[Privilege escalation = root flag]
    E --> F[Document: notes and writeup]
    D -->|no clear vector| A
    B -->|rabbit hole| A
  1. Enumeration — scan ports, services and versions. The most important step.
  2. Analysis — understand each service; look for known vulnerabilities, exploits and credentials.
  3. Foothold — initial access (web shell, exploit, reused credentials) → user.txt.
  4. Escalation — from user to root/SYSTEM; see Linux privesc and Windows privesc → root.txt.
  5. Document — notes on the whole path (for the writeup and to learn, see How to write writeups).
Ventana de terminal
# Fast full port sweep, then scripts+versions over the open ones
nmap -p- --min-rate 5000 -T4 -oA nmap/allports 10.10.10.10
nmap -sCV -p22,80,445 -oA nmap/detailed 10.10.10.10
# Web: directory and virtual-host fuzzing
ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \
-u http://10.10.10.10/FUZZ -ic
ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
-u http://10.10.10.10/ -H "Host: FUZZ.target.htb" -fs 0
# SMB and shares
enum4linux-ng -A 10.10.10.10
smbclient -L //10.10.10.10/ -N

For web, go through Burp and the web methodology. Tools detailed in Essential tools.

  • Enumerate exhaustively before exploiting: ports, directories, parameters, versions, users.
  • One step at a time; note everything found (credentials, paths, versions, hints).
  • If you get stuck, re-enumerate, change the angle and review what you dismissed too fast.
  • In competition, set a time-box per challenge and rotate; don’t obsess over one.
  • Reuse found credentials across other services (basic password spraying): people reuse passwords.
  • Jumping to exploitation without thorough enumeration: mistake number one.
  • Getting stuck in a rabbit hole (a false lead that burns time): if something needs too many improbable assumptions, it’s almost never the path.
  • Not reading the prompt: file names, point values and description almost always hide the clue.
  • Brute force where analysis is needed: crypto almost always hides a specific flaw, not a brute force.
  • Not taking notes and repeating tests already done.
  • Identify the CTF type (Jeopardy / Attack-Defense / boot2root)
  • Read the prompt, file names and point value as hints
  • Exhaustive enumeration (ports, services, web, versions)
  • Analyze each service; look for vulnerabilities and credentials
  • Foothold (user flag) while documenting the path
  • Local enumeration and privilege escalation (root flag)
  • Recognize and exit rabbit holes; apply a time-box
  • Complete notes → writeup