Attack and defense methods and devices in network security competitions

The server receives and executes attack scripts and mirrors the match environment of each user for independent offense and defense, solving the problem of unfair offense and defense in the existing technology and achieving fairness and independence of network security matches.

CN115277091BActive Publication Date: 2025-03-25QI AN XIN TECHNOLOGY GROUP INC +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210724160.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-03-25
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

The offensive and defensive methods in existing cybersecurity competitions lead to unfair attack and defense among participating teams. Once a strong team captures the system environment of the target team, they may perform malicious operations, affecting the attacks of other teams.

Method used

Receive user's attack script submission request through the server, obtain the attack script, and mirror each user's question environment. The attack script attacks the mirror environment based on the attack script, thereby achieving independent attack and defense against each user and preventing malicious operations.

Benefits of technology

It realizes the fairness of offense and defense in network security competitions, prevents strong teams from maliciously operating weak teams, and ensures the independence and fair competition of each team.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115277091B_ABST
    Figure CN115277091B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an attack and defense method and device in a network security competition, which relates to the field of network security technology, wherein the method includes: obtaining a first attack script based on a first script submission request; the first attack script is an attack script determined by the first user based on a competition question environment; mirroring the competition question environment of each second user to obtain a competition question mirror environment corresponding to each second user; for each competition question mirror environment corresponding to the second user, attacking the competition question mirror environment corresponding to the second user based on the first attack script to obtain a first attack result. The present invention realizes the attack and defense of a network security competition between multiple parties through the participation of a server. On this basis, the server attacks the competition question mirror environment of each second user obtained by mirroring based on the first attack script of the first user, and does not directly attack the competition question environment of the second user, which can prevent the competition question environment of the second user from being maliciously operated, and reflects the fairness of the attack and defense of the network security competition.
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 an attack and defense method and device in a network security competition. Background Art

[0002] Capture the Flag (CTF) originated from the 1996 DEFCON geek conference and is a competitive game among network security enthusiasts. Jeopardy is commonly seen in online selection competitions. In the CTF competition system, participating teams can participate through the Internet or on-site network. Participating teams obtain corresponding points by interacting with the online environment or analyzing files offline, solving network security technical challenges, and finally ranking according to the total score and time.

[0003] In the prior art, the attack and defense methods in mainstream network security competitions are as follows: all participating teams have the same system environment, each participating team exploits system environment vulnerabilities and directly attacks the opponent's system environment to obtain flags to score points; in addition, participating teams can also patch their own service vulnerabilities for defense to avoid deductions.

[0004] However, in the above-mentioned prior art, the participating teams directly engage in offensive and defensive competitions with each other. In this way, once a participating team with stronger offensive and defensive capabilities has captured the system environment of a target participating team, it may perform malicious operations on the system environment of the target participating team, such as malicious deletion, backdoors, and blocking connections, etc., resulting in other participating teams being unable to launch attacks on the target participating team, thereby causing unfairness in offense and defense. Summary of the invention

[0005] In view of the problems in the prior art, an embodiment of the present invention provides an attack and defense method and device in a network security competition.

[0006] Specifically, the embodiment of the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides an attack and defense method in a network security competition, which is applied to a server and includes:

[0008] Receiving a first script submission request sent by a terminal corresponding to a first user;

[0009] Obtaining a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on the competition environment;

[0010] Mirroring the competition environment of each second user to obtain the competition mirror environment corresponding to each second user;

[0011] For each competition question mirror environment corresponding to the second user, the competition question mirror environment corresponding to the second user is attacked based on the first attack script to obtain a first attack result.

[0012] Further, the attacking the mirror environment of the competition question corresponding to the second user based on the first attack script to obtain a first attack result includes:

[0013] Attacking the game mirror environment corresponding to the second user based on the first attack script to obtain target data obtained by the attack;

[0014] Determine whether the target data matches preset data; the preset data is data stored in the competition mirror environment corresponding to the second user;

[0015] When it is determined that the target data matches the preset data, determining that the first attack result is a successful attack;

[0016] When it is determined that the target data does not match the preset data, the first attack result is determined to be an attack failure.

[0017] Further, the attacking the mirror environment of the competition question corresponding to the second user based on the first attack script includes:

[0018] Create a script execution environment;

[0019] Running the first attack script based on the script running environment;

[0020] Attack the competition mirror environment corresponding to the second user based on the running of the first attack script.

[0021] Further, the running the first attack script based on the script running environment includes:

[0022] Determine whether the competition mirror environment corresponding to the second user can run the target service normally;

[0023] When it is determined that the competition mirror environment corresponding to the second user can normally run the target service, the first attack script is run based on the script running environment.

[0024] Furthermore, the first script submission request carries an identifier of a terminal corresponding to the first user;

[0025] The step of obtaining a first attack script based on the first script submission request includes:

[0026] The first attack script is obtained in a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the attack script; the attack script is obtained by the cloud database from a first preset directory of an operating machine corresponding to each user.

[0027] Furthermore, the method further comprises:

[0028] Receiving a second script submission request sent by a terminal corresponding to the first user;

[0029] Submitting a request to obtain a patch script based on the second script; the patch script is a patch script determined by the first user based on the competition environment;

[0030] Access the competition environment of the first user, run the patch script in the competition environment of the first user, and obtain a new competition environment of the first user.

[0031] Furthermore, after accessing the first user's competition environment, running the patch script in the first user's competition environment, and obtaining the first user's new competition environment, the method further includes:

[0032] An environmental service result is determined based on the new competition question environment corresponding to the first user.

[0033] Furthermore, the determining of the environmental service result based on the new competition question environment corresponding to the first user includes:

[0034] Determine whether the new competition environment corresponding to the first user can run the target service normally;

[0035] When it is determined that the new competition environment corresponding to the first user can normally operate the target service, determining that the environment service result is a normal service;

[0036] When it is determined that the new competition question environment corresponding to the first user cannot normally operate the target service, the environmental service result is determined to be a service abnormality.

[0037] Furthermore, after accessing the first user's competition environment, running the patch script in the first user's competition environment, and obtaining the first user's new competition environment, the method further includes:

[0038] Upon receiving a third script submission request sent by a terminal corresponding to the second user, obtaining a second attack script based on the third script submission request;

[0039] Mirroring the new competition environment of the first user to obtain a new competition mirror environment corresponding to the first user;

[0040] The new competition question mirror environment of the first user is attacked based on the second attack script to obtain a second attack result.

[0041] Furthermore, the second script submission request carries an identifier of a terminal corresponding to the first user;

[0042] The step of submitting a request to obtain a patch script based on the second script includes:

[0043] The patch script is obtained from a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the patch script; the patch script is obtained by the cloud database from a second preset directory of an operating machine corresponding to each user.

[0044] Furthermore, the method further comprises:

[0045] Determine an attack and defense score of the first user and an attack and defense score of the second user based on the first attack result of the first user and the second attack result of the second user;

[0046] determining a service score for the first user and a service score for each of the second users based on the environmental service result of the first user and the environmental service result of each of the second users;

[0047] determining a total game score of the first user based on the attack and defense score of the first user and the service score of the first user;

[0048] determining a total game score of the second user based on the attack and defense score of the second user and the service score of the second user;

[0049] The total game score of the first user and the total game score of each of the second users are sorted and stored and / or displayed.

[0050] Further, determining the attack and defense score of the first user and the attack and defense score of the second user based on the first attack result of the first user and the second attack result of the second user includes:

[0051] When the first attack result is a successful attack, the attack and defense score of the first user is increased by a preset attack and defense score, and the attack and defense score of the second user is deducted by the preset attack and defense score;

[0052] When the first attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged;

[0053] When the second attack result is a successful attack, the preset attack and defense score is deducted from the attack and defense score of the first user, and the preset attack and defense score is increased from the attack and defense score of the second user;

[0054] When the second attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged.

[0055] Further, the determining the service score of the first user and the service score of each of the second users based on the environmental service result of the first user and the environmental service result of each of the second users includes:

[0056] Determining a target user whose environmental service result is a successful service from the environmental service result of the first user and the environmental service results of each of the second users;

[0057] The service scores of other users except the target user are deducted from the first preset service score; the first preset service score is the average of the preset service total score and the number of other users;

[0058] The service score of the target user is increased by a second preset service score; the second preset service score is the average of the preset service total score and the number of target users.

[0059] Furthermore, the current competition mirror environment corresponding to each user is stored in the public mirror area.

[0060] Furthermore, after storing the current game mirror environment corresponding to each user in the public mirror area, the method further includes:

[0061] Receiving a reporting request sent by a terminal corresponding to the reporting user; the reporting request carries evidence information of the reported user;

[0062] Determine whether the current competition mirror environment corresponding to the reported user is legal based on the evidence information of the reported user;

[0063] When it is determined that the current game mirror environment corresponding to the reported user is illegal, the attack and defense score of the reporting user and the attack and defense score of the reported user are updated.

[0064] Further, updating the attack and defense score of the reporting user and the attack and defense score of the reported user includes:

[0065] Adding preset reporting points to the attack and defense score of the reporting user;

[0066] The preset reporting points are deducted from the attack and defense score of the reported user.

[0067] In a second aspect, an embodiment of the present invention further provides an attack and defense method in a network security competition, which is applied to a terminal and includes:

[0068] Determine a first attack script of a first user based on the competition environment;

[0069] A first script submission request is sent to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0070] Further, sending a first script submission request to a server based on the first attack script includes:

[0071] Based on the first attack script, an initial competition environment or a target competition environment is tested to obtain a test result; the initial competition environment is a competition environment without running the patch script; the target competition environment is a competition environment after running the patch script;

