The anatomy of a CTF challenge

WHYREDZero
3 min readAug 30, 2020

Close your eyes and picture a treasure hunt. What do you see? A bunch of teams competing to find a treasure? If you think so, you are right. Let me put “CTF” into simpler terms. CTF stands for Capture The Flag. It’s a treasure hunt, and it happens inside a machine. You race against other teams to find the treasure. What treasure are you looking for? It’s called a flag. A flag is a variable that defines the current state of the system or holds an intermediary value. Find this flag first, and you win the game.

Despite an abundance of retaliation (from parents) to playing video games, there is enough evidence to show that gaming develops hand-eye coordination. Why is that? It’s because you are emulating a physical activity, and your brain is getting the same training if you were engaged in physical activity. The same goes for a CTF event. When playing CTFs, you train your brain for real-life penetration testing challenges that you might face. Also, it helps build problem-solving skills, the highest in-demand skill on the market. In class, you learn the five stages of ethical hacking. In a CTF, you apply the five stages. It is the best approach to learning these concepts.

Just like cybersecurity, CTF has multiple domains. These domains contain multiple sub-challenges, sometimes inspired by real-life events. A few are as follows:

  • Physical challenges: In a physical challenge, the challenger will give you a key and lock you in a closed space. This key can be any storage device. The challenge is to examine the key, find the flag, and break out of the space.
  • Website challenges: A webpage or a set of pages are given to you for finding a flag. The challenge might involve exploring the page and crafting a file that makes the website output the flag.
  • Network challenges: A sample network is given, and it is under attack. To save the network, you need to find the flag and perform the mentioned tasks with it.
  • Reverse engineering challenges: In a reverse engineering challenge, you have to scour through the code of an executable file to find the flag. For establishing a better understanding of the challenge, you may need to run the executable and understand its behavior.
  • Steganography challenges: In this case, the flag is hidden in an image or some other similar media. Again your task here is to look through the media to find the flag.
  • Cryptographic challenges: The challenger encrypts the flag using some technique, adds some information about the encryption method used, and encrypts it again. This process may be repeated again and again to increase complexity. You have to decrypt each layer one-by-one to reach the flag.
  • Forensic analysis challenges: You are provided with logs and memory dumps of a compromised machine or a machine that was used to attack another computer. You will find the flag in the log files or the memory dumps, after solving a few challenges.
  • Mobile security challenges: A compromised smartphone is provided to you. The challenge here is to find the compromised application and use it to find the flag.
  • Break-in challenges: Probably the hardest and the most popular set of challenges on this list. You are given a virtual machine, and you have to hack into the machine and gain root access to find the flag.

Just like food, no two people have the same taste in cybersecurity. You will need to experiment with concepts and practicals in the subject and find what fits your taste. A CTF event is probably the best tool out there to help you find that. Each CTF challenge is designed to test multiple concepts in the subject. If you become part of a team, you will concentrate on specific topics easily. It will take some time to reach there, but eventually, you will. Even if you can’t find a specific stream to work with, experimenting with CTFs will help you gain more knowledge on the subject.

--

--