Construction method of CTF flag snatching match based on VPN

By adopting VPN-based network architecture and virtual machine technology in the CTF competition, the problem that the existing technology cannot meet the hybrid online and offline competition scenarios is solved, and a high flexibility, security and fair competition environment is achieved.

CN120034475APending Publication Date: 2025-05-23XIAN THERMAL POWER RES INST CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510021306.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The existing CTF information security competition construction method cannot meet the scenarios in which some contestants participate online and some contestants access physically through hubs in the intranet of the group company, and there are certain shortcomings.

Method used

The CTF flag-winning competition construction method is adopted based on VPN. By setting up a VPN egress router and a team VPN router in the competition network, combining virtual machines (such as Linux and Windows virtual machines) and port forwarding mechanisms, players can seamlessly access the competition and isolate secure access to the competition.

Benefits of technology

It improves the flexibility and adaptability of CTF competitions, supports mixed online and offline competitions, improves the security and fairness of the competitions, and meets the needs of different network environments and question types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034475A_ABST
    Figure CN120034475A_ABST
Patent Text Reader

Abstract

The invention provides a construction method of a CTF flag snatching game based on a VPN, and the method comprises the steps: setting a VPN exit router in a competition network, the competition network comprises a competition question server, and the competition question server stores various question types of competition questions; a team VPN router is arranged in the subnet of each team, and the team VPN router is connected with the VPN exit router and is used for accessing the subnet of each team into the competition network; a virtual machine is arranged in the subnet of each team, the virtual machine of each team corresponds to at least one player, and the virtual machine is connected with the team VPN router.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security, and in particular to a method for constructing a CTF flag grabbing competition based on VPN. Background Art

[0002] With the continuous development of information technology, information confrontation between countries is becoming more and more fierce, and network security issues are becoming more and more serious. The research and judgment of network security issues ultimately depends on people with professional capabilities. Therefore, the strength of a country's network security capabilities ultimately depends on the strength of the professional capabilities of network security talents.

[0003] The significance of the CTF information security competition is to improve the participants' network security skills, promote knowledge exchange, discover security talents, enhance security awareness and promote the development of security technology by simulating real information security attack and defense scenarios.

[0004] The existing construction methods of CTF information security competitions require that all contestants must access the competition environment offline through a hub, or that all contestants participate in the CTF information security competition online through the Internet, which leads to certain limitations in the environment for conducting security competitions.

[0005] When using existing technologies to conduct CTF information security competitions in the intranet of a group company, if some contestants participate in the CTF information security competition online and some contestants participate in the CTF information security competition offline through physical access to a hub, the current method for constructing the CTF information security competition has certain deficiencies and cannot meet this scenario.

[0006] Based on the above problems, the present invention proposes a method for constructing a CTF flag grabbing game based on VPN. Summary of the invention

[0007] In a first aspect of the present disclosure, a method for constructing a CTF flag grabbing game based on VPN is provided, comprising:

[0008] A VPN exit router is set in a competition network, wherein the competition network includes a competition question server, and the competition question server stores competition questions of various question types;

[0009] A team VPN router is set in each team's subnet, and the team VPN router is connected to the VPN egress router to connect each team's subnet to the competition network;

[0010] A virtual machine is set in the subnet of each team, and the virtual machine of each team corresponds to at least one contestant, and the virtual machine is connected to the team VPN router.

[0011] In combination with the first aspect, the virtual machine includes at least one Linux virtual machine and at least one Windows virtual machine.

[0012] In combination with the first aspect, the Linux virtual machine and the Windows virtual machine include a first mode and a second mode, the first mode is used for the contestants of each team to access through a hub mode, and the second mode is used for each team to access through a VPN.

[0013] In combination with the first aspect, the Linux virtual machine is used to receive pwn questions and reverse engineering questions, and the Windows virtual machine is used to receive web questions.

[0014] In combination with the first aspect, the team VPN router connects the virtual machine of the corresponding team to the competition network through port forwarding.

[0015] In combination with the first aspect, the team VPN router forwards the competition questions from the competition question server to the subnet where the contestants are located by means of port forwarding.