[0072] When it is determined that the test result is a success, the first script submission request is sent to the server based on the first attack script.

[0073] Furthermore, before determining the first attack script based on the competition environment, the method further includes:

[0074] The competition environment is obtained through an operating machine corresponding to a first user; the operating machine corresponding to the first user does not allow any device other than the server and a terminal corresponding to the first user to access it.

[0075] Furthermore, before sending the first script submission request to the server based on the first attack script, the method further includes:

[0076] The first attack script is stored in a first preset directory of an operating machine corresponding to the first user.

[0077] Furthermore, the method further comprises:

[0078] Determine a patch script for the first user based on the competition environment;

[0079] A second script submission request is sent to the server based on the patch script; the second script submission request is used to instruct the server to obtain the patch script and run the patch script in the competition environment of the first user to obtain a new competition environment of the first user.

[0080] Furthermore, the method further comprises:

[0081] When it is determined that the environmental service result is a service abnormality based on the new competition environment of the first user, the new competition environment of the first user is restored to the competition environment that was in a normal state last time, or the new competition environment of the first user is restored to the initial competition environment, and the preset number of restorations is reduced by one; the preset number of restorations is the number of times the first user is allowed to restore the competition environment.

[0082] Furthermore, before sending a second script submission request to the server based on the patch script, the method further includes:

[0083] The patch script is stored in a second preset directory of the operating machine corresponding to the first user.

[0084] Furthermore, the method further comprises:

[0085] Obtain the current competition mirror environment corresponding to each second user from the public mirror area;

[0086] When determining that there is an abnormal current competition question mirror environment, determining the second user corresponding to the abnormal current competition question mirror environment as the reported user;

[0087] Sending a report request to the server; the report request carries the evidence information of the reported user.

[0088] In a third aspect, an embodiment of the present invention further provides an attack and defense device in a network security competition, including:

[0089] A first receiving unit, configured to receive a first script submission request sent by a terminal corresponding to a first user;

[0090] A first acquisition unit is configured to acquire a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on a competition environment;

[0091] A first mirroring unit is used to mirror the competition environment of each second user to obtain a competition mirror environment corresponding to each second user;

[0092] The attack unit is used to attack the competition mirror environment corresponding to each second user based on the first attack script to obtain a first attack result.

[0093] In a fourth aspect, an embodiment of the present invention further provides an attack and defense device in a network security competition, comprising:

[0094] A first determining unit, configured to determine a first attack script of a first user based on a competition question environment;

[0095] The first sending unit is used to send a first script submission request to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0096] In a fifth aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the attack and defense method in the network security competition as described in the first aspect are implemented, or the steps of the attack and defense method in the network security competition as described in the second aspect are implemented.

[0097] In a sixth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the attack and defense method in the network security competition as described in the first aspect, or implements the steps of the attack and defense method in the network security competition as described in the second aspect.

[0098] In the seventh aspect, an embodiment of the present invention further provides a computer program product having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the steps of the attack and defense method in the network security competition as described in the first aspect, or implement the steps of the attack and defense method in the network security competition as described in the second aspect.

[0099] In the attack and defense method and device in the network security competition provided by the embodiment of the present invention, the server obtains the first attack script of the first user based on the received first script submission request, then mirrors the competition environment of each second user, and finally attacks the competition mirror environment corresponding to each second user based on the first attack script. It can be seen that the present invention realizes the attack and defense in the network security competition between multiple parties through the participation of the server. On this basis, the server attacks the competition mirror environment of each second user obtained by mirroring based on the first attack script of the first user, and does not directly attack the competition environment of the second user, which can prevent the competition environment of the second user from being maliciously operated, reflecting the fairness of the attack and defense in the network security competition. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0101] Figure 1 This is one of the flow charts of the attack and defense method in the network security competition provided by the embodiment of the present invention;

[0102] Figure 2 This is a second flow chart of the attack and defense method in a network security competition provided by an embodiment of the present invention;

[0103] Figure 3 This is a third flow chart of the attack and defense method in a network security competition provided by an embodiment of the present invention;

[0104] Figure 4 This is a fourth flow chart of the attack and defense method in a network security competition provided by an embodiment of the present invention;

[0105] Figure 5 This is a fifth flow chart of the attack and defense method in a network security competition provided by an embodiment of the present invention;

[0106] Figure 6 This is the sixth flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention;

[0107] Figure 7 This is the seventh flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention;

[0108] Figure 8 This is the eighth flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention;

[0109] Fig. 9 This is a ninth flow chart of the attack and defense method in a network security competition provided by an embodiment of the present invention;

[0110] Fig.10 It is a schematic diagram of the structure of an attack and defense system in a network security competition provided by an embodiment of the present invention;

[0111] Fig.11 This is one of the structural schematic diagrams of the attack and defense device in the network security competition provided by the embodiment of the present invention;

[0112] Fig.12 This is the second structural schematic diagram of the attack and defense device in the network security competition provided by the embodiment of the present invention;

[0113] Fig.13 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0114] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0115] Figure 1 It is one of the flow charts of the attack and defense method in the network security competition provided by the embodiment of the present invention, which is applied to a server, and the server can be a referee server, such as Figure 1 As shown, the attack and defense method in the network security competition includes the following steps:

[0116] Step 101: Receive a first script submission request sent by a terminal corresponding to a first user.

[0117] For example, when conducting an attack and defense competition in a network security competition, each player (user) of each participating team can log in to the competition platform on his or her own terminal, obtain the Internet Protocol (IP) address of the competition environment and part or all of the code corresponding to the competition environment in the team resource area of ​​the competition platform; access the corresponding competition environment based on the IP address of the competition environment, explore the vulnerabilities of the competition environment, and write a corresponding attack script based on the explored vulnerabilities. When the attack script exp is written, the attack script is packaged into a compressed package in a format such as zip to obtain the exp.zip compressed package, and click the "Submit exp" control on the relevant interface of the competition platform, where exp represents the attack script; in this way, the terminal corresponding to each user sends a first script submission request to the server, so that the server receives the first script submission request sent by the terminal corresponding to each user; here, the first user is used to represent any user in each participating team.

[0118] Step 102: Obtain a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on the competition environment.

[0119] The competition environment can be deployed in a container or a virtual machine.

[0120] For example, when the first script submission request carries the first attack script, the server directly obtains the first attack script; when the first script submission request carries the identification of the operating machine and the first preset directory, the server determines the corresponding operating machine based on the identification of the operating machine, and obtains the first attack script from the corresponding operating machine based on the first preset directory; when the first script submission request carries the identification of the terminal corresponding to the first user, the server obtains the corresponding first attack script in the cloud database based on the identification of the terminal corresponding to the first user.

[0121] Step 103: mirror the competition environment of each second user to obtain the competition mirror environment corresponding to each second user.

[0122] For example, when the server obtains the first attack script of the first user, it mirrors the competition environment of each second user participating in this round. Mirroring can be understood as copying, and the competition mirror environment corresponding to each second user is obtained. The competition mirror environment is the same as the corresponding competition environment.

[0123] Step 104: for each game question mirror environment corresponding to the second user, attack the game question mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0124] For example, when the server obtains the competition question mirror environment corresponding to each second user participating in this round, it can attack the competition question mirror environment corresponding to each second user based on the first attack script, and determine the first attack result for each second user based on whether the correct flag is obtained; wherein the flag can be a complex string stored in the competition question mirror environment.

[0125] It should be noted that since the attack traffic includes the attack scripts for attack and defense between each player, in order to allow each player (user) to analyze the attack traffic and then adjust his or her own attack script or patch script without making a large number of references to the attack scripts of other players, the present invention can provide the attack traffic for players to analyze under certain restrictions. For example: in the first half, players are not allowed to apply for attack traffic on the competition platform, and in the second half, players are allowed to apply for attack traffic on the competition platform. The specific number of applications can be set based on the needs of the competition, for example, only one application is allowed.

[0126] In the attack and defense method in the network security competition provided by the embodiment of the present invention, the server obtains the first attack script of the first user based on the received first script submission request, then mirrors the competition environment of each second user, and finally attacks the competition mirror environment corresponding to each second user based on the first attack script. It can be seen that the present invention realizes the attack and defense in the network security competition between multiple parties through the participation of the server. On this basis, the server attacks the competition mirror environment of each second user obtained by mirroring based on the first attack script of the first user, and does not directly attack the competition environment of the second user, which can prevent the competition environment of the second user from being maliciously operated, reflecting the fairness of the attack and defense in the network security competition.

[0127] Optionally, Figure 2 FIG. 2 is a flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention. Figure 2 As shown, the above step 104 can be specifically implemented by the following steps:

[0128] Step 1041: attack the game mirror environment corresponding to the second user based on the first attack script to obtain target data obtained by the attack.

[0129] For example, for each competition mirror environment corresponding to the second user, the server attacks the competition mirror environment corresponding to the second user based on the first attack script of the first user, and obtains the target data obtained by the attack.

[0130] Step 1042: Determine whether the target data matches preset data; the preset data is data stored in the competition mirror environment corresponding to the second user.

[0131] For example, the server matches the target data obtained based on the attack with the preset data stored in the game question mirror environment corresponding to the second user.

[0132] Step 1043: When it is determined that the target data matches the preset data, determine that the first attack result is a successful attack.

[0133] For example, when it is determined that the target data obtained by the attack matches (is the same as) the preset data stored in the competition question mirror environment corresponding to the second user, it means that the first attack script of the first user successfully enters the competition question mirror environment corresponding to the second user and obtains the preset data stored in the competition question mirror environment corresponding to the second user. At this time, it is determined that the first attack result is a successful attack.

