Attack simulation script sending optimization method and system based on feedback

By performing feature marking and feedback matching of the attack simulation script and dynamically adjusting the sent content, the resource waste problem caused by detection failure is solved and the efficiency of attack simulation verification is improved.

CN119051980AActive Publication Date: 2024-11-29SAINING WANGAN

Patent Information

Application Number
CN202411516350.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2024-11-29
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

The existing attack simulation system needs to send a full verification script when the detection fails, resulting in large consumption of hardware resources, long verification time and low efficiency.

Method used

By feature marking the attack simulation script, gradually match the target according to unblocked feature feedback, dynamically adjust the script content sent in the next round to avoid the impact of detection failure, and improve the matching probability through feature degradation, select scripts with great differences for this. send.

Benefits of technology

The script sending without relying on detection results is realized, which reduces hardware consumption, improves verification efficiency, and avoids the waste of resources caused by full transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119051980A_ABST
    Figure CN119051980A_ABST
Patent Text Reader

Abstract

The invention discloses a feedback-based attack simulation script sending optimization method and system, and the method comprises the steps: carrying out the feature marking of a script according to vulnerability information, firstly selecting a preset number or proportion of scripts from all scripts according to a criterion that the feature difference of the scripts is maximum, and carrying out the sending of the scripts; then collecting script requests which are not successfully blocked, and carrying out statistics to obtain a script feature set H; and selecting a script which is completely matched with the specific features in the set H from the original scripts which are not sent, and if the selected script does not exist, carrying out degeneration on each feature in the set H and then carrying out matching to obtain a script which needs to be sent. The method does not depend on target detection, can dynamically adjust the script sent in the next round according to the result feedback of the previous round, avoids hardware consumption caused by full script sending on the basis of ensuring the script sending coverage rate, and improves the verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a feedback-based attack simulation script sending optimization method and system, belonging to the technical field of computer software and network security. Background Art

[0002] The attack simulation system (BAS) can automatically and continuously verify the target network and promptly discover potential security risks in the network, which has attracted more and more attention. The attack simulation system consists of two parts: the server and the client. The server is deployed at the exit of the target network that needs to be verified, and the client is deployed in each subnet of the target network. The server will continue to send attack simulation scripts (i.e. verification data) to all clients, and judge whether the security strategy in this link is correct based on the feedback from the client.

[0003] In the actual deployment process, the target network that needs to be verified is often scanned and detected first to obtain specific information about the network. For example, the fingerprint information of key security equipment (firewalls, etc.) is sent in a targeted manner to simulate attack scenarios that match the device fingerprint. This method will bring the following problems: 1. The sent scenario depends on the detection results of the target network. For security reasons, equipment manufacturers generally block detection messages, resulting in detection failures; 2. In the event of detection failure, only the full verification scenario can be sent. Sending the full scenario will occupy more hardware resources (such as network bandwidth, system load, etc.), and require longer verification time and low verification efficiency. Summary of the invention

[0004] Purpose of the invention: In view of the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a feedback-based attack simulation script sending optimization method and system, so as to avoid the hardware consumption and time-consuming problems caused by the sending of the full script due to detection failure, and improve the verification efficiency.

[0005] Technical solution: To achieve the above-mentioned invention object, the present invention adopts the following technical solution: A feedback-based attack simulation script sending optimization method, comprising: Step 1, selecting a preset number or proportion of scripts from all scripts according to the criterion of the greatest difference in script features for transmission; the script features are features marked according to vulnerability information; Step 2, collect the script requests that failed to be blocked, and obtain the script feature set H by statistics; Step 3: If the number of elements in set H is not zero and remains stable, stop sending the script and end the test process; otherwise, proceed to step 4; Step 4: If all scripts have been sent, the test process ends; otherwise: among the original scripts that have not been sent, select a script that completely matches the specific features in the set H. If the selected script exists, send the selected script and go to step 2; otherwise, go to step 5; Step 5, degenerate each feature in set H to obtain set H'; Step 6, select a script that completely matches the specific features in the set H' from the original scripts that have not been sent. If the selected script exists, send the selected script and proceed to step 2; otherwise, proceed to step 7; Step 7, select a preset number or proportion of scripts from all original scripts that have not been sent according to the criterion of the greatest difference in script features to send, and go to step 2.

[0006] Preferably, the script feature differences are determined based on the number of different features between the scripts.

[0007] Preferably, the script feature is represented by a vector whose element values ​​are 0 or 1, the dimension of the vector is the preset number of vulnerability types, an element value of 1 indicates that the script involves vulnerabilities of the corresponding dimension, and an element value of 0 indicates that the script does not involve vulnerabilities of the corresponding dimension.

[0008] As a preference, for scripts C i and C j , feature difference value Diff i,j The calculation method is: ; in n is the characteristic dimension of the script, C ix and C jx Representation Dimension x The characteristic value of , ^ represents the XOR operation.