[0016] In combination with the first aspect, the number of question types of the competition questions is greater than the number of the teams, and each team accesses different competition questions in the competition question server through its corresponding team VPN router.

[0017] According to a second aspect of the present disclosure, an electronic device is provided, including:

[0018] one or more processors;

[0019] The storage unit is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors can implement the method for constructing the VPN-based CTF flag-grabbing competition.

[0020] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for constructing the VPN-based CTF flag-grabbing competition can be implemented.

[0021] The VPN-based CTF flag grabbing competition construction method provided by the present invention constructs a VPN-based network architecture, where online players connect to the team VPN router via the Internet VPN, and offline players connect to the local virtual machine via the hub physical access method, so that contestants can seamlessly access the competition in different network environments. At the same time, the system forwards the competition question service to the public network through the team VPN router and port forwarding mechanism, ensuring that each team can access the competition resources in isolation and security. Each team is configured with Linux and Windows virtual machines to cope with different types of competition questions, which improves the flexibility of the competition environment. This method not only improves the flexibility and adaptability of the CTF competition, supports online and offline mixed participation, but also improves the security and fairness of the competition. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of a method for constructing a VPN-based CTF flag grabbing game according to an embodiment of the present disclosure;

[0023] Figure 2 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present disclosure.

[0025] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments and are not intended to limit the disclosed embodiments. The singular forms of "a", "said" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0026] like Figure 1 FIG. 1 is a flow chart of a method for constructing a VPN-based CTF flag grabbing game according to an embodiment of the present disclosure. The method includes:

[0027] S101: Setting a VPN egress router in a competition network, wherein the competition network includes a competition question server, and the competition question server stores competition questions of various question types;

[0028] S102: Setting a team VPN router in each team's subnet, wherein the team VPN router is connected to the VPN egress router, and is used to connect each team's subnet to the competition network;

[0029] S103: Setting a virtual machine in the subnet of each team, wherein the virtual machine of each team corresponds to at least one contestant, and the virtual machine is connected to the team VPN router.

[0030] Set up a VPN exit router in the competition network. Set up a VPN exit router in the core part of the competition network. This router is the exit for all teams and contestants to access the competition network. The competition question server is also deployed in the competition network, storing various types of competition questions.

[0031] The VPN egress router is used to connect the networks of participating teams through an encrypted channel and ensure the secure transmission of network data during the competition. Through it, all teams can securely access the competition server and obtain the corresponding competition questions.

[0032] Set up a team VPN router in each team's subnet. Each team's subnet has an independent VPN router, which is connected to the VPN exit router via VPN.

[0033] The role of the team VPN router is to connect each team's internal subnet to the competition network and communicate with the VPN egress router. Through this design, each team's network environment is isolated, ensuring that the participating teams do not interfere with each other, and data transmission is encrypted.

[0034] Set up virtual machines in each team's subnet. Each team's subnet is equipped with virtual machines for contestants, which are connected to the competition network through the team's VPN router. Each virtual machine corresponds to at least one contestant.

[0035] The virtual machine provides each contestant with an independent environment for performing tasks, solving problems, and submitting results. The virtual machine is connected to the competition network through the team VPN router, ensuring that the contestant can safely and conveniently access the competition server and other competition resources.

[0036] The use of VPN network can ensure the encrypted transmission of data and ensure that no sensitive data will be leaked during the competition. Each team accesses the competition network through an independent VPN router, keeping the network isolated from each other to prevent interference and cheating.

[0037] By using virtual machines, a personalized working environment can be provided for each contestant, and different operating systems (such as Linux, Windows, etc.) can be supported at the same time to meet the diverse requirements of the questions.

[0038] This structure can flexibly cope with competitions of different sizes. When adding new teams or participants, you only need to configure subnets, VPN routers and virtual machines for the new teams, and the existing network structure does not need to be modified on a large scale.

[0039] This network structure can support both offline and online competitions. For example, contestants can access through the Internet or local area network, adapting to diverse competition environments and meeting different organizational requirements.

[0040] This architecture is applicable to CTF competitions or other similar information security competition environments, which can effectively enhance the security and operability of the competition while providing a high degree of flexibility.

[0041] Furthermore, the virtual machines include at least one Linux virtual machine and at least one Windows virtual machine.