[0134] Step 1044: When it is determined that the target data does not match the preset data, determine that the first attack result is an attack failure.

[0135] For example, when it is determined that the target data obtained by the attack does not match (is not the same as) the preset data stored in the competition mirror environment corresponding to the second user, it means that the first attack script of the first user did not successfully enter the competition mirror environment corresponding to the second user. At this time, the first attack result is determined to be an attack failure.

[0136] It should be noted that when the server attacks the competition mirror environment corresponding to the second user based on the first attack script, it can also determine the first attack result based on the preset attack time. When it is determined that the attack time of the first attack script attacking the competition mirror environment corresponding to the second user is greater than the preset attack time, the first attack result is determined to be an attack failure; when it is determined that the attack time of the first attack script attacking the competition mirror environment corresponding to the second user is less than or equal to the preset attack time, the first attack result is determined to be an attack success.

[0137] The attack and defense method in a network security competition provided by an embodiment of the present invention determines whether the first user's attack is successful based on whether the target data obtained by the attack matches the preset data, wherein the preset data is the data stored in the competition mirror environment corresponding to the second user. Matching the target data obtained by the attack with the preset data can improve the accuracy of the attack result judgment.

[0138] Optionally, the above-mentioned attack on the mirror environment of the competition question corresponding to the second user based on the first attack script can be specifically implemented in the following ways:

[0139] Create a script running environment; run the first attack script based on the script running environment; and attack the competition mirror environment corresponding to the second user based on the running first attack script.

[0140] The script running environment is an operating system deployed in a container or a virtual machine, which is used to run attack scripts and patch scripts.

[0141] For example, when the server obtains the first attack script of the first user, it can first create a script running environment for running the attack script, and mirror the competition environment of each second user, completely simulating the competition environment of each second user, and obtaining the competition mirror environment of each second user; then run the first attack script through the script running environment, and attack the competition mirror environment corresponding to the second user based on the running first attack script.

[0142] In the attack and defense method in a network security competition provided by an embodiment of the present invention, the server runs a first attack script through a created script running environment, and then attacks the competition question mirror environment corresponding to the second user based on the running first attack script, thereby realizing the feasibility of attacking the competition question mirror environment corresponding to the second user.

[0143] Optionally, the above-mentioned running of the first attack script based on the script running environment can be specifically implemented in the following manner:

[0144] Determine whether the competition mirror environment corresponding to the second user can normally run the target service; when it is determined that the competition mirror environment corresponding to the second user can normally run the target service, run the first attack script based on the script running environment.

[0145] The target service may be any one service or multiple services supported by the competition environment; for example, the target service may be a service for making a phone call and a service for connecting to a wireless network, etc., which are supported by the competition environment.

[0146] For example, before the server runs the first attack script based on the script running environment, it needs to determine whether the competition mirror environment corresponding to the second user can normally operate the target service. When it is determined that the competition mirror environment corresponding to the second user can normally operate the target service, it means that the status of the competition mirror environment corresponding to the second user before the attack is normal. At this time, the first attack script can be run based on the script running environment, and the competition mirror environment corresponding to the second user can be attacked based on the running first attack script; when it is determined that the competition mirror environment corresponding to the second user cannot normally operate the target service, it means that the status of the competition mirror environment corresponding to the second user before the attack is abnormal, which may be caused by reasons such as patch failure. In order to reflect fair competition in offense and defense in network security competitions, there is no need to run the first attack script based on the script running environment at this time, and the competition mirror environment corresponding to the second user will not be attacked.

[0147] The attack and defense method in a network security competition provided by an embodiment of the present invention first verifies whether the competition mirror environment corresponding to the second user can run the target service before running the first attack script based on the script running environment. Only when the competition mirror environment corresponding to the second user can run the target service, the first attack script is run based on the script running environment, and then the competition mirror environment corresponding to the second user is attacked. In this way, when the competition mirror environment corresponding to the second user has a service abnormality caused by patching or the like, the attack failure caused by attacking the competition mirror environment corresponding to the second user can be avoided, thereby further improving the fairness of attack and defense in the network security competition.

[0148] Optionally, the first script submission request carries an identifier of a terminal corresponding to the first user; the above step 102 may be implemented in the following manner:

[0149] The first attack script is obtained in a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the attack script; the attack script is obtained by the cloud database from a first preset directory of an operating machine corresponding to each user.

[0150] For example, when the first user has written the first attack script, the first attack script can be uploaded to the first preset directory of the operating machine assigned to the first user. In this way, the cloud database can obtain the first attack script of the first user in the first preset directory of the operating machine corresponding to the first user based on the correspondence between the terminal identifier, the operating machine identifier and the preset directory, and store the first attack script of the first user and the identifier of the terminal corresponding to the first user in correspondence; when the identifier of the terminal corresponding to the first user is carried in the first script submission request, the server can obtain the first attack script of the first user in the cloud database based on the identifier of the terminal corresponding to the first user.

[0151] It should be noted that, in order to facilitate the distinction of each user's exp.zip compressed package, the exp.zip compressed package can be synchronized to the host machine where the competition environment is located, and the host machine will change the name of the exp.zip compressed package submitted by the user according to the agreed naming method, and upload the renamed exp.zip compressed package to the cloud database, so that the cloud database can distinguish each user's exp.zip compressed package; the naming of the patch.zip compressed package can be changed in the same way, and the present invention will not be repeated here.

[0152] In the attack and defense method in a network security competition provided by an embodiment of the present invention, when the server receives a first script submission request, it obtains the corresponding first attack script from the cloud database, thereby realizing unified management of all attack scripts.

[0153] Optionally, Figure 3 FIG. 3 is a flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention. Figure 3 As shown, the attack and defense method in the network security competition also includes the following steps:

[0154] Step 105: Receive a second script submission request sent by a terminal corresponding to the first user.

[0155] For example, when conducting a network security attack and defense competition, each player (user) of each participating team can also explore vulnerabilities in the competition environment and write corresponding patch scripts based on the explored vulnerabilities. When the patch script is written, the attack script is packaged into a compressed package in a format such as zip to obtain a patch.zip compressed package, and the "Submit patch" control is clicked on the relevant interface of the competition platform, where patch represents the patch script; in this way, the terminal corresponding to each user sends a second script submission request to the server, so that the server receives the second script submission request sent by the terminal corresponding to each user; the first user is used here to represent any user in each participating team.

[0156] It should be noted that the number of patching times can be set for each game. When a user submits a patch script, the number of patching times is automatically reduced by 1. The specific number of patching times can be set based on the needs of the game, and the present invention does not limit this.

[0157] Step 106: Obtain a patch script based on the second script submission request; the patch script is a patch script determined by the first user based on the competition environment.

[0158] For example, when the second script submission request carries a patch script, the server directly obtains the patch script; when the second script submission request carries the identifier of the operating machine and the second preset directory, the server determines the corresponding operating machine based on the identifier of the operating machine, and obtains the patch script from the corresponding operating machine based on the second preset directory; when the second script submission request carries the identifier of the terminal corresponding to the first user, the server obtains the corresponding patch script in the cloud database based on the identifier of the terminal corresponding to the first user.

[0159] Step 107: Access the competition environment of the first user, run the patch script in the competition environment of the first user, and obtain a new competition environment of the first user.

[0160] For example, when the server obtains the patch script of the first user, it directly accesses the competition environment of the first user, runs the patch script in the competition environment of the first user, and obtains the new competition environment of the first user.

[0161] It should be noted that the present invention does not limit the execution order of the above steps 105 to 107 and the above steps 101 to 104, and the specific order can be set based on demand.

[0162] In the attack and defense method in a network security competition provided by an embodiment of the present invention, the server obtains the patch script of the first user based on the received second script submission request, then accesses the competition environment of the first user, runs the patch script in the competition environment of the first user, obtains the new competition environment of the first user, and realizes the first user patching his own competition environment.

[0163] Optionally, Figure 4 FIG. 4 is a flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention. Figure 4 As shown, after the above step 107, the attack and defense method in the network security competition further includes the following steps:

[0164] Step 108: Determine an environmental service result based on the new competition question environment corresponding to the first user.

[0165] Specifically, it is determined whether the new competition question environment corresponding to the first user can normally operate the target service; when it is determined that the new competition question environment corresponding to the first user can normally operate the target service, the environment service result is determined to be a normal service; when it is determined that the new competition question environment corresponding to the first user cannot normally operate the target service, the environment service result is determined to be an abnormal service.

[0166] For example, when the new competition environment of the first user is obtained, a pre-configured check script can be executed. By executing the check script, it is determined whether the new competition environment corresponding to the first user can normally operate the target service. When it is determined that the new competition environment corresponding to the first user can normally operate the target service, it means that the service is normal after the first user patches its own competition environment based on the patch script. At this time, the environment service result is determined to be normal service; when it is determined that the new competition environment corresponding to the first user cannot normally operate the target service, it means that the service is abnormal after the first user patches its own competition environment based on the patch script. At this time, the environment service result is determined to be abnormal service.

[0167] The attack and defense method in the network security competition provided by the embodiment of the present invention determines whether the first user's service is normal based on whether the new competition environment corresponding to the first user can normally operate the target service, thereby improving the accuracy of the total score judgment of the competition.

[0168] Optionally, Figure 5 FIG. 5 is a flowchart of an attack and defense method in a network security competition provided by an embodiment of the present invention. Figure 5 As shown, after the above step 107, the attack and defense method in the network security competition further includes the following steps:

[0169] Step 109: upon receiving a third script submission request sent by a terminal corresponding to the second user, obtaining a second attack script based on the third script submission request.

[0170] For example, when the server receives a third script submission request sent by the terminal corresponding to the second user, the server can obtain the second attack script of the second user based on the third script submission request, wherein the method of obtaining the second attack script of the second user based on the third script submission request is similar to the method of obtaining the first attack script of the first user based on the first script submission request, and the present invention will not be repeated here.

[0171] Step 110: Mirror the new competition environment of the first user to obtain the new competition mirror environment corresponding to the first user.

[0172] For example, when the server obtains the second attack script of each second user, it mirrors the new competition question environment of the first user to obtain the new competition question mirror environment corresponding to the first user.

[0173] Step 111: attack the new competition question mirror environment of the first user based on the second attack script to obtain a second attack result.

[0174] For example, when the server obtains the new competition question mirror environment corresponding to the first user, it runs each second attack script based on the script running environment, attacks the new competition question mirror environment of the first user based on each run second attack script, and determines the second attack result of each second user on the first user based on whether the correct flag is obtained.

[0175] In the attack and defense method in a network security competition provided by an embodiment of the present invention, when the server receives a third script submission request sent by a terminal corresponding to the second user, the server obtains the second attack script of the second user based on the third script submission request, and attacks the mirror image of the first user based on the second attack script, so as to ensure that the attack object is always the latest new question mirror environment, further reflecting the fair competition of attack and defense in the network security competition.

[0176] Optionally, the second script submission request carries an identifier of a terminal corresponding to the first user; the above step 106 may be implemented in the following manner:

[0177] The patch script is obtained from a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the patch script; the patch script is obtained by the cloud database from a second preset directory of an operating machine corresponding to each user.

[0178] For example, when the first user has written a patch script, the patch script can be uploaded to the second preset directory of the operating machine assigned to the first user. In this way, the cloud database can obtain the patch script of the first user in the second preset directory of the operating machine corresponding to the first user based on the correspondence between the terminal identifier, the operating machine identifier and the preset directory, and store the patch script of the first user and the identifier of the terminal corresponding to the first user in correspondence; when the identifier of the terminal corresponding to the first user is carried in the second script submission request, the server can obtain the patch script of the first user in the cloud database based on the identifier of the terminal corresponding to the first user.

[0179] It should be noted that when uploading the attack script and patch script of each user to the cloud database, each user can also download the attack script and patch script submitted in the past from the cloud database, and the present invention does not limit this.

[0180] In the attack and defense method in the network security competition provided by the embodiment of the present invention, when the server receives the second script submission request, it obtains the corresponding patch script from the cloud database, thereby realizing the unified management of all patch scripts.

[0181] Optionally, Figure 6 FIG. 6 is a flow chart of the attack and defense method in the network security competition provided by the embodiment of the present invention. Figure 6 As shown, after each round, the attack and defense method in the network security competition also includes the following steps:

[0182] Step 112: Determine an attack and defense score of the first user and an attack and defense score of the second user based on the first attack result of the first user and the second attack result of the second user.

[0183] For example, when the first attack result is a successful attack, the attack and defense score of the first user is increased by a preset attack and defense score, and the attack and defense score of the second user is deducted by the preset attack and defense score;

[0184] When the first attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged;

[0185] When the second attack result is a successful attack, the preset attack and defense score is deducted from the attack and defense score of the first user, and the preset attack and defense score is increased from the attack and defense score of the second user;

[0186] When the second attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged.

[0187] For example, there are four users participating in the competition, namely user 1, user 2, user 3 and user 4. If user 1's attack on user 2 is successful, user 1's attack on user 3 is unsuccessful, user 1's attack on user 4 is successful, and user 2's attack on user 1 is successful, and the preset attack and defense score is 100 points, then user 1's attack and defense score will increase by 100 points + 100 points - 100 points = 100 points.

[0188] Step 113: Determine a service score for the first user and a service score for each of the second users based on the environmental service result of the first user and the environmental service result of each of the second users.

[0189] For example, determining a target user whose environmental service result is a successful service from the environmental service result of the first user and the environmental service result of each of the second users;

[0190] The service scores of other users except the target user are deducted from the first preset service score; the first preset service score is the average of the preset service total score and the number of other users;

[0191] The service score of the target user is increased by a second preset service score; the second preset service score is the average of the preset service total score and the number of target users.

[0192] For example, there are four users participating in the competition, namely User 1, User 2, User 3 and User 4. If the environmental service results corresponding to User 1 and User 2 are both successful services, and the environmental service results corresponding to User 3 and User 4 are both abnormal services, assuming that the preset total service score is 400 points, then the service scores of User 1 and User 2 will both increase by 200 points, and the service scores of User 3 and User 4 will both deduct 200 points.

[0193] Step 114: Determine the total game score of the first user based on the attack and defense score of the first user and the service score of the first user.

[0194] For example, the first user's attack and defense score and the first user's service score are added together to obtain the first user's total game score.

[0195] Step 115: Determine the total game score of the second user based on the attack and defense score of the second user and the service score of the second user.

[0196] For example, the second user's attack and defense score and the second user's service score are added together to obtain the second user's total game score.

[0197] Step 116: sort the total game score of the first user and the total game score of each of the second users, and then store and / or display them.

[0198] For example, when the total score of each user in the round is obtained, the total score of each user in the round can be sorted and stored in the cloud database, or the total score of each user in the round can be sorted and displayed on a display screen or voice broadcast, so that each participating user can adjust the attack script and patch script of the next round based on the total score; the specific sorting method can be sorting from large to small according to the total score, or sorting from small to large according to the total score.

[0199] It should be noted that after each round, the server can also determine the total score of each user based on the attack results and environmental service results of each user, as well as the preset scoring rules; wherein the preset scoring rules can be set based on actual needs, and the present invention does not limit this.

[0200] The attack and defense method in the network security competition provided by the embodiment of the present invention can store or display the total score of each user after each round, so that the user can check the total score to adjust the attack script and patch script of the next round.

[0201] Optionally, the attack and defense method in the network security competition further includes the following steps:

[0202] The current competition mirror environment corresponding to each user is stored in the public mirror area.

[0203] Among them, all teams can apply in the public mirror area to mirror the current competition questions of other teams to the team resource area.

[0204] For example, at the end of each round, the server may store the current game mirror environment corresponding to each user in the public mirror area.

[0205] The attack and defense method in the network security competition provided by the embodiment of the present invention stores the current competition question mirror environment corresponding to each user in the public mirror area at the end of each round, thereby realizing the unified management of the current competition question mirror environment corresponding to each user and facilitating users to access the current competition question mirror environment corresponding to other users.

[0206] Furthermore, the attack and defense method in the network security competition also includes the following steps:

[0207] Receive a reporting request sent by a terminal corresponding to the reporting user; the reporting request carries evidence information of the reported user; determine whether the current competition mirror environment corresponding to the reported user is legal based on the evidence information of the reported user; when it is determined that the current competition mirror environment corresponding to the reported user is illegal, update the attack and defense score of the reporting user and the attack and defense score of the reported user.

[0208] For example, each participating user can apply to obtain the current competition mirror environment of other users from the public mirror area, and add the obtained current competition mirror environment of other users to the team resource area for analysis. If the reporting user believes that the current competition mirror environment of a certain user has deleted necessary functions or necessary services, etc., then the current competition mirror environment of the user is determined to be illegal. At this time, you can click the "Report" control on the competition platform and add illegal evidence information (necessary functions or necessary services have been deleted). In this way, the terminal corresponding to the user sends a reporting request carrying the evidence information of the reported user to the server, so that the server receives the reporting request sent by the terminal corresponding to the reporting user.

[0209] When the server receives a report request, it determines the legality of the current competition mirror environment of the reported user based on the evidence information of the reported user carried in the report request. If the current competition mirror environment of the reported user is determined to be illegal, the report is determined to be valid. At this time, the attack and defense scores of the reporting user and the reported user are updated, and the updated attack and defense scores are uploaded to the cloud database; if the current competition mirror environment of the reporting user is determined to be legal, the report is determined to be invalid, and a reminder message indicating that the report is invalid can be returned to the reporting user's terminal.

[0210] Specifically, updating the attack and defense scores of the reporting user and the reported user can be achieved in the following ways:

[0211] The preset reporting points are added to the attack and defense score of the reporting user; and the preset reporting points are deducted from the attack and defense score of the reported user.

[0212] The attack and defense method in the network security competition provided by the embodiment of the present invention can send a report request to the server when there is an objection to the attack and defense scores of other users, so that the server can determine the legitimacy of the current competition mirror environment corresponding to the reported user based on the evidence information of the reported user carried in the report request. When it is determined that the current competition mirror environment corresponding to the reported user is illegal, the attack and defense score of the reported user is updated, thereby further reflecting the fairness of the attack and defense in the network security competition.

[0213] Figure 7 FIG. 7 is a flowchart of an attack and defense method in a network security competition provided by an embodiment of the present invention, which is applied to a terminal, such as Figure 7 As shown, the attack and defense method in the network security competition includes the following steps:

[0214] Step 701: Determine a first attack script of a first user based on a competition environment.

[0215] For example, when conducting an offense and defense competition in a network security competition, each player (user) of each participating team can log in to the competition platform on his or her own terminal, obtain the IP address of the competition environment and part or all of the code corresponding to the competition environment in the team resource area of ​​the competition platform; access the corresponding competition environment based on the IP address of the competition environment, explore vulnerabilities in the competition environment, and write corresponding attack scripts based on the explored vulnerabilities; the first user is used here to represent any user in each participating team.

