Capture the flag

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search

Summary

Capture the Flag (CTF) is a competition format in which participants search for flags in an environment. The flags are usually around digital objects that prove that the participant has achieved a specific goal, e.g. access to a file, interaction with a service or reading a database.

Types of CTF challenges

Jeopardy-style CTF

Series of challenges, each scoring points assigned. The participants must complete the challenge, handle demands and submit the flags in order to to collect points.

Attack/Defense CTF

In this type of CTF, the teams have the double task of of protecting a network or system while at the same time another team launches attacks on the networks or systems of the other teams. Points are awarded for successful attacks on the opponents and for defending your own system.

King of the Hill CTF

In this CTF variant competing teams fight for control over a central server. The team that wins the domination over this server for the longest period of time is the winner.

Red vs. blue CTF

This CTF type simulates real cyber attack scenarios. One team, the "red team", carries out attacks on a network or system, while the opposing "blue team" takes on the role of the defenders. Points are awarded for both successful attacks and for successful defenses.

Adversarial CTF

In adversarial CTFs, participants compete against an automated system that generates challenges in real time. This system adapts based on the performance of the participants and and dynamically adjusts the difficulty of the challenges.

Categories of CTF challenges

Remote Code Execution (RCE)

Exploitation of software vulnerabilities to execute code on a remote server.

Cryptography

Tasks in this category include the deciphering of codes and ciphers ranging from classical ciphers such as Caesar and transposition to modern cryptographic methods such as AES, 3DES, RC4 and Twofish.

Programming

These tasks require the writing of solution codes in a programming language of your choice. Solving them manually is usually too time-consuming.

Open Source Intelligence (OSINT)

OSINT challenges require you to discover hidden clues on the public internet and social media platforms. Good search skills are essential for completing these tasks effectively.

Reverse Engineering

This category is about analyzing executable binary files, malware samples or other files to understand their intentions or behavior.

Forensics

Tasks in this category require you to analyze log files, network packets or other artifacts to find out how a hacker penetrated a system.

Steganography

Steganography tasks revolve around the art of hiding (or revealing) messages in images, audio files and similar media.

Tools

Python

Python is a scripting language in which you can use packages to extend the functionalit. It is recommended that you work with Python 3, as Python 2.7 is outdated and is no longer supported. With the 'pip' utility program you can easily install additional packages.

CyberChef

CyberChef is a web-based platform in JavaScript that enables the creation of recipes, a series of steps for decoding text or data. You can also set up a standalone instance from the code repository.

Boxentriq

Boxentriq is another web-based platform that provides an overview of ciphers and various analysis tools.

Kali Linux

Kali is a special Linux distribution that is equipped with numerous tools that can be used for penetration testing. You can extend the tools with the 'apt-get' utility program.

Dirb and Gobuster

Dirb is a tool for scanning directories and files on a web server. Gobuster is a similar tool, which is implemented in the language Go. It offers improved performance when scanning directories and files.

Metasploit

Metasploit is a collection of exploit tools designed for penetration testing. A related tool, Msfvenom, makes it possible to create and encode exploit payloads.

Pwntools

Pwntools is a Python-based framework tailored for CTFs and exploit development.

exploit-db

This website serves as a resource for the discovery of proof-of-concept exploit code.

Ghidra

Ghidra is a set of Java-based tools developed by the NSA for the reverse engineering of software. It also includes a decompiler to convert binary code into high-level C code.

Debugging tools

Debugging tools are indispensable for interacting with programs, stop execution, examine register and memory contents and much more. Fore debugging are several options to choose from, e.g. x64dbg, OllyDbg, Immunity and under Linux, gdb (GNU Debugger). If you need advanced functions there are plugins such as PEDA or GEF.

References

[1] [2] [3]