[0009] Preferably, in step 1 or step 7, a preset number or proportion of scripts are selected based on the criterion of maximum script feature difference, including: calculating the sum of the feature difference values ​​between each script and other scripts based on the feature difference value between every two scripts, as a numerical value for evaluating the feature difference of the script; sorting the scripts from large to small according to the numerical value, and selecting the scripts of the preset number or proportion in the front.

[0010] Preferably, in step 5, the operation of degrading the feature is to gradually remove the marking of the specific vulnerability in the feature to increase the probability of matching the original script that has not been sent with the degraded feature.

[0011] Preferably, in step 5, degenerating each feature in the set H to obtain the set H' comprises: For a feature H in a set H i , the number of feature elements that are not 0 is recorded as a; where a feature element that is not 0 indicates a vulnerability corresponding to the position of the element involved in the script; Sequentially assign b non-zero feature elements to 0 to obtain the degenerated new features. For b=1, each time H i A non-zero feature element in becomes 0, and a new feature is obtained; b takes values ​​from 1 to a-1, H i The new feature set obtained is denoted as H i '; For all H in the set H i After degeneration, the new feature set obtained is recorded as H'.

[0012] A computer system includes a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor. When the computer program / instruction is executed by the processor, the steps of the feedback-based attack simulation script sending optimization method are implemented.

[0013] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the feedback-based attack simulation script sending optimization method are implemented.

[0014] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a feedback-based attack simulation script sending optimization method.

[0015] Beneficial effect: Compared with the prior art, the present invention has the following advantages: the present invention sets vulnerability-related label information for the script, performs feature marking on the script, gradually matches the target according to the unblocked feature feedback, and dynamically adjusts the content of the script to be sent in the next round; thereby achieving the purpose of not needing to detect the target network in advance and the sending of the script not relying on the detection result of the target object, avoiding the influence of network detection failure on the decision to send the script; at the same time, by gradually degrading the feedback features, on the basis of ensuring the coverage of the script sending, the hardware consumption caused by the sending of the full script is avoided and the verification efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention.

[0017] Figure 2 This is a flow chart of feature set degradation in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments.

[0019] like Figure 1 As shown, an attack simulation script sending optimization method based on feedback disclosed in an embodiment of the present invention mainly includes: Step 1, selecting a preset number or proportion of scripts from all scripts according to the criterion of the greatest difference in script features for sending; Step 2, collect the script requests that failed to be blocked, and obtain the script feature set H by statistics; Step 3: If the number of elements in set H is not zero and remains stable, stop sending the script and end the test process; otherwise, proceed to step 4; Step 4: If all scripts have been sent, the test process ends; otherwise: among the original scripts that have not been sent, select a script that completely matches the specific features in the set H. If the selected script exists, send the selected script and go to step 2; otherwise, go to step 5; Step 5, degenerate each feature in set H to obtain set H'; Step 6, select a script that completely matches the specific features in the set H' from the original scripts that have not been sent. If the selected script exists, send the selected script and proceed to step 2; otherwise, proceed to step 7; Step 7, select a preset number or proportion of scripts from all original scripts that have not been sent according to the criterion of the greatest difference in script features to send, and go to step 2.

[0020] In step 1, the script features are features marked according to vulnerability information. Specifically, all scripts are marked according to vulnerability information. For a specific script, the vulnerability information involved includes operating system and version, application software and version, service port, etc. Suppose the number of vulnerability types of each operating system, each application software, etc. involved in each script in the system is n, and the i-th script C i The encoded n features are recorded as C i =[F i1 , F i2 ,..., F in ]. C i Each feature element in the feature vector does not necessarily have a value. For example, for a certain operating system vulnerability scenario, its application software feature may not exist. In this case, the application software related features are assigned a value of 0.

[0021] In this embodiment, the difference in script features is determined based on the number of different features between the scripts. Ci and C j For example, the feature difference value Diff i,j express C i and C j The number of different features in is calculated as follows: ; in C ix and C jx Representation Dimension x The characteristic value of , ^ represents the XOR operation.

[0022] According to the feature difference values ​​between every two scripts, the sum of the feature difference values ​​between each script and other scripts is calculated as the value for evaluating the feature difference of the script. C i Differences in the original script Diff i It can be calculated by the following formula: ; Where T is the total number of original scripts currently in the system.

[0023] In step 1, K scripts with the largest differences are selected for sending. To speed up the convergence, K can be set as a percentage of the total number of scripts, such as K=T*2%; or it can be set as a certain number, such as K=10.

[0024] In step 2, the client collects the script requests that failed to be blocked and analyzes their features. The resulting feature set is recorded as H={H1,H2,…,H x}, where x represents the number of scripts that failed to be blocked. Hi=[H i1 , H i2 ,..., H in ], assuming H i Corresponds to C in the original script m , then H ik =C mk In step 3, if the number of elements in H is not 0 and is the same as H in the previous F rounds, it can be determined that the current script features match the target device, and the script sending is stopped and the test process ends. In practice, in order to reduce errors, F is generally not less than 2.

