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.
What a CTF is
Section titled “What a CTF is”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.txtand aroot.txt.
CTF types
Section titled “CTF types”- 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.
How to approach a Jeopardy challenge
Section titled “How to approach a Jeopardy challenge”The prompt, the file name and the point value are hints. Before attacking, identify the category and the attack surface.
# Identify an attached file before anything elsefile challengestrings -n 8 challenge | less# If it's a binary, check its protections and architecturechecksec --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.
Boot2root methodology
Section titled “Boot2root methodology”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
- Enumeration — scan ports, services and versions. The most important step.
- Analysis — understand each service; look for known vulnerabilities, exploits and credentials.
- Foothold — initial access (web shell, exploit, reused credentials) →
user.txt. - Escalation — from user to root/SYSTEM; see Linux privesc and Windows privesc →
root.txt. - Document — notes on the whole path (for the writeup and to learn, see How to write writeups).
Enumeration in practice
Section titled “Enumeration in practice”# Fast full port sweep, then scripts+versions over the open onesnmap -p- --min-rate 5000 -T4 -oA nmap/allports 10.10.10.10nmap -sCV -p22,80,445 -oA nmap/detailed 10.10.10.10
# Web: directory and virtual-host fuzzingffuf -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \ -u http://10.10.10.10/FUZZ -icffuf -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 sharesenum4linux-ng -A 10.10.10.10smbclient -L //10.10.10.10/ -NFor web, go through Burp and the web methodology. Tools detailed in Essential tools.
In practice
Section titled “In practice”- 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.
Common mistakes
Section titled “Common mistakes”- 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.
Checklist
Section titled “Checklist”- 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