[0042] At least one Linux virtual machine and at least one Windows virtual machine: In the subnet of each team, not only can virtual machines be configured for each contestant, but also at least one Linux virtual machine and one Windows virtual machine can be deployed according to the requirements of the competition questions. This design is to cope with different question types and operating environment requirements. For example, some questions may need to run on the Linux system (such as PWN questions, reverse engineering questions), while some questions require Windows system support (such as Web questions).

[0043] Arrangement method:

[0044] Single virtual machine configuration: When the number of contestants is small or the question requirements are low, each team only needs one Linux virtual machine and one Windows virtual machine. Each contestant can remotely connect to the corresponding virtual machine to execute question tasks. The virtual machines can be uniformly connected to the competition network through the team VPN router to ensure smooth interaction with the question server.

[0045] Exemplarily, multi-virtual machine configuration: When there are multiple contestants in a team or the questions require different operating system environments, separate Linux and Windows virtual machines can be configured for each contestant. This means that each contestant has two virtual machines within the subnet to handle different types of questions respectively. For example, the Linux virtual machine is used for PWN and reverse questions, and the Windows virtual machine is used to handle Web or other system-dependent questions.

[0046] Optionally, in some specific scenarios, they can be arranged separately. For example:

[0047] All contestants share one Linux virtual machine and one Windows virtual machine. This method is applicable to scenarios with lower question complexity or fewer concurrent operations.

[0048] Or each player has a separate Linux and Windows virtual machine. This method is suitable for scenarios with high concurrency or players requiring a large amount of system resources.

[0049] Example extensions:

[0050] Small competition example: A team has three contestants, and the team's subnet is configured with three Linux virtual machines and three Windows virtual machines. Each contestant has a Linux virtual machine and a Windows virtual machine, which are used to handle different types of competition questions. All virtual machines are connected to the competition network through the team VPN router, and the interaction between each virtual machine and the competition question server is securely transmitted through VPN.

[0051] Example of a large-scale competition: In a large-scale competition, a team has 10 contestants. To avoid resource conflicts, 20 virtual machines are deployed in the team's subnet, and each contestant is configured with a Linux virtual machine and a Windows virtual machine. Due to the large number of people, the network resource pressure is large, and high-performance servers are used to host these virtual machines to ensure that the virtual machines can provide stable resource support during operation.

[0052] Beneficial effects: Through the flexible virtual machine layout scheme, the present invention can adapt to competition scenarios of different scales, ensuring that each contestant can obtain a stable and secure competition environment, while meeting the requirements of different operating systems, and improving the usability and applicability of CTF competitions.

[0053] Furthermore, the Linux virtual machine and the Windows virtual machine include a first mode and a second mode, the first mode is used for contestants of each team to access through a hub mode, and the second mode is used for each team to access through a VPN.

[0054] The virtual machine in the present invention is configured with two access modes to meet the needs of different competition methods:

[0055] Mode 1 (Hub Mode Access): This mode is designed for offline contestants. Contestants access the competition network through the local LAN. Contestants from each team connect to the subnet through a physical Hub device, and then enter the virtual machine to solve the competition questions.

[0056] Second mode (VPN access): This mode is for online contestants. Contestants connect to the competition network remotely through the Internet and access the virtual machine of the team subnet through the VPN secure channel. In this way, contestants do not need to participate in the competition on site, but can answer questions remotely through the Internet.

[0057] The first mode (Hub mode access):

[0058] Applicable to teams participating in the competition. The contestant's device (such as a laptop or desktop) is connected to the subnet through a local area network, and the local network environment is built based on the Hub. In this mode, the contestant operates through the Linux virtual machine and Windows virtual machine in the subnet. The connection between the contest question and the virtual machine is more stable and fast because it does not go through the Internet, and the network delay is low.

[0059] Second mode (VPN access):

[0060] Applicable to remote teams, players remotely access the competition network through the Internet and VPN routers. Players' devices are connected to the team's subnet through VPN tunnels, and virtual machines are connected to the competition server through VPN.

[0061] Optionally, the system can be designed to automatically select the first mode or the second mode according to the player's access method. For example, when it is detected that the player is directly connected through a local area network (LAN), the system automatically switches to the first mode, and if a VPN tunnel connection is detected, it switches to the second mode.