[0025] In step 4, it was not possible to find a match for a certain H in H. iWhen the feature completely matches the script, the operation of degrading the feature in step 5 is to gradually remove the mark of the specific vulnerability in the feature to increase the probability of matching the original script that has not been sent with the degraded feature. Figure 2 As shown, in this embodiment, the process of performing degenerate matching in the original script according to the feature set H is as follows: For feature H i For b=1, the number of features that are not 0 is recorded as a. Sequentially assign b of the features that are not 0 to 0 to obtain the degraded new features. For b=1, each time H i A non-zero feature becomes 0, and a new feature is obtained; b takes values ​​from 1 to a-1, H i The new feature set obtained is denoted as H i '; For all H in H i After degeneration, the new feature set obtained is recorded as H'.

[0026] The degradation processing in this embodiment can improve the script matching efficiency. If a script that completely matches a feature in H' is still not found in step 6, Q scripts with the greatest differences are selected and sent in step 7 with reference to step 1, and the value of Q is the same as that of K.

[0027] An embodiment of the present invention also discloses a computer system, including a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor, wherein the computer program / instruction, when executed by the processor, implements the steps of the feedback-based attack simulation script sending optimization method.

[0028] An embodiment of the present invention also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the feedback-based attack simulation script sending optimization method are implemented.

[0029] An embodiment of the present invention also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the feedback-based attack simulation script sending optimization method.

Claims

1. A feedback-based attack simulation script sending optimization method, characterized in that: include: Step 1, selecting a preset number or proportion of scripts from all scripts according to the criterion of the greatest difference in script features for transmission; the script features are features marked according to vulnerability information; Step 2, collect the script requests that failed to be blocked, and obtain the script feature set H by statistics; Step 3: If the number of elements in set H is not zero and remains stable, stop sending the script and end the test process; Otherwise, go to step 4; Step 4: If all scripts have been sent, the test process ends; Otherwise: select a script that completely matches the specific features in set H from the original scripts that have not been sent. If the selected script exists, send the selected script and go to step 2; otherwise, go to step 5; Step 5, degenerate each feature in set H to obtain set H'; Step 6, select a script that completely matches the specific features in the set H' from the original scripts that have not been sent. If the selected script exists, send the selected script and proceed to step 2; otherwise, proceed to step 7; Step 7, select a preset number or proportion of scripts from all original scripts that have not been sent according to the criterion of the greatest difference in script features to send, and go to step 2.

2. According to the feedback-based attack simulation script sending optimization method of claim 1, it is characterized in that: The script feature diversity is determined based on the number of different features between the scripts.

3. The attack simulation script sending optimization method based on feedback according to claim 1 is characterized in that: The script feature is represented by a vector whose element values ​​are 0 or 1, and the dimension of the vector is the number of preset vulnerability types. An element value of 1 indicates that the script involves vulnerabilities of the corresponding dimension, and an element value of 0 indicates that the script does not involve vulnerabilities of the corresponding dimension.

4. The attack simulation script sending optimization method based on feedback according to claim 3 is characterized in that: For the script C i and C j , feature difference value Diff i,j The calculation method is: ; in n is the characteristic dimension of the script, C ix and C jx Representation Dimension x The characteristic value of , ^ represents the XOR operation.

5. The attack simulation script sending optimization method based on feedback according to claim 1 is characterized in that: In step 1 or step 7, a preset number or proportion of scripts are selected according to the criterion of maximum script feature difference, including: calculating the sum of the feature difference values ​​between each script and the other scripts according to the feature difference value between every two scripts, as a numerical value for evaluating the feature difference of the script; sorting the scripts from large to small according to the numerical value, and selecting the scripts of the preset number or proportion in front.

6. The method for optimizing attack simulation script transmission based on feedback according to claim 1, characterized in that: In step 5, the operation of degrading the feature is to gradually remove the mark of the specific vulnerability in the feature to increase the probability of matching the original script that has not been sent with the degraded feature.

7. The attack simulation script sending optimization method based on feedback according to claim 1 is characterized in that: In step 5, each feature in the set H is degenerated to obtain a set H', including: For a feature H in a set H i , the number of feature elements that are not 0 is recorded as a; where a feature element that is not 0 indicates a vulnerability corresponding to the position of the element involved in the script; Sequentially assign b non-zero feature elements to 0 to obtain the degenerated new features. For b=1, each time H i A non-zero feature element in becomes 0, and a new feature is obtained; b takes values ​​from 1 to a-1, H i The new feature set obtained is denoted as H i '; For all H in the set H i After degeneration, the new feature set obtained is recorded as H'.

8. A computer system comprising a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor, characterized in that: When the computer program / instructions are executed by a processor, the steps of a feedback-based attack simulation script sending optimization method according to any one of claims 1-7 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a feedback-based attack simulation script sending optimization method according to any one of claims 1-7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of a feedback-based attack simulation script sending optimization method according to any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Personalized question setting method and device, computer readable storage medium and electronic equipment

    CN114372151A

  • Packet capturing method and system for attack traffic in intrusion and attack simulation system

    CN117879856A

  • IN3340MUN2015A

Cited By

  • Attack simulation script variation method, equipment and medium

    CN122293448A

  • An attack scenario script variation method, device and medium

    CN122293448B