Learning CTF from scratch - CTF basic concepts

This series writes out the process of CTF that I have learned in detail, so that everyone can refer to it when studying.

1. Introduction to CTF

01" Introduction

Chinese is generally translated as capture the flag game (for most novices, it can also be called a sign-in game). In the field of network security, it refers to a form of technical competition among network security technicians.

CTF originated from the DEFCON Global Hacking Conference in 1996 to replace the way hackers conducted technical competitions by launching real attacks against each other.

02" Competition Mode

Problem solving mode:

In the problem-solving mode CTF competition system, participating teams can participate through the Internet or on-site network. This mode of CTF competition is similar to ACM and Information Olympiad. in the online tryout.

Topics mainly include reverse engineering, vulnerability mining and utilization, web penetration, cryptography, forensics, steganography, secure programming and other categories.

Offensive and defensive mode:

In the offensive and defensive mode CTF competition system, participating teams attack and defend each other in cyberspace, dig out network service loopholes and attack opponent services to score points, and repair themselves to defend to avoid losing points.

The offensive and defensive mode CTF competition system can reflect the game situation in real time through the score, and finally the winner is directly determined by the score. It is a highly competitive, highly ornamental and highly transparent network security competition system.

In this competition system, not only the intelligence and skills of the participating players are compared, but also the physical strength (because the competition usually lasts for 48 hours or more), but also the division of labor and cooperation between the teams.

Blend Mode:

The CTF competition system combines the problem-solving mode and the offensive and defensive mode. For example, participating teams can obtain some initial points by solving problems, and then use offensive and defensive confrontation to increase or decrease the score in a zero-sum game. Finally, the winner is determined by the score. A typical representative of the mixed-mode CTF competition system is the iCTF International CTF Competition.

03"Summary

Generally, large-scale competitions are mostly organized by i Spring and Autumn. The competitions are held in the form of groups, divided into preliminaries and finals.

qualifying round

They are all online competitions, and the competition formats are almost all problem-solving modes. Enter the official website, log in with your account and password, and you will be taken to a page where the questions are classified by category (what categories will be discussed later), click to provide the link to the question, question information, question prompts and flag (answer) to submit, and you will get Fraction.

Among them, the first blood, the second blood, and the third blood get higher scores, and the teams who answer the question later get the same score. The fewer teams answer the question, the more points they get, and then they are ranked according to the score to determine the team that enters the final .

For example: for a check-in question, the initial score is 500. When a team submits the correct flag, the score will drop to 470/450. The more the number of people, the greater the drop in score.

And the score of the first blood, the second blood and the third blood will be higher than that of the subsequent correct answers.

finals

Almost all offline competitions are conducted in a mixed mode, because the questions in the offensive and defensive mode are prone to problems such as easy to defend and difficult to attack, and problems that cannot be learned in the speed section. Because of this, most of the finals are reverse-oriented Lord, it can easily become a retrograde contest.

2. Topic classification

Topics generally fall into 6 categories:

Web (Internet Security)

Web is one of the main question types in the CTF competition. The questions involve many common WEB vulnerabilities, such as XSS, file inclusion, code execution, upload vulnerabilities, and SQL injection. There are also some simple examinations of networking basics such as return packets, TCP-IP, packet content and structure. It can be said that the topic environment is closer to the real environment.

Required knowledge points: PHP, Python, SQL (mainly mysql), TCP-IP, linux commands, html, javascript, etc.

MISC (Miscellaneous Security)

MISC is a large-scale CTF competition. The questions are very difficult. It is a type that can increase the score, but it is not difficult in small competitions and question banks. The topics involve steganography, traffic analysis, electronic forensics, human flesh search, data analysis, big data statistics, etc., covering a wide range of topics, mainly examining the various basic comprehensive knowledge of the contestants.

Required knowledge points: Familiar with using many steganography tools, traffic inspection tools, understanding coding, etc.

Crypto (cryptography)

It mainly includes two parts: classical cryptography and modern cryptography. Classical cryptography is interesting and diverse, while modern cryptography has high security and requires higher understanding of algorithms.

Required knowledge points: matrix, number theory, classical cryptography, algorithm, etc.

Reverse

The topic involves software reverse engineering, cracking technology, etc., and requires a solid foundation in disassembly and decompilation. It mainly examines the reverse analysis ability of the contestants.

Required knowledge points: assembly language, encryption and decryption, common decompilation tools.

PWN (binary security)

In hacker slang, PWN means breaking through and gaining permission. In the CTF competition, it represents overflow problems. Common types of overflow vulnerabilities include stack overflow and heap overflow. It mainly examines the ability of parameter players to exploit loopholes.

Required knowledge points: C, OD+IDA, data structure, operating system.

Mobile (Mobile Security)

It mainly introduces the common tools and main question types in Android reverse engineering. Android reverse engineering often requires a certain amount of Android development knowledge. iOS reverse engineering questions rarely appear in CTF competitions, so I won’t introduce them too much.

blockchain

Blockchain problems have appeared in many CTF competitions recently, and blockchain applications are becoming more and more popular applications, and blockchain will become a focus in the future. Because I haven't been in touch with it, I won't go into details here.

3. How to get started

Getting started is a big barrier for us novices, and many people don't know how to get started.

Personal Getting Started Steps

01" Determine the direction

Generally divided into two directions:

Direction A: PWN+Reverse+Crypto random match

Direction B: Web+Misc combination

Misc everyone can do

Introductory knowledge:

What to learn: Windows foundation, Linux foundation, computer composition principle, operating system principle, network protocol analysis

Direction A: IDA tool usage (fs plugin), reverse engineering, cryptography, buffer overflow, etc.

Direction B: Top 10 security vulnerabilities such as web security, network security, intranet penetration, database security, etc.

02 "A lot of questions

Brushing up questions is very important. Many people can see in other ctf introductory tutorials that brushing up questions is the first step and an important step for advancement, so brushing up questions is very important, but brushing up questions also requires skills.

03 "Promote the game with practice, train with the game

Choose a contest that already exists for Writeup or join a recent CTF contest.

To summarize the problem-solving process, it is best to write a blog or the like.

04" Recommended platform

I strongly recommend bugku , and take your time to do the rest, first do a good job with bugku, and then do the offensive and defensive world, and you will enter the threshold of advancement.

05"Tool collection

Don't download the tools recommended by others first, you won't learn them anyway, you must look for them in the process of solving problems, so that you can deepen your impression and directly summarize a set of experiences.

4. Programming

Many people will be entangled in whether to go deep into programming. Don’t go too deep, it’s almost enough, you can write a program by referring to the documentation, and you can understand it, because every language can’t be learned, and it’s always being updated. If you focus too much on one language, Safety knowledge is quite easy to miss.

Or go deep into some popular programming, such as PHP, python, java, etc. Among them, PHP can be said to be a must-learn item. If you can learn this language thoroughly, then there is no pressure on code auditing.

The above are all personal thoughts, and you have to decide how to choose. Whether you want to go deep into it or which one to go deep into is a problem. You must think carefully before you start. Don’t wait until you are halfway through school to change your direction. This is a big taboo in learning. Because you will do the same when you learn other things, unless you find that this is not very suitable for your development.

Finally, I compiled a piece of CTF information before. If you need it, you can leave a message for me~ Share it with everyone in the background ~

 

Guess you like

Origin blog.csdn.net/2301_77732591/article/details/131090851