[0062] You can also let the competition administrator or players manually select the mode. For players who are familiar with the network environment, they can choose the appropriate mode according to their needs and network conditions.

[0063] The first mode operates the virtual machine through a physically isolated LAN, avoiding interference and attacks from external networks. The second mode provides remote secure access through VPN to ensure secure data transmission.

[0064] Optionally, the method can also be expanded to support more modes, such as adding a third mode in certain competitions to allow contestants to access via a virtual local area network (VLAN) to improve adaptability to complex network environments.

[0065] Beneficial effects: By setting two modes of Linux virtual machine and Windows virtual machine, the present invention provides a flexible solution for online and offline mixed competition, which greatly improves the adaptability and flexibility of CTF competition. Players can choose the best access mode according to actual conditions, which can not only ensure the stability of the competition environment, but also meet the needs of remote competition.

[0066] Furthermore, the Linux virtual machine is used to receive pwn questions and reverse engineering questions, and the Windows virtual machine is used to receive web questions.

[0067] In the present invention, the Linux virtual machine and the Windows virtual machine are designed as dedicated environments for different types of competition questions, and can receive and process questions of different natures respectively:

[0068] Linux virtual machine: mainly used to receive and process PWN questions (cracking questions) and reverse engineering questions.

[0069] Windows virtual machine: mainly used to receive and process WEB questions (Web-based security vulnerability exploitation and protection questions).

[0070] The Linux virtual machine is used to receive PWN questions and reverse engineering questions:

[0071] PWN questions: usually require contestants to enter or control a Linux system service or program by exploiting a vulnerability or cracking technology. Therefore, PWN questions need to be run in a Linux environment, because most PWN questions involve program vulnerability exploitation under the Linux system (such as stack overflow, format string vulnerability, etc.).

[0072] Reverse Engineering: Participants need to analyze, understand and modify binary code. Since reverse engineering is usually closely related to the kernel architecture, file format (such as ELF files), instruction set, etc. of the operating system, the Linux virtual machine provides participants with an open and flexible environment that can better support these tasks.

[0073] Windows virtual machine is used to receive WEB questions:

[0074] WEB questions: WEB questions usually involve discovering and exploiting vulnerabilities in websites or web applications, such as SQL injection, cross-site scripting (XSS), file upload vulnerabilities, etc. Since many web applications are built on Windows servers, Windows virtual machines can better simulate and execute these web environments, providing vulnerability exploitation scenarios that are closer to the real world.

[0075] Specific requirements of Windows environment: Many corporate Web applications, server-side software, and even some proprietary scripts or programs only run on Windows. Therefore, executing Web questions on a Windows virtual machine can provide a real test platform that is close to the actual production environment.

[0076] Advantages of Linux virtual machines: Linux systems are ideal environments for high-performance computing, network protocol research, and low-level programming. Most PWN and reverse engineering questions require direct manipulation of low-level system functions or complex binary analysis. Using Linux virtual machines can provide contestants with an efficient and stable development and debugging environment.

[0077] Advantages of Windows virtual machines: Windows systems are widely used in Web services and enterprise applications. They have a complex security model and user permission control system. Many Web questions are designed based on specific configuration vulnerabilities in the Windows environment. Therefore, Windows virtual machines provide contestants with an environment where they can better understand and exploit these specific vulnerabilities.

[0078] Optionally, the Linux virtual machine can also receive contest questions related to operating system kernel vulnerabilities, system security vulnerabilities, and open source applications. It can be equipped with specific tools, such as gdb (GNU debugger), IDAPro, etc., for debugging and reverse analysis of programs.

[0079] Windows virtual machines can be extended to support network protocol vulnerability topics (such as specific protocol vulnerabilities for Windows servers), Active Directory topics, and even topics related to enterprise-level software integration.

[0080] Each team's virtual machines are isolated from each other to ensure that different teams do not interfere with each other. Each team's Linux and Windows virtual machines are also in an independent environment to avoid potential destructive effects on other systems caused by the operation of the question.