[0216] Step 702: Send a first script submission request to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0217] For example, when the first user has written the first attack script, he clicks the "Submit exp" control on the relevant interface of the competition platform, where exp represents the attack script; in this way, the terminal corresponding to the first user sends a first script submission request to the server, so that the server receives the first script submission request sent by the terminal corresponding to the first user.

[0218] It should be noted that each user participating in this round needs to write a corresponding first attack script based on the competition environment and send a first script submission request to the server, so that the server can obtain the first attack script of each user participating in this round. If each user participating in this round has only written the corresponding first attack script but has not written the corresponding patch script, then when the server obtains the first attack script of each user participating in this round, it means that the round between the teams is over, that is, the end of this round of competition; when the server obtains the first attack script corresponding to each user, it can attack the competition environment of each other participating user based on the first attack script corresponding to each user.

[0219] In the attack and defense method in the network security competition provided by the embodiment of the present invention, the terminal determines the first attack script of the first user based on the competition environment, and sends a first script submission request to the server based on the first attack script, so that when the server receives the first script submission request, it obtains the first attack script based on the first script submission request, and then mirrors the competition environment of each second user, and finally attacks the competition mirror environment corresponding to each second user based on the first attack script. It can be seen that the present invention realizes the attack and defense in the network security competition between multiple parties through the participation of the server. On this basis, the server attacks the competition mirror environment of each second user obtained by mirroring based on the first attack script of the first user, and does not directly attack the competition environment of the second user, which can prevent the competition environment of the second user from being maliciously operated, and reflects the fairness of the attack and defense in the network security competition.

[0220] Optionally, Figure 8 FIG. 8 is a flow chart of an attack and defense method in a network security competition provided by an embodiment of the present invention. Figure 8 As shown, the above step 702 can be specifically implemented by the following steps:

[0221] Step 7021: Test the initial competition environment or the target competition environment based on the first attack script to obtain a test result; the initial competition environment is the competition environment without running the patch script; the target competition environment is the competition environment after running the patch script.

[0222] For example, when the first user has written the first attack script, the first user may test the initial competition environment or the target competition environment based on the first attack script to obtain a test result.

[0223] Step 7022: When it is determined that the test result is a success, send the first script submission request to the server based on the first attack script.

[0224] For example, when the test result is determined to be a test success, it means that the first attack script can be successfully run in the competition question environment. At this time, a first script submission request is sent to the server based on the first attack script, ensuring that the server can successfully run the first attack script when obtaining the first attack script based on the first script submission request; when the test result is determined to be a test failure, it means that the first attack script cannot be successfully run in the competition question environment. At this time, the first user can rewrite a new first attack script, and then test the initial competition question environment or the target competition question environment based on the new first attack script. When the test result is a test success, a first script submission request is sent to the server based on the new first attack script, so that the server can obtain the first user's latest first attack script based on the first script submission request.

[0225] The attack and defense method in a network security competition provided by an embodiment of the present invention tests the first attack script through an initial competition question environment or a target competition question environment before sending a first script submission request to a server to determine whether the first attack script can run normally in the initial competition question environment or the target competition question environment. When it is determined that the first attack script can run normally in the initial competition question environment or the target competition question environment, a first script submission request is sent to the server to ensure that the server can run the first attack script normally.

[0226] Optionally, before step 701, the attack and defense method in the network security competition further includes the following steps:

[0227] The competition environment is obtained through an operating machine corresponding to a first user; the operating machine corresponding to the first user does not allow any device other than the server and a terminal corresponding to the first user to access it.

[0228] For example, the IP address and login information of the operating machine assigned to each team can also be obtained in the team resource area of ​​the competition platform. The user can log in to the corresponding operating machine based on the IP address and login information of the operating machine corresponding to his team, and then access the competition environment through the corresponding operating machine. Here, the first user is used to represent any user in each participating team, that is, the competition environment of the first user is obtained through the operating machine corresponding to the first user, and the operating machine corresponding to the first user does not allow users other than the first user to access, so that the competition environment between each team is isolated from each other.

[0229] It should be noted that, for each user's corresponding operating machine, no device other than the server and the terminal corresponding to the user is allowed to access it.

[0230] According to the attack and defense method in the network security competition provided by the embodiment of the present invention, each user's terminal can only obtain the competition environment through the corresponding operating machine, and cannot directly obtain the competition environment, thereby realizing the mutual isolation of each user's competition environment, avoiding users from maliciously operating each other's competition environment, thereby causing unfairness in the attack and defense in the network security competition.

[0231] Optionally, before step 702, the attack and defense method in the network security competition further includes the following steps:

[0232] The first attack script is stored in a first preset directory of an operating machine corresponding to the first user.

[0233] For example, when the first user has written the first attack script, the first attack script can be uploaded to the first preset directory of the operating machine assigned to the first user. In this way, the cloud database can obtain the first attack script of the first user in the first preset directory of the operating machine corresponding to the first user based on the correspondence between the terminal identification, the operating machine identification and the preset directory, and store the first attack script of the first user and the identification of the terminal corresponding to the first user in correspondence.

[0234] Optionally, Fig. 9 FIG. 9 is a flow chart of an attack and defense method in a network security competition provided by an embodiment of the present invention. Fig. 9 As shown, the attack and defense method in the network security competition also includes the following steps:

[0235] Step 703: Determine a patch script for the first user based on the competition environment.

[0236] For example, when conducting an attack and defense competition in a network security competition, each player (user) of each participating team can also explore vulnerabilities in the competition environment and write corresponding patch scripts based on the explored vulnerabilities; the first user is used here to represent any user in each participating team.

[0237] Step 704: Send a second script submission request to the server based on the patch script; the second script submission request is used to instruct the server to obtain the patch script and run the patch script in the competition environment of the first user to obtain a new competition environment of the first user.

[0238] For example, when the first user writes the patch script, he clicks the "Submit patch" control on the relevant interface of the competition platform, so that the terminal corresponding to the first user sends a second script submission request to the server, so that the server receives the second script submission request sent by the terminal corresponding to the first user.

[0239] It should be noted that the present invention does not limit the execution order of the above steps 701 to 702 and the above steps 703 to 704, which can be set based on specific needs.

[0240] It should be noted that each user participating in this round needs to write a corresponding first attack script based on the competition environment, and send a first script submission request to the server, so that the server obtains the first attack script of each user participating in this round. If some users have also written corresponding patch scripts in this round, then when the server obtains the first attack script of each user participating in this round and the patch script of some users, it means that the current round between the teams is over, that is, the end of this round of competition; when the server obtains the first attack script corresponding to each user and the patch script of some users, it can attack the competition environment of each other participating user based on the first attack script corresponding to each user, and patch the competition environment of the corresponding user based on the patch script.

[0241] For example, four teams, ABCD, compete in a game with the title "test". Before the end of the first round, ABCD all submitted their own attack scripts, exp.zip, through their manipulators. In addition, team A patched the vulnerability in its own environment and submitted the patch script patch.zip. After submitting patch.zip, the server successfully executed patch.zip in the environment of team A. At this time, team A's environment is different from that of other teams because of the vulnerability patch, and can be named test_A_patch. After the first round, the referee server Judge obtains the exp.zip of the four teams, ABCD, from the cloud database and starts the attack and defense execution. Take Team A attacking Team B, Team C, and Team D as an example: Judge creates a script running environment and mirrors the test environment of Team B, Team C, and Team D. Then, he uses the script running environment to execute Team A's exp.zip. Before executing exp.zip, he first checks the test environment of Team B, Team C, and Team D in turn. If any team's test environment is abnormal, the service points will be directly deducted, and the test environment of the abnormal team will no longer be attacked based on Team A's exp.zip. If no team's test environment is abnormal, the test environment of Team B, Team C, and Team D will be attacked in turn based on the running exp.zip of Team A, and the first attack results of Team B, Team C, and Team D will be obtained respectively. When Team B, Team C, and Team D attack Team A, they attack Team A's new test environment test_A_patch.

[0242] It should be noted that after each round, the server will pull the latest exp.zip and the new competition environment in which the team last patched the vulnerability, and then conduct attack and defense in turn.

[0243] Optionally, the attack and defense method in the network security competition further includes the following steps:

[0244] When it is determined that the environmental service result is a service abnormality based on the new competition environment of the first user, the new competition environment of the first user is restored to the competition environment that was in a normal state last time, or the new competition environment of the first user is restored to the initial competition environment, and the preset number of restorations is reduced by one; the preset number of restorations is the number of times the first user is allowed to restore the competition environment.

[0245] For example, when the first user determines that the written patch script has an abnormal service to his own competition environment, he can click the "One-click recovery" control on the competition platform to restore the first user's new competition environment to the last normal competition environment. The specific recovery method can be to take a snapshot of the competition environment of each round, set the status of each snapshot, and restore it to the most recent snapshot in a normal state; or click the "Reset to initial state" control to restore the first user's new competition environment to the initial competition environment, for example, to a snapshot of the initial state; after clicking the "One-click recovery" control or "Reset to initial state", the preset number of recovery times for the first user to restore the competition environment is automatically reduced by 1; wherein, the preset number of recovery times can be set based on the competition requirements, and the present invention is not limited to this.

[0246] Optionally, before step 704, the attack and defense method in the network security competition further includes the following steps:

[0247] The patch script is stored in a second preset directory of the operating machine corresponding to the first user.