[0081] A team received a PWN question in the competition, which required them to obtain system permissions through stack overflow. Team members logged into the Linux virtual machine in the subnet and used its built-in debugging tool gdb to debug the question step by step, successfully finding and exploiting the vulnerability and completing the question.

[0082] Another team received a web challenge involving a remote file inclusion vulnerability in Windows Server. Team members remotely accessed the Windows virtual machine in the team subnet through VPN, used its built-in IIS server to reproduce the vulnerability, and successfully executed the malicious code to complete the challenge.

[0083] Optionally, the present invention can flexibly adjust the configuration of virtual machines according to different competition requirements. For example, if a competition is mainly based on Web questions, the number of Windows virtual machines can be increased, and vice versa. It is even possible to configure additional images or tool sets for each virtual machine to adapt to different types of competition requirements.

[0084] Some complex competition questions may require both Linux and Windows platforms. Through such virtual machine configuration, participating teams can flexibly switch between Linux and Windows environments to complete multi-platform question solving.

[0085] Beneficial effect: The Linux virtual machine and Windows virtual machine in the present invention provide a reasonable and efficient environment configuration for CTF competition by processing different types of competition questions (Linux is used for PWN questions and reverse engineering questions, and Windows is used for Web questions). This not only improves the efficiency of answering questions for participating teams, but also provides strong technical support for the fairness of the competition and the diversity of questions.

[0086] Furthermore, the team VPN router connects the virtual machine of the corresponding team to the competition network by port forwarding. The team VPN router forwards the competition questions of the competition question server to the subnet where the contestants are located by port forwarding.

[0087] Port forwarding is a network technology that can achieve connection by redirecting traffic from a specific port to another device in the local area network. Specifically, the team VPN router forwards the competition questions (such as PWN questions, Web questions, etc.) from the competition question server to the corresponding virtual machine by setting up multiple ports, so that each team can receive and answer the questions in an isolated environment.

[0088] In this solution, the team VPN router not only forwards the questions from the competition server to the team's virtual machine, but also allows the operations and submitted data of the contestants to be transmitted back to the competition server through this port, realizing two-way communication.

[0089] Team VPN Router Workflow:

[0090] Receive the contest questions from the contest question server: The contest question server maps different types of contest questions to different ports based on the contest question type and configuration. For example, a PWN contest question can be mapped to port 8001, and a Web contest question can be mapped to port 8002.

[0091] Port mapping to the team subnet: The team VPN router will map these ports to the virtual machines in the team subnet. For example, the PWAN topic of port 8001 is forwarded to the Linux virtual machine in the team subnet through the VPN router, and the Web topic of port 8002 is forwarded to the Windows virtual machine.

[0092] Team members access competition questions: Each team member can directly obtain competition questions and analyze and answer them by accessing specific ports in the local virtual machine.

[0093] Preferably, in order to improve the concurrent processing capability of the competition, the competition question server can be deployed as a cluster of multiple servers, with each server responsible for distributing different types of questions. Through the port forwarding mechanism of the VPN router, different servers can correspond to different ports, ensuring that each team can still answer questions smoothly in a complex network environment.

[0094] In actual applications, the team VPN router can also integrate load balancing and fault tolerance mechanisms. For example, when the server load of a certain question type is too high, the team VPN router can dynamically adjust the port forwarding path and forward the request to the backup server to ensure the stable operation of the competition.

[0095] Each participating team answers questions in its own independent subnet, and the traffic between teams is completely isolated. This isolation not only prevents potential security threats, but also ensures that each team can only access the questions they answer and will not interfere with each other.

[0096] Optionally, the organizer can flexibly adjust the port forwarding rules according to different stages of the competition. For example, only some question types are open in the preliminary stage, and then more question types or content are gradually opened by dynamically modifying the port forwarding configuration of the VPN router to maintain the challenge and continuity of the competition.

[0097] Optionally, questions of different difficulty levels can be transmitted through different ports, and the team VPN router can dynamically adjust port allocation based on the progress of the game and the strength of the team to ensure the fairness and competitiveness of the game.

[0098] Beneficial effects: Through the port forwarding mechanism of the team VPN router, the present invention realizes an effective connection between the competition question server and the virtual machine of the participating team. The competition question is forwarded to the virtual machine of the team through a specific port, and the contestants can efficiently obtain the competition question and answer it in an isolated subnet. This technical solution not only improves the flexibility and scalability of the competition, but also provides a safe and efficient network environment support for CTF competitions.

[0099] Furthermore, the number of types of the competition questions is greater than the number of the teams, and each team accesses different competition questions in the competition question server through its corresponding team VPN router.

[0100] In this technical solution, the number of types of questions is greater than the number of teams, which means that the question server stores multiple different types of questions, and the number of these questions exceeds the total number of participating teams. Each team accesses different questions through its corresponding team VPN router, ensuring that each team can deal with independent question combinations in a fair environment during the competition. This design can effectively prevent the duplication of questions between teams and increase the complexity and challenge of the competition.

[0101] The competition question server stores various types of questions, such as PWN questions, Web questions, reverse engineering questions, steganography questions, etc. The complexity and examination directions of these questions vary.

[0102] Each participating team establishes a connection with the competition server through its team VPN router, but each team will not access exactly the same set of competition questions. The competition server distributes the competition questions to different teams, ensuring that teams will not compete for the same questions, thereby improving the fairness and independence of the competition.

[0103] Topic allocation mechanism:

[0104] Since the number of question types is greater than the number of teams, the competition question server will dynamically allocate questions to different teams according to the set allocation rules. For example, this can be achieved through a preset question pool, and each team will be randomly assigned different questions from the question pool or according to the difficulty level at the beginning of the game.

[0105] For example, when 10 teams participate in the competition, the competition server may store 30 questions, including PWN questions, Web questions, etc. Each team will be assigned a different combination of questions through its VPN router. For example, Team 1 may receive two PWN questions and one Web question, while Team 2 may receive one PWN question and two reverse engineering questions.

[0106] The role of the team VPN router:

[0107] The team VPN router not only provides a secure network access channel, but also serves as a bridge for topic forwarding and distribution. Through a specific port forwarding mechanism, each team can access a different set of topics, ensuring the independence of topic distribution.

[0108] For example, Team 1's VPN router might map the PWN questions from the question server to port 9001 via port forwarding, while Team 2's VPN router forwards a different type of Web question via port 9002.

[0109] By designing a larger number of question types than the number of teams, the organizers of the competition can increase the diversity and challenge of the competition. Since each team faces a different combination of questions, the team must have comprehensive technical capabilities to gain an advantage in the competition.

[0110] Preferably, in order to further enhance the flexibility of the competition, a dynamic question allocation system is designed. During the competition, the question server can adjust the difficulty of the questions or assign new questions in real time according to the performance of the team. For example, if a team quickly solves the PWN question, the system can reassign it a more difficult question.

[0111] When designing the question pool, questions can be classified by difficulty level and question type. For example, elementary questions, intermediate questions, and advanced questions can correspond to different scores. Each team needs to draw questions from each difficulty level during the competition to ensure the balance of the competition.

[0112] There are many strategies for question allocation, such as random allocation, preset allocation, or intelligent allocation based on the team's historical performance. For example, teams with higher strength can be assigned more advanced questions, while novice teams can be assigned more elementary questions to maintain fairness in the competition.

[0113] To ensure the security of the competition, the team VPN router not only forwards the questions through ports, but also has an access control mechanism. Each team can only access the questions assigned to it, and other unassigned questions will be restricted. This mechanism can prevent teams from accessing questions that do not belong to them through technical means, ensuring the fairness of the competition.

[0114] In a multi-player team competition, different members may have different technical expertise. Therefore, the assignment of questions can be further refined. Each member of the team can be assigned questions of different types. For example, a team member who is good at PWN questions can receive PWN questions, and a team member who is good at Web questions can receive Web questions.

[0115] This detailed topic distribution strategy can be achieved through the port mapping mechanism of the team's VPN router. Each contestant accesses exclusive topics through different ports, further enhancing the teamwork and professionalism of the competition.

[0116] Examples of actual application scenarios:

[0117] Scenario 1: In a CTF competition, there are 20 questions and 8 participating teams. The questions include PWN questions, Web questions, steganography questions, reverse engineering questions, etc. The competition question server classifies these questions by type and difficulty, and distributes different questions to each team through the port forwarding mechanism of the team's VPN router. Each team receives a different combination of questions from other teams during the competition, and is scored based on the number of questions solved and the difficulty after the competition.

[0118] Scenario 2: In a high-level CTF competition, the number of questions far exceeds the number of participating teams, and the difficulty of the questions is divided into three levels. During the competition, the competition server adjusts the question allocation in real time based on the team's progress in solving the questions. When a team solves most of the intermediate questions, the system will automatically assign them more advanced questions to increase the difficulty and fun of the competition.

[0119] Beneficial effects: By designing the number of question types to be greater than the number of teams, this technical solution increases the diversity and challenge of CTF competitions. Each team accesses different competition questions through its corresponding VPN router to ensure the fairness and isolation of the competition. At the same time, the assignment of questions can be dynamically adjusted according to different strategies, further enhancing the complexity and sense of participation in the competition. This mechanism not only improves the technical content of the competition, but also provides organizers with more flexible competition management tools.

[0120] The method for constructing a VPN-based CTF flag grabbing competition provided by the embodiments of the present disclosure constructs a VPN-based network architecture. Online players connect to the team VPN router through the Internet VPN, and offline players connect to the local virtual machine through the hub physical access method, so that contestants can seamlessly access the competition in different network environments. At the same time, the system forwards the competition question service to the public network through the team VPN router and port forwarding mechanism to ensure that each team can access the competition resources in isolation and security. Each team is configured with Linux and Windows virtual machines to deal with different types of competition questions, which improves the flexibility of the competition environment. This method not only improves the flexibility and adaptability of the CTF competition, supports mixed online and offline competitions, but also improves the security and fairness of the competition.

[0121] The electronic device 200 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 200 may include, but is not limited to, a processor 201 and a memory 202. Those skilled in the art will appreciate that Figure 2 It is only an example of the electronic device 200 and does not constitute a limitation of the electronic device 200. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0122] The processor 201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0123] The memory 202 may be an internal storage unit of the electronic device 200, for example, a hard disk or memory of the electronic device 200. The memory 202 may also be an external storage device of the electronic device 200, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 200. Further, the memory 202 may also include both an internal storage unit of the electronic device 200 and an external storage device. The memory 202 is used to store the computer program 203 and other programs and data required by the electronic device. The memory 202 may also be used to temporarily store data that has been output or is to be output.

[0124] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0126] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0127] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0128] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.

Claims

1. A method for constructing a CTF flag grabbing game based on VPN, characterized in that: include: A VPN exit router is set in a competition network, wherein the competition network includes a competition question server, and the competition question server stores competition questions of various question types; A team VPN router is set in each team's subnet, and the team VPN router is connected to the VPN egress router to connect each team's subnet to the competition network; A virtual machine is set in the subnet of each team, and the virtual machine of each team corresponds to at least one contestant, and the virtual machine is connected to the team VPN router.

2. The method according to claim 1, characterized in that The virtual machines include at least one Linux virtual machine and at least one Windows virtual machine.

3. The method according to claim 2, characterized in that The Linux virtual machine and the Windows virtual machine include a first mode and a second mode. The first mode is used for the contestants of each team to access through a hub mode, and the second mode is used for each team to access through a VPN.

4. The method according to claim 3, characterized in that The Linux virtual machine is used to receive pwn questions and reverse engineering questions, and the Windows virtual machine is used to receive web questions.

5. The method according to claim 1, characterized in that The team VPN router connects the virtual machine of the corresponding team to the competition network through port forwarding.

6. The method according to claim 1, characterized in that The team VPN router forwards the competition questions from the competition question server to the subnet where the contestants are located by port forwarding.

7. The method according to claim 1, characterized in that The number of types of the competition questions is greater than the number of the teams, and each team accesses different competition questions in the competition question server through its corresponding team VPN router.

8. An electronic device, characterized in that: include: one or more processors; A storage unit is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors can implement the method for constructing a VPN-based CTF flag-grabbing competition according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a VPN-based CTF capture-the-flag game according to any one of claims 1 to 7 can be implemented.

Citation Information

Cited By

  • CTF question type detection and analysis method and device and medium

    CN120974326A