[0248] For example, when the first user has written a patch script, the patch script can be uploaded to the second preset directory of the operating machine assigned to the first user. In this way, the cloud database can obtain the patch script of the first user in the second preset directory of the operating machine corresponding to the first user based on the correspondence between the terminal identification, the operating machine identification and the preset directory, and store the patch script of the first user and the identification of the terminal corresponding to the first user in correspondence.

[0249] Optionally, the attack and defense method in the network security competition further includes the following steps:

[0250] The current competition question mirror environment corresponding to each second user is obtained from the public mirror area; when it is determined that there is an abnormal current competition question mirror environment, the second user corresponding to the abnormal current competition question mirror environment is determined as the reported user; a reporting request is sent to the server; the reporting request carries evidence information of the reported user.

[0251] For example, each participating user can apply to obtain the current competition mirror environment of other users from the public mirror area, and add the obtained current competition mirror environment of other users to the team resource area for analysis. If the reporting user believes that the current competition mirror environment of a certain user has deleted necessary functions or necessary services, etc., then the current competition mirror environment of the user is determined to be illegal. At this time, you can click the "Report" control on the competition platform and add illegal evidence information (necessary functions or necessary services have been deleted). In this way, the terminal corresponding to the user sends a reporting request carrying the evidence information of the reported user to the server, so that the server receives the reporting request sent by the terminal corresponding to the reporting user.

[0252] Optionally, Fig.10 FIG. 1 is a schematic diagram of the structure of the attack and defense system in the network security competition provided by the embodiment of the present invention. Fig.10 As shown, the attack and defense system in the network security competition includes multiple team servers, a website server, a cloud database and multiple servers, wherein the multiple servers form a referee server cluster, each team server includes an operating machine and multiple competition environment, and the competition environment is divided into an initial competition environment and a competition environment, wherein the initial competition environment is used to test the attack script, and the competition environment is used to execute the patch script; each server creates a script running environment and a competition environment (competition mirror environment) for each user, runs the first attack script of the first user through the script running environment, and attacks the competition mirror environment of each second user based on the running first attack script; the website server is used to play a calling role between each team server and the referee server cluster; the cloud database is used to store each team's attack script, patch script, and the attack and defense scores of each team or each user in each round.

[0253] It should be noted that both the team server and the referee server can be flexibly deployed based on the number of participating teams. The deployment of the attack and defense system in the entire cybersecurity competition is divided into pre-match deployment, in-match deployment and post-match deployment.

[0254] Among them, pre-match deployment includes the deployment of the event system and referee server; the event system needs to be configured with competition information, and the configuration of the event system and the allocation of team servers can be flexibly configured according to the requirements of different events. The referee server can be deployed with one click, and the event scoring settings can be synchronized through the cloud database. The scoring settings can be flexibly controlled through the configuration of the event system.

[0255] The deployment in the competition includes players who have the right to participate in the competition. After logging into the competition system through the competition platform website, they can view the competition questions and team resources, solve the questions according to the competition question information, and submit the team's exp and patch for attack and defense through the corresponding operation machine. After each round, wait for the results of the attack and defense scores, and adjust the answers according to the attack and defense judgment of the previous round. At the same time, you can obtain the competition environment of other teams, analyze the competition environment of other teams, and adjust your own answers (attack scripts or patch scripts). The network isolation of the competition environment is achieved through the operation machines of each team. Players can only directly access their own operation machines, and cannot directly access the competition environment and the competition environment of other teams. In addition, they can also debug the competition questions through their respective operation machines.

[0256] The post-match deployment includes the display of the offensive and defensive score rankings of each team. If there is cheating during the game, the score will be adjusted after the game. After the game, the event system closes all question answering windows and only the offensive and defensive scores can be viewed.

[0257] The attack and defense system in the network security competition provided by the embodiment of the present invention provides each team with an isolated initial competition environment as a test target in each round, and all teams test attacks without affecting each other; each team can obtain the competition mirror environment of other teams in this round in each round, so that the players can understand the competition environment of the opponent without making the opponent unable to operate due to the attack, and the attack and defense are completely independent, which not only tests the scenario of the player's deduction of the opponent's competition environment, but also enables all teams to maximize their defense capabilities, realizes the fairness of each team's attack and defense process being completely independent, and achieves actual mutual attack between teams; all teams submit the best exp in each round, and the referee server arranges the team exp to attack all teams except itself one by one at the end of the round, avoiding the resource bearing risk caused by direct mutual attacks between teams during the game and the risk of malicious attacks between teams caused by certain non-compliant operations.

[0258] Fig.11 It is one of the structural schematic diagrams of the attack and defense device in the network security competition provided by the embodiment of the present invention, which is applied to the server, such as Fig.11 As shown, the attack and defense device in the network security competition includes a first receiving unit 1101, a first obtaining unit 1102, a first mirroring unit 1103 and an attacking unit 1104; wherein:

[0259] The first receiving unit 1101 is configured to receive a first script submission request sent by a terminal corresponding to a first user;

[0260] A first acquisition unit 1102 is configured to acquire a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on a competition environment;

[0261] The first mirroring unit 1103 is used to mirror the competition environment of each second user to obtain the competition mirroring environment corresponding to each second user;

[0262] The attack unit 1104 is used to attack the competition mirror environment corresponding to each second user based on the first attack script to obtain a first attack result.

[0263] In the attack and defense device in the network security competition provided by the embodiment of the present invention, the server obtains the first attack script of the first user based on the received first script submission request, then mirrors the competition environment of each second user, and finally attacks the competition mirror environment corresponding to each second user based on the first attack script. It can be seen that the present invention realizes the attack and defense of the network security competition between multiple parties through the participation of the server. On this basis, the server attacks the competition mirror environment of each second user obtained by mirroring based on the first attack script of the first user, and does not directly attack the competition environment of the second user, which can prevent the competition environment of the second user from being maliciously operated, reflecting the fairness of the attack and defense of the network security competition.

[0264] Based on any of the above embodiments, the attack unit 1104 is specifically used for:

[0265] Attacking the game mirror environment corresponding to the second user based on the first attack script to obtain target data obtained by the attack;

[0266] Determine whether the target data matches preset data; the preset data is data stored in the competition mirror environment corresponding to the second user;

[0267] When it is determined that the target data matches the preset data, determining that the first attack result is a successful attack;

[0268] When it is determined that the target data does not match the preset data, the first attack result is determined to be an attack failure.

[0269] Based on any of the above embodiments, the attack unit 1104 is specifically used for:

[0270] Create a script execution environment;

[0271] Running the first attack script based on the script running environment;

[0272] Attack the competition mirror environment corresponding to the second user based on the running of the first attack script.

[0273] Based on any of the above embodiments, the attack unit 1104 is specifically used for:

[0274] Determine whether the competition mirror environment corresponding to the second user can run the target service normally;

[0275] When it is determined that the competition mirror environment corresponding to the second user can normally run the target service, the first attack script is run based on the script running environment.

[0276] Based on any of the above embodiments, the first script submission request carries an identifier of a terminal corresponding to the first user; and the first obtaining unit 1102 is specifically configured to:

[0277] The first attack script is obtained in a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the attack script; the attack script is obtained by the cloud database from a first preset directory of an operating machine corresponding to each user.

[0278] Based on any of the above embodiments, the device further includes:

[0279] A second receiving unit, configured to receive a second script submission request sent by a terminal corresponding to the first user;

[0280] A second acquisition unit is configured to acquire a patch script based on the second script submission request; the patch script is a patch script determined by the first user based on the competition question environment;

[0281] An access unit is used to access the competition environment of the first user, run the patch script in the competition environment of the first user, and obtain a new competition environment of the first user.

[0282] Based on any of the above embodiments, the device further includes:

[0283] The second determining unit is used to determine the environmental service result based on the new competition question environment corresponding to the first user.

[0284] Based on any of the foregoing embodiments, the second determining unit is specifically configured to:

[0285] Determine whether the new competition environment corresponding to the first user can run the target service normally;

[0286] When it is determined that the new competition environment corresponding to the first user can normally operate the target service, determining that the environment service result is a normal service;

[0287] When it is determined that the new competition question environment corresponding to the first user cannot normally operate the target service, the environmental service result is determined to be a service abnormality.

[0288] Based on any of the above embodiments, the device further includes:

[0289] A third acquisition unit is configured to acquire a second attack script based on the third script submission request when receiving a third script submission request sent by a terminal corresponding to the second user;

[0290] A second mirroring unit, configured to mirror the new competition environment of the first user to obtain a new competition mirroring environment corresponding to the first user;

[0291] The second attack unit is used to attack the new competition question mirror environment of the first user based on the second attack script to obtain a second attack result.

[0292] Based on any of the foregoing embodiments, the second script submission request carries an identifier of a terminal corresponding to the first user; and the second obtaining unit is specifically configured to:

[0293] The patch script is obtained from a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the patch script; the patch script is obtained by the cloud database from a second preset directory of an operating machine corresponding to each user.

[0294] Based on any of the above embodiments, the device further includes:

[0295] a third determining unit, configured to determine an attack and defense score of the first user and an attack and defense score of the second user based on the first attack result of the first user and the second attack result of the second user;

[0296] determining a service score for the first user and a service score for each of the second users based on the environmental service result of the first user and the environmental service result of each of the second users;

[0297] determining a total game score of the first user based on the attack and defense score of the first user and the service score of the first user;

[0298] determining a total game score of the second user based on the attack and defense score of the second user and the service score of the second user;

[0299] The storage and display unit stores and / or displays the total game score of the first user and the total game score of each of the second users after sorting.

[0300] Based on any of the foregoing embodiments, the third determining unit is specifically configured to:

[0301] When the first attack result is a successful attack, the attack and defense score of the first user is increased by a preset attack and defense score, and the attack and defense score of the second user is deducted by the preset attack and defense score;

[0302] When the first attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged;

[0303] When the second attack result is a successful attack, the preset attack and defense score is deducted from the attack and defense score of the first user, and the preset attack and defense score is increased from the attack and defense score of the second user;

[0304] When the second attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged.

[0305] Based on any of the foregoing embodiments, the third determining unit is specifically configured to:

[0306] Determining a target user whose environmental service result is a successful service from the environmental service result of the first user and the environmental service results of each of the second users;

[0307] The service scores of other users except the target user are deducted from the first preset service score; the first preset service score is the average of the preset service total score and the number of other users;

[0308] The service score of the target user is increased by a second preset service score; the second preset service score is the average of the preset service total score and the number of target users.

[0309] Based on any of the above embodiments, the device further includes:

[0310] The first storage unit is used to store the current competition mirror environment corresponding to each user in the public mirror area.

[0311] Based on any of the above embodiments, the device further includes:

[0312] A third receiving unit is used to receive a reporting request sent by a terminal corresponding to the reporting user; the reporting request carries evidence information of the reported user;

[0313] A fourth determination unit, configured to determine whether the current competition mirror environment corresponding to the reported user is legal based on the evidence information of the reported user;

[0314] The updating unit is used to update the attack and defense score of the reporting user and the attack and defense score of the reported user when it is determined that the current game question mirror environment corresponding to the reported user is illegal.

[0315] Based on any of the above embodiments, the updating unit is specifically used for:

[0316] Adding preset reporting points to the attack and defense score of the reporting user;

[0317] The preset reporting points are deducted from the attack and defense score of the reported user.

[0318] Fig.12 This is a second structural diagram of the attack and defense device in the network security competition provided by the embodiment of the present invention, which is applied to the server, such as Fig.12 As shown, the attack and defense device in the network security competition includes a first determination unit 1201 and a first sending unit 1202; wherein:

[0319] A first determining unit 1201 is used to determine a first attack script of a first user based on a competition question environment;

[0320] The first sending unit 1202 is used to send a first script submission request to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0321] In the attack and defense device in the network security competition provided by the embodiment of the present invention, the terminal determines the first attack script of the first user based on the competition question environment, and sends a first script submission request to the server based on the first attack script, so that when the server receives the first script submission request, it obtains the first attack script based on the first script submission request, and then mirrors the competition question environment of each second user, and finally attacks the competition question mirror environment corresponding to each second user based on the first attack script. It can be seen that the present invention realizes the attack and defense in the network security competition between multiple parties through the participation of the server. On this basis, the server attacks the competition question mirror environment of each second user obtained by mirroring based on the first attack script of the first user, and does not directly attack the competition question environment of the second user, which can prevent the competition question environment of the second user from being maliciously operated, and reflects the fairness of the attack and defense in the network security competition.

[0322] Based on any of the foregoing embodiments, the first sending unit 1202 is specifically configured to:

[0323] Based on the first attack script, an initial competition environment or a target competition environment is tested to obtain a test result; the initial competition environment is a competition environment without running the patch script; the target competition environment is a competition environment after running the patch script;

[0324] When it is determined that the test result is a success, the first script submission request is sent to the server based on the first attack script.

[0325] Based on any of the above embodiments, the device further includes:

[0326] The fourth acquisition unit is used to acquire the competition environment through the operation machine corresponding to the first user; the operation machine corresponding to the first user does not allow any device other than the server and the terminal corresponding to the first user to access.

[0327] Based on any of the above embodiments, the device further includes:

[0328] The second storage unit is used to store the first attack script in a first preset directory of the operating machine corresponding to the first user.

[0329] Based on any of the above embodiments, the device further includes:

[0330] A fifth determining unit, configured to determine a patch script of the first user based on the competition question environment;

[0331] The second sending unit is used to send a second script submission request to the server based on the patch script; the second script submission request is used to instruct the server to obtain the patch script and run the patch script in the competition environment of the first user to obtain a new competition environment of the first user.

[0332] Based on any of the above embodiments, the device further includes:

[0333] A recovery unit is used to restore the new competition environment of the first user to the last normal competition environment, or to restore the new competition environment of the first user to the initial competition environment, when it is determined that the environmental service result is a service abnormality based on the new competition environment of the first user, and reduce the preset number of recovery times by one; the preset number of recovery times is the number of times the first user is allowed to restore the competition environment.

[0334] Based on any of the above embodiments, the device further includes:

[0335] The third storage unit is used to store the patch script in a second preset directory of the operating machine corresponding to the first user.

[0336] Based on any of the above embodiments, the device further includes:

[0337] A fifth acquisition unit, configured to acquire a current competition question mirror environment corresponding to each second user from the public mirror area;

[0338] A seventh determination unit, configured to, when determining that there is an abnormal current competition question mirror environment, determine the second user corresponding to the abnormal current competition question mirror environment as a reported user;

[0339] The third sending unit is used to send a reporting request to the server; the reporting request carries the evidence information of the reported user.

[0340] Fig.13 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Fig.13 As shown, the electronic device may include: a processor 1310, a communication interface 1320, a memory 1330 and a communication bus 1340, wherein the processor 1310, the communication interface 1320 and the memory 1330 communicate with each other through the communication bus 1340. The processor 1310 may call the logic instructions in the memory 1330 to execute the following method: receiving a first script submission request sent by a terminal corresponding to a first user;

[0341] Obtaining a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on the competition environment;

[0342] Mirroring the competition environment of each second user to obtain the competition mirror environment corresponding to each second user;

[0343] For each of the mirror environments of the competition questions corresponding to the second users, attack the mirror environments of the competition questions corresponding to the second users based on the first attack script to obtain a first attack result; or execute the following method:

[0344] Determine a first attack script of a first user based on the competition environment;

[0345] A first script submission request is sent to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0346] In addition, the logic instructions in the above-mentioned memory 1330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0347] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the attack and defense methods in the network security competition provided by the above methods, the method includes: receiving a first script submission request sent by a terminal corresponding to a first user;

[0348] Obtaining a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on the competition environment;

[0349] Mirroring the competition environment of each second user to obtain the competition mirror environment corresponding to each second user;

[0350] For each game question mirror environment corresponding to the second user, attack the game question mirror environment corresponding to the second user based on the first attack script to obtain a first attack result;

[0351] Alternatively, when the program instructions are executed by a computer, the computer can implement the following method:

[0352] Determine a first attack script of a first user based on the competition environment;

[0353] A first script submission request is sent to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0354] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the attack and defense methods in the network security competition provided by the above methods, the method comprising: receiving a first script submission request sent by a terminal corresponding to a first user;

[0355] Obtaining a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on the competition environment;

[0356] Mirroring the competition environment of each second user to obtain the competition mirror environment corresponding to each second user;

[0357] For each game question mirror environment corresponding to the second user, attack the game question mirror environment corresponding to the second user based on the first attack script to obtain a first attack result;

[0358] Alternatively, when the computer program is executed by a processor, the following method is implemented:

[0359] Determine a first attack script of a first user based on the competition environment;

[0360] A first script submission request is sent to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result.

[0361] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0362] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0363] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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. However, 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 invention.

Claims

1. An attack and defense method in a network security competition, characterized in that: Applicable to servers, including: Receiving a first script submission request sent by a terminal corresponding to a first user; Obtaining a first attack script based on the first script submission request; the first attack script is an attack script determined by the first user based on the competition environment; Mirroring the competition environment of each second user to obtain the competition mirror environment corresponding to each second user; For each game question mirror environment corresponding to the second user, attack the game question mirror environment corresponding to the second user based on the first attack script to obtain a first attack result; The method further comprises: Receiving a second script submission request sent by a terminal corresponding to the first user; Submitting a request to obtain a patch script based on the second script; the patch script is a patch script determined by the first user based on the competition environment; Accessing the competition environment of the first user, running the patch script in the competition environment of the first user, and obtaining a new competition environment of the first user; Upon receiving a third script submission request sent by a terminal corresponding to the second user, obtaining a second attack script based on the third script submission request; Mirroring the new competition environment of the first user to obtain a new competition mirror environment corresponding to the first user; The new competition question mirror environment of the first user is attacked based on the second attack script to obtain a second attack result.

2. The attack and defense method in a network security competition according to claim 1, characterized in that: Attacking the mirror environment of the competition question corresponding to the second user based on the first attack script to obtain a first attack result includes: Attacking the game mirror environment corresponding to the second user based on the first attack script to obtain target data obtained by the attack; Determine whether the target data matches preset data; the preset data is data stored in the competition mirror environment corresponding to the second user; When it is determined that the target data matches the preset data, determining that the first attack result is a successful attack; When it is determined that the target data does not match the preset data, the first attack result is determined to be an attack failure.

3. The attack and defense method in a network security competition according to claim 1, characterized in that: The attacking the mirror environment of the second user's game question based on the first attack script includes: Create a script execution environment; Running the first attack script based on the script running environment; Attack the game question mirror environment corresponding to the second user based on the running of the first attack script.

4. The attack and defense method in a network security competition according to claim 3, characterized in that: The running of the first attack script based on the script running environment includes: Determine whether the competition mirror environment corresponding to the second user can run the target service normally; When it is determined that the competition mirror environment corresponding to the second user can normally run the target service, the first attack script is run based on the script running environment.

5. The attack and defense method in a network security competition according to claim 1, characterized in that: The first script submission request carries an identifier of a terminal corresponding to the first user; The step of obtaining a first attack script based on the first script submission request includes: The first attack script is obtained in a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the attack script; the attack script is obtained by the cloud database from a first preset directory of an operating machine corresponding to each user.

6. The attack and defense method in a network security competition according to claim 1, characterized in that: After accessing the first user's competition environment, running the patch script in the first user's competition environment, and obtaining the first user's new competition environment, the method further includes: An environmental service result is determined based on the new competition question environment corresponding to the first user.

7. The attack and defense method in a network security competition according to claim 6, characterized in that: The determining of the environmental service result based on the new competition question environment corresponding to the first user includes: Determine whether the new competition environment corresponding to the first user can run the target service normally; When it is determined that the new competition environment corresponding to the first user can normally operate the target service, determining that the environment service result is a normal service; When it is determined that the new competition question environment corresponding to the first user cannot normally operate the target service, the environmental service result is determined to be a service abnormality.

8. The attack and defense method in a network security competition according to claim 1, characterized in that: The second script submission request carries an identifier of a terminal corresponding to the first user; The step of submitting a request to obtain a patch script based on the second script includes: The patch script is obtained from a cloud database based on the identifier of the terminal corresponding to the first user; the cloud database stores the correspondence between the terminal identifier and the patch script; the patch script is obtained by the cloud database from a second preset directory of an operating machine corresponding to each user.

9. The attack and defense method in a network security competition according to claim 1, characterized in that: The method further comprises: Determine an attack and defense score of the first user and an attack and defense score of the second user based on the first attack result of the first user and the second attack result of the second user; determining a service score for the first user and a service score for each of the second users based on the environmental service result of the first user and the environmental service result of each of the second users; determining a total game score of the first user based on the attack and defense score of the first user and the service score of the first user; determining a total game score of the second user based on the attack and defense score of the second user and the service score of the second user; The total game score of the first user and the total game score of each of the second users are sorted and stored and / or displayed.

10. The attack and defense method in a network security competition according to claim 9, characterized in that: The determining the attack and defense score of the first user and the attack and defense score of the second user based on the first attack result of the first user and the second attack result of the second user includes: When the first attack result is a successful attack, the attack and defense score of the first user is increased by a preset attack and defense score, and the attack and defense score of the second user is deducted by the preset attack and defense score; When the first attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged; When the second attack result is a successful attack, the preset attack and defense score is deducted from the attack and defense score of the first user, and the preset attack and defense score is increased from the attack and defense score of the second user; When the second attack result is an attack failure, the attack and defense score of the first user and the attack and defense score of the second user remain unchanged.

11. The attack and defense method in a network security competition according to claim 9, characterized in that: The determining the service score of the first user and the service score of each of the second users based on the environment service result of the first user and the environment service result of each of the second users comprises: Determining a target user whose environmental service result is a successful service from the environmental service result of the first user and the environmental service results of each of the second users; The service scores of other users except the target user are deducted from the first preset service score; the first preset service score is the average of the preset service total score and the number of other users; The service score of the target user is increased by a second preset service score; the second preset service score is the average of the preset service total score and the number of target users.

12. The attack and defense method in a network security competition according to any one of claims 1 to 11, characterized in that: The method further comprises: The current competition mirror environment corresponding to each user is stored in the public mirror area.

13. The attack and defense method in a network security competition according to claim 12, characterized in that: After storing the current game question mirror environment corresponding to each user in the public mirror area, the method further includes: Receiving a reporting request sent by a terminal corresponding to the reporting user; the reporting request carries evidence information of the reported user; Determine whether the current competition mirror environment corresponding to the reported user is legal based on the evidence information of the reported user; When it is determined that the current game mirror environment corresponding to the reported user is illegal, the attack and defense score of the reporting user and the attack and defense score of the reported user are updated.

14. The attack and defense method in a network security competition according to claim 13, characterized in that: The updating of the attack and defense score of the reporting user and the attack and defense score of the reported user includes: Adding preset reporting points to the attack and defense score of the reporting user; The preset reporting points are deducted from the attack and defense score of the reported user.

15. An attack and defense method in a network security competition, characterized in that: Applied to terminals, including: Determine a first attack script of a first user based on the competition environment; Sending a first script submission request to the server based on the first attack script; the first script submission request is used to instruct the server to obtain the first attack script, and attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result; The method further comprises: Determine a patch script for the first user based on the competition environment; A second script submission request is sent to the server based on the patch script; the second script submission request is used to instruct the server to obtain the patch script and run the patch script in the competition environment of the first user to obtain the new competition environment of the first user. The new competition environment of the first user is used to instruct the server to obtain a second attack script based on the third script submission request when receiving a third script submission request sent by the terminal corresponding to the second user, mirror the new competition environment of the first user, obtain the new competition mirror environment corresponding to the first user, and attack the new competition mirror environment of the first user based on the second attack script to obtain a second attack result.

16. The attack and defense method in a network security competition according to claim 15, characterized in that: The sending a first script submission request to the server based on the first attack script includes: Based on the first attack script, an initial competition environment or a target competition environment is tested to obtain a test result; the initial competition environment is a competition environment without running the patch script; the target competition environment is a competition environment after running the patch script; When it is determined that the test result is a success, the first script submission request is sent to the server based on the first attack script.

17. The attack and defense method in a network security competition according to claim 15, characterized in that: Before determining the first attack script based on the competition question environment, the method further includes: The competition environment is obtained through an operating machine corresponding to a first user; the operating machine corresponding to the first user does not allow any device other than the server and a terminal corresponding to the first user to access it.

18. The attack and defense method in a network security competition according to claim 17, characterized in that: Before sending the first script submission request to the server based on the first attack script, the method further includes: The first attack script is stored in a first preset directory of an operating machine corresponding to the first user.

19. The attack and defense method in a network security competition according to claim 15, characterized in that: The method further comprises: When it is determined that the environmental service result is a service abnormality based on the new competition environment of the first user, the new competition environment of the first user is restored to the competition environment that was in a normal state last time, or the new competition environment of the first user is restored to the initial competition environment, and the preset number of restorations is reduced by one; the preset number of restorations is the number of times the first user is allowed to restore the competition environment.

20. The attack and defense method in a network security competition according to claim 18, characterized in that: Before sending a second script submission request to the server based on the patch script, the method further includes: The patch script is stored in a second preset directory of the operating machine corresponding to the first user.

21. The attack and defense method in a network security competition according to any one of claims 15 to 20, characterized in that: The method further comprises: Obtain the current competition mirror environment corresponding to each second user from the public mirror area; When determining that there is an abnormal current competition question mirror environment, determining the second user corresponding to the abnormal current competition question mirror environment as the reported user; Sending a report request to the server; the report request carries the evidence information of the reported user.

22. An attack and defense device in a network security competition, characterized in that: include: A first receiving unit, configured to receive a first script submission request sent by a terminal corresponding to a first user; A first acquisition unit, configured to acquire a first attack script based on the first script submission request; The first attack script is an attack script determined by the first user based on the competition environment; A first mirroring unit is used to mirror the competition environment of each second user to obtain a competition mirror environment corresponding to each second user; An attack unit, configured to attack the competition question mirror environment corresponding to each second user based on the first attack script to obtain a first attack result; The device also includes: A second receiving unit, configured to receive a second script submission request sent by a terminal corresponding to the first user; A second acquisition unit is configured to acquire a patch script based on the second script submission request; the patch script is a patch script determined by the first user based on the competition question environment; An access unit, configured to access the competition environment of the first user, run the patch script in the competition environment of the first user, and obtain a new competition environment of the first user; A third acquisition unit is configured to acquire a second attack script based on the third script submission request when receiving a third script submission request sent by a terminal corresponding to the second user; A second mirroring unit, configured to mirror the new competition environment of the first user to obtain a new competition mirroring environment corresponding to the first user; The second attack unit is used to attack the new competition question mirror environment of the first user based on the second attack script to obtain a second attack result.

23. An attack and defense device in a network security competition, characterized in that: include: A first determining unit, configured to determine a first attack script of a first user based on a competition question environment; A first sending unit, configured to send a first script submission request to a server based on the first attack script; The first script submission request is used to instruct the server to obtain a first attack script, and to attack the competition mirror environment corresponding to the second user based on the first attack script to obtain a first attack result; The device also includes: A fifth determining unit, configured to determine a patch script of the first user based on the competition question environment; The second sending unit is used to send a second script submission request to the server based on the patch script; the second script submission request is used to instruct the server to obtain the patch script and run the patch script in the competition environment of the first user to obtain the new competition environment of the first user. The new competition environment of the first user is used to instruct the server to obtain a second attack script based on the third script submission request when receiving a third script submission request sent by the terminal corresponding to the second user, mirror the new competition environment of the first user, obtain the new competition mirror environment corresponding to the first user, and attack the new competition mirror environment of the first user based on the second attack script to obtain a second attack result.

24. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the attack and defense method in the network security competition as described in any one of claims 1 to 14 is implemented, or the attack and defense method in the network security competition as described in any one of claims 15 to 21 is implemented.

25. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the attack and defense method in the network security competition as described in any one of claims 1 to 14 is implemented, or the attack and defense method in the network security competition as described in any one of claims 15 to 21 is implemented.

26. A computer program product having executable instructions stored thereon, characterized in that: When the instruction is executed by the processor, the processor implements the attack and defense method in the network security competition as described in any one of claims 1 to 14, or implements the attack and defense method in the network security competition as described in any one of claims 15 to 21.

Citation Information

Patent Citations

  • CTF attack and defense countermeasure system and method close to real network environment

    CN108881212A

  • Virtualized attack and defense confrontation environment construction method

    CN111786983A