Adaptive method and adaptive device for network security event script
By obtaining historical network security event scripts and generating initial scripts based on the source and target topology, optimizing the adaptability solves the problem in the existing technology that network security event scripts cannot be applied across topologies, and achieves effective security drills in different network environments.
Patent Information
- Application Number
- CN202410896519.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Existing network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments. They lack dynamic adjustment and adaptability, are difficult to simulate attack events in different network environments, and cannot effectively improve the performance of trainees in different network environments. ability to respond to specific attack events.
By obtaining historical network security event scripts, generate initial scripts based on source network topology and target network topology, define fitness functions, evaluate and iteratively optimize, and generate adapted network security event scripts until the highest fitness is reached and adapted to the target network topology. to complete network security drills.
It realizes cross-topology adaptation of network security event scripts, enables effective security drills and impact assessments in different network environments, and solves the problem of poor script adaptability in the existing technology.
Smart Images

Figure CN118677680A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a network security event script adaptation method, a network security event script adaptation device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the rapid development and widespread application of information technology, network security threats have become increasingly complex and diverse. Various means of network attacks have emerged in an endless stream, including distributed denial of service (DDOS) attacks, data leaks, and persistent threat (APT) attacks, which seriously threaten the network security of enterprises and institutions. In order to effectively respond to these threats, enterprises and institutions need to conduct network security drills regularly to improve their response capabilities and defense levels. However, when simulating actual attack incidents, existing network security drill systems often face the following problems: Strong specificity: Existing network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments. Lack of flexibility: These scripts lack dynamic adjustment and adaptability, making it difficult to simulate attack incidents in different network environments. Poor adaptability: It is impossible to effectively improve the ability of trainees to respond to specific attack incidents in different network environments. Summary of the invention
[0003] The main purpose of the present application is to provide a network security event script adaptation method, a network security event script adaptation device, a computer-readable storage medium and a computer program product, so as to at least solve the problem in the prior art that network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments.
[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for adapting a network security event script is provided, comprising: obtaining all historical network security event scripts, wherein the historical network security event scripts are scripts generated according to network security events that have occurred; generating multiple initial network security event scripts according to the source network topology and target network topology corresponding to the historical network security event scripts, wherein the source network topology is the network topology to which the historical network security event scripts belong, and the target network topology is the network topology to be adapted; an evaluation step, evaluating the fitness of each of the initial network security event scripts; an iteration step, selecting a set number of the initial network security event scripts for iteration according to the fitness, to obtain an adapted network security event script, wherein the adapted network security event script is a script optimized according to the initial network security event script; repeating the evaluation step and the iteration step in sequence at least once until the maximum number of iterations is reached or the fitness reaches a fitness threshold, generating a target network security event script, wherein the target network security event script is the network security event script with the highest current fitness among all the adapted network security event scripts; and adapting the target network security event script to the target network topology to complete the network security drill.
[0005] Optionally, all historical network security event scripts are obtained, including: obtaining all attack sub-techniques, each of which is composed of an attack sub-technique type, a topology node requirement, an attack action and an attack result; forming a corresponding attack behavior according to each attack sub-technique and a corresponding network topology node, the network topology node is a node that adapts to the topology node requirement of the attack sub-technique, and one attack sub-technique and one network topology node form one attack behavior; combining all the attack behaviors to form multiple attack techniques, and the attack technique is a sequence formed by multiple attack behaviors; combining all the attack techniques to form multiple attack tactics, and the attack tactics is a collection of multiple attack techniques; forming multiple groups of attack tactics sequences from all the attack tactics to obtain the historical network security event script, and a group of attack tactics sequences is one historical network security event script.
[0006] Optionally, multiple initial network security event scripts are generated based on the source network topology and target network topology corresponding to the historical network security event scripts, including: forming multiple attack sub-technology libraries based on all the attack sub-technology, and all the attack sub-technology in each attack sub-technology library are of the same type; building a mapping relationship based on the network topology nodes in the source network topology and the network topology nodes in the target network topology, and the mapping relationship at least includes the type relationship of the network topology nodes and the connection relationship between the network topology nodes; for the source network topology nodes of each source topology behavior in the source network topology, querying according to the mapping relationship to obtain the corresponding target network topology node, the source topology behavior represents the network topology node corresponding to the attack behavior of the source network topology, and the target network topology node The network topology node corresponding to the source network topology node in the mapping relationship; searching in the target attack sub-technology library according to each target network topology node to obtain the corresponding target attack sub-technology, the target attack sub-technology library is the attack sub-technology library corresponding to the type of the target network topology node, and the target attack sub-technology is the attack sub-technology that the target network topology node can meet the topology node requirements; generating new attack behaviors according to all the target network topology nodes and the corresponding target attack sub-technology; updating the attack technology and the attack tactics in turn according to all the new attack behaviors to generate the current attack tactics; updating the corresponding historical network security events according to each current attack tactic to generate all the initial network security event scripts.
[0007] Optionally, evaluating the fitness of each of the initial network security event scripts includes: when a first condition is met, calculating the fitness of the initial network security event script according to a first formula, wherein the first formula is F(E i )=α×Sim W (E i )+β×Sim T (E i )+γ×Sim C (E i )+δ×Sim R (E i ), Sim W (E i ) represents the retention degree of the attack tactics, Sim T (E i ) represents the retention of attack technology, Sim C (E i ) represents the retention degree of the attack sub-technique, Sim R (E i) represents the retention degree of the attack result, E i represents the i-th initial network security event script, α, β, γ, δ are all weight parameters and satisfy α+β+γ+δ=1, the first condition is that the satisfaction degree of the topological nodes required by all the attack sub-techniques in the initial network security event script is greater than the satisfaction degree threshold; when the first condition is not met, the fitness of the initial network security event script is determined according to the second formula, and the second formula is F(E i )=-∞.
[0008] Optionally, selecting a set number of the initial network security event scripts according to the fitness to iterate and obtain an adapted network security event script includes: randomly selecting a of the initial network security event scripts from all the initial network security event scripts; determining two of the initial network security event scripts whose crossover rate between the a of the initial network security event scripts is greater than a crossover rate threshold as the first parent individual and the second parent individual, respectively, and the crossover rate is the probability of the two initial network security event scripts crossing; dividing the first parent individual into a first front part and a first rear part according to the intersection point, and dividing the second parent individual into a second front part and a second rear part according to the intersection point, and the intersection point is less than or equal to a minimum length value, and the minimum length value is the first parent individual. The smaller length value between the length of a parent individual and the length of the second parent individual; sequentially splicing the first front part and the second rear part to obtain a first offspring individual, and sequentially splicing the second front part and the first rear part to obtain a second offspring individual; adding the first offspring individual and the second offspring individual to a network security event script set, the network security event script set is a set formed by all offspring individuals; randomly selecting at least one variant individual in the network security event script set to perform a mutation operation to obtain the adapted network security event script, the variant individual is the offspring individual whose mutation rate is greater than the mutation threshold, the mutation rate is the probability of random change of the offspring individual, and the mutation operation is an operation to change the variant individual.
[0009] Optionally, randomly selecting at least one variant individual in the network security event script set to perform a mutation operation to obtain the adapted network security event script, including: randomly selecting at least one variant individual in the network security event script set according to a mutation rate; randomly selecting one of the attack tactics in the variant individuals to obtain a random attack tactic; randomly selecting one of the attack behaviors in the random attack tactics to obtain a random attack behavior; searching for a mapped network topology node according to the network topology node in the random attack behavior, and replacing the network topology node in the random attack behavior with the mapped network topology node, wherein the mapped network topology node is the node found according to the mapping relationship. Find the corresponding network topology node in the target network topology; when the mapped network topology node cannot be found according to the network topology node in the random attack behavior, randomly search for the adapted attack sub-technology in the attack sub-technology library according to the adaptation condition, and replace the attack sub-technology in the random attack behavior with the adapted attack sub-technology, the adaptation condition is the condition that satisfies the topology node requirement of the attack sub-technology in the random attack behavior, and the adapted attack sub-technology is the attack sub-technology that meets the adaptation condition; change the mutated individual according to the mapped network topology node or the adapted attack sub-technology to obtain the adapted network security event script.
[0010] Optionally, before randomly selecting at least one variant individual in the network security event script set according to the mutation rate, the method further includes: adaptively adjusting the mutation rate according to a first adaptive formula to accelerate iterative convergence, wherein the first adaptive formula is θ t+1 =θ min +(θ max +θ min ) -μfavg(t) , where θ t+1 is the mutation rate of the t+1th iteration, θ min To set the minimum mutation rate, θ max To set the maximum mutation rate, f avg (t) is the average value of the fitness of the initial network security event script in the tth iteration, and μ is a control parameter.
[0011] According to another aspect of the present application, a network security event script adaptation device is provided, the device comprising: an acquisition unit, configured to acquire all historical network security event scripts, wherein the historical network security event scripts are scripts generated by network security events that have occurred; a first generation unit, configured to generate a plurality of initial network security event scripts according to a source network topology and a target network topology corresponding to the historical network security event scripts, wherein the source network topology is the network topology to which the historical network security event scripts belong, and the target network topology is the network topology to be adapted; an evaluation unit, configured to perform an evaluation step to evaluate the fitness of each of the initial network security event scripts; an iteration unit, configured to perform an iteration step to select a set number of the initial network security event scripts for iteration according to the fitness to obtain an adapted network security event script, wherein the adapted network security event script is a script optimized according to the initial network security event script; a second generation unit, configured to sequentially repeat the evaluation step and the iteration step at least once until a maximum number of iterations is reached or the fitness reaches a fitness threshold, and generate a target network security event script, wherein the target network security event script is the network security event script with the highest current fitness among all the adapted network security event scripts; and an adaptation unit, configured to adapt the target network security event script to the target network topology to complete the network security drill.
[0012] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0013] According to another aspect of the present application, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the methods described above is implemented.
[0014] Applying the technical solution of the present application, in the adaptation method of the network security event script, by obtaining the historical network security event script that has occurred, an initial network security event script is generated based on the actual historical network security event script and its corresponding source network topology and the target network topology that needs to be adapted, a fitness function is defined, the fitness of each initial network security event script is evaluated, and the excellent initial network security event script is selected for reproduction according to the fitness to generate an adapted network security event script, and then all the adapted network security event scripts are further evaluated, and the adapted network security event script with the highest fitness is used as the target network security event script and adapted to the target network topology. The present application enables the network security event script generated based on the network security events that have occurred to adapt to different network topologies, thereby conducting effective security drills and impact assessments in different environments. The present application solves the problem in the prior art that network security event scripts are usually designed for specific network topologies, which makes them incapable of being directly applied to other network environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A hardware structure block diagram of a mobile terminal for executing an adaptation method for a network security event script provided in an embodiment of the present application is shown;
[0016] Figure 2 A schematic diagram of a flow chart of a network security event script adaptation method provided according to an embodiment of the present application is shown;
[0017] Figure 3 A structural block diagram of an adaptation device for a network security event script provided according to an embodiment of the present application is shown.
[0018] The above drawings include the following reference numerals:
[0019] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] As introduced in the background technology, existing network security event scripts in the prior art are usually designed for specific network topologies and cannot be directly applied to other network environments. These scripts lack dynamic adjustment and adaptability, and it is difficult to simulate attack events in different network environments. It is impossible to effectively improve the ability of trainees to deal with specific attack events in different network environments. In order to solve the problem that network security event scripts in the prior art are usually designed for specific network topologies and cannot be directly applied to other network environments, the embodiments of the present application provide an adaptation method for a network security event script, an adaptation device for a network security event script, a computer-readable storage medium, and a computer program product.
[0024] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0025] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for adapting a network security event script according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0026] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a method for adapting a network security event script running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] Figure 2 FIG. 1 is a flow chart of a method for adapting a network security event script according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0029] Step S201, obtaining all historical network security event scripts, where the historical network security event scripts are scripts generated based on network security events that have occurred.
[0030] Specifically, in order to adapt the generated network security event script to different network topologies, the specific network security event script that actually occurred is first obtained as a data basis.
[0031] Step S202: Generate multiple initial network security event scripts according to the source network topology and target network topology corresponding to the historical network security event scripts. The source network topology is the network topology to which the historical network security event scripts belong, and the target network topology is the network topology to be adapted.
[0032] Specifically, an initial population of an adaptive evolutionary algorithm is generated based on a specific network security event script that actually occurs and its corresponding source network topology and a target network topology that needs to be adapted, and the individuals of the initial population are the above-mentioned initial network security event scripts.
[0033] Step S203, an evaluation step, evaluates the fitness of each of the above initial network security event scripts.
[0034] Specifically, a fitness function is defined to evaluate the fitness of each initial network security event script so as to select the initial network security event script with high fitness.
[0035] Step S204, an iteration step, selects a set number of the above-mentioned initial network security event scripts according to the above-mentioned fitness to iterate, and obtains an adapted network security event script, wherein the above-mentioned adapted network security event script is a script optimized according to the above-mentioned initial network security event script.
[0036] Specifically, in order to generate new population individuals, namely the above-mentioned adapted network security event scripts, through selection, crossover and mutation operations, the above-mentioned excellent initial network security event scripts are selected for reproduction according to fitness to obtain the above-mentioned adapted network security event scripts.
[0037] Step S205, repeat the above evaluation step and the above iteration step in sequence at least once until the maximum number of iterations is reached or the above fitness reaches the fitness threshold, and generate a target network security event script, where the above target network security event script is the network security event script with the highest current fitness among all the above adapted network security event scripts.
[0038] Specifically, the above evaluation step and the above iteration step are repeated until the maximum number of iterations is reached or the fitness reaches a threshold, and one or a group of adapted network security event scripts with the highest fitness are selected as the target network security event script.
[0039] Step S206: adapt the target network security event script to the target network topology to complete the network security drill.
[0040] Specifically, one or a group of network security event scripts generated by the above method can be used as a variant of the original script to automatically adapt to the user's network topology environment, so that the user can verify the attack effect of the network security event on itself or a specific network topology environment and conduct impact assessment or network security emergency drills while retaining certain attack technical characteristics of the original network security event script. The above target network security event script is a specific drill script that can match the target network topology, and the above target network security event script is adapted to the above target network topology to complete the network security drill.
[0041] In this embodiment, in the adaptation method of the network security event script, first, all historical network security event scripts are obtained, and the above-mentioned historical network security event scripts are scripts generated according to the network security events that have occurred; then, multiple initial network security event scripts are generated according to the source network topology and target network topology corresponding to the above-mentioned historical network security event scripts, the above-mentioned source network topology is the network topology to which the above-mentioned historical network security event scripts belong, and the above-mentioned target network topology is the network topology to be adapted; then, an evaluation step is performed to evaluate the fitness of each of the above-mentioned initial network security event scripts; then, an iteration step is performed to select a set number of the above-mentioned initial network security event scripts according to the above-mentioned fitness to iterate, and obtain an adapted network security event script, and the above-mentioned adapted network security event script is a script optimized according to the above-mentioned initial network security event script; then, the above-mentioned evaluation step and the above-mentioned iteration step are repeated in sequence at least once until the maximum number of iterations is reached or the above-mentioned fitness reaches the fitness threshold, and a target network security event script is generated, and the above-mentioned target network security event script is the network security event script with the highest current fitness among all the above-mentioned adapted network security event scripts; finally, the above-mentioned target network security event script is adapted to the above-mentioned target network topology to complete the network security drill. The present application obtains historical network security event scripts that have occurred, generates an initial network security event script based on the actual historical network security event scripts and the corresponding source network topology and the target network topology that needs to be adapted, defines a fitness function, evaluates the fitness of each initial network security event script, selects excellent initial network security event scripts for reproduction according to the fitness, generates an adapted network security event script, and then continues to evaluate all adapted network security event scripts, and adapts the adapted network security event script with the highest fitness to the target network topology as the target network security event script. The present application enables the network security event scripts generated based on the network security events that have occurred to adapt to different network topologies, thereby conducting effective security drills and impact assessments in different environments. The present application solves the problem in the prior art that network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments.
[0042] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the adaptation method of the network security event script of the present application will be described in detail below in combination with specific embodiments.
[0043] In order to obtain a network security event script generated based on a network security event that has occurred to provide a data basis, in an optional implementation, the above step S201 includes:
[0044] Step S2011, obtaining all attack sub-techniques, each of which consists of an attack sub-technique type, topology node requirements, attack actions, and attack results;
[0045] Step S2012, forming corresponding attack behaviors according to each of the above-mentioned attack sub-techniques and the corresponding network topology nodes, the above-mentioned network topology nodes are nodes that meet the requirements of the above-mentioned topology nodes of the above-mentioned attack sub-techniques, and one above-mentioned attack sub-technique and one above-mentioned network topology node form one above-mentioned attack behavior;
[0046] Step S2013, combining all the above attack behaviors to form multiple attack techniques, where the above attack techniques are sequences formed by multiple attack behaviors;
[0047] Step S2014, combining all the above attack techniques to form a plurality of attack tactics, wherein the above attack tactics are a collection of the above attack techniques;
[0048] Step S2015, forming a plurality of groups of attack tactic sequences from all the above attack tactics to obtain the above historical network security event scripts, wherein a group of the above attack tactic sequences constitutes one above historical network security event script.
[0049] In the above embodiment, the network security event script E is represented as a set of ordered attack tactic sequences E={W1, W2, ..., W m}, for each attack tactic W m Is a set of attack techniques: W m ={T1, T2, ..., T k}, each attack technique T k It is a set of attack behavior sequences containing specific attack sub-techniques: k ={S1, S2, ..., S n}, each attack behavior S n Expressed as: S n=(C,N), C represents the attack sub-technology, N represents the network topology node, and the node adapts to the topology requirements of the attack sub-technology C. Each attack sub-technology C is expressed as C=(M,O,A,R), M represents the attack sub-technology type, O represents the topology node requirements, A represents the specific attack action, and represents the attack result of the network topology node. According to the above rules, all historical network security event scripts are obtained to provide a data basis for the subsequent target network security event script generation. Attack behavior, attack tactics, attack technology, and attack sub-technology are all concepts in the network security ATT&CK attack chain. Attack behavior is a structure or a class, which indicates which network topology node the attack sub-technology is applied to. The attack sub-technology here is specifically represented as a class, which contains the attribute M representing its type, and the attribute A is the description of the specific attack action. The function O returns whether the topology node requirements are met based on the input topology node, and the function R modifies the state of the input topology node to the state after the attack.
[0050] In order to improve the quality of the initial network security event script as much as possible under the premise of ensuring diversity and global search, in an optional implementation, the above step S202 includes:
[0051] Step S2021, forming a plurality of attack sub-technique libraries according to all the above attack sub-techniques, wherein all the above attack sub-techniques in each of the above attack sub-technique libraries are of the same type;
[0052] Step S2022, constructing a mapping relationship according to the network topology nodes in the source network topology and the network topology nodes in the target network topology, wherein the mapping relationship at least includes a type relationship of the network topology nodes and a connection relationship between the network topology nodes;
[0053] Step S2023, for the source network topology node of each source topology behavior in the source network topology, query according to the mapping relationship to obtain the corresponding target network topology node, the source topology behavior represents the network topology node corresponding to the attack behavior of the source network topology, and the target network topology node is the network topology node corresponding to the source network topology node in the mapping relationship;
[0054] Step S2024, searching in the target attack sub-technology library according to each of the above target network topology nodes to obtain the corresponding target attack sub-technology, wherein the above target attack sub-technology library is the above attack sub-technology library corresponding to the type of the above target network topology node, and the above target attack sub-technology is the above attack sub-technology that the above target network topology node can meet the requirements of the above topology node;
[0055] Step S2025, generating new attack behaviors according to all the target network topology nodes and the corresponding target attack sub-techniques;
[0056] Step S2026, updating the above attack techniques and the above attack tactics in sequence according to all the new above attack behaviors, so as to generate the current attack tactics accordingly;
[0057] Step S2027: updating the corresponding historical network security events according to each of the current attack tactics, and generating all the initial network security event scripts.
[0058] In the above embodiment, assuming that the source network topology Gs and the target network topology Gt are known, and the nodes and connection modes of the source network topology and the target network topology are known, an attack sub-technique library based on the attack sub-technique type is first formed according to all attack sub-techniques. Each attack sub-technique library contains the same type of attack sub-techniques that can be applied to nodes in different topologies. A mapping relationship M is constructed for the nodes of the source network topology Gs and the target network topology Gt. The mapping relationship can be based on the type, attribute and connection relationship of the node. Example mapping relationship M: {N s1 →N t1 , N s1 -N t2 , ...}. For each attack behavior S in the source network topology Gs i , find the topological nodes that meet the topological node requirements in the target network topology Gt, and replace the nodes in the attack behavior, such as the attack behavior in the historical network security event script of the source network topology Find the node N that meets the conditions in the target network topology Gt t1 , and then in the attack sub-technique library of the same attack sub-technique type A new attack sub-technique was found in Make N t1 It can meet the topological node requirements and generate new attack behaviors The newly generated attack behavior Assemble the attack techniques and tactics in the original historical network security event script in order to form new attack techniques T1′ and attack tactics W1′; add the assembled attack tactics sequence {W1′} as individuals to the initial population E0. Each individual is a complete network security event script, that is, the above initial network security event script, including remapped attack tactics, attack techniques and attack behaviors; repeat the above actions until no new individuals can be generated.
[0059] In order to evaluate the pros and cons of each initial network security event in the target network topology to achieve optimal iteration, in an optional implementation, the above step S203 includes:
[0060] Step S2031: When the first condition is met, the fitness of the initial network security event script is calculated according to a first formula, where the first formula is F(E i )=α×Sim W (E i )+β×Sim T (E i )+γ×Sim C (E i )+δ×Sim R (E i ), Sim W (E i ) represents the retention degree of the attack tactics, Sim T (E i ) represents the retention of attack technology, Sim C (E i ) represents the retention degree of the attack sub-technique, Sim R (E i ) represents the retention degree of the attack result, E i represents the i-th initial network security event script, α, β, γ, δ are all weight parameters and satisfy α+θ+γ+δ=1, and the first condition is that the satisfaction degree of the topological node requirements of all the attack sub-techniques in the initial network security event script is greater than the satisfaction degree threshold;
[0061] Step S2032: if the first condition is not met, determine the fitness of the initial network security event script according to a second formula, where the second formula is F(E i )=-∞.
[0062] In the above embodiment, the fitness function F(E i ) is used to assess the initial cybersecurity incident E i The fitness of the attack sub-technique is based on the following five aspects: p (C ijk ), Attack Tactics Retention: Sim W (E i ), Attack Technique Retention: Sim T (E i ), Attack sub-technique retention: Sim C (E i ), the retention of attack results: Sim R (E i ). The fitness function is defined as:
[0063] , calculate the fitness corresponding to the initial network security incident script according to the fitness function. Calculate the retention degree Simw(E) of the above attack tactics according to the third formula i ), the third formula above is Where n represents the total number of attack tactics in the above initial network security event script, and wi is a weight parameter used to represent the i-th attack tactic. Importance in the initial network security event script above (defaults to 1 if no specific weight is given). is a similarity function used to evaluate the i-th attack tactic in the initial network security incident script The degree of similarity in the above historical cybersecurity incident scripts. Among them, m1 is the total number of attack tactics in the above historical network security event scripts, for Compared with the jth attack tactic in the above historical network security incident script The type similarity can be calculated and The weighted sum of the similarities between the types of attack techniques in the above historical network security event scripts and the ratio of the number of the above attack tactics. for The position number in the above historical network security event script is the same as the attack tactic in the above historical network security event. The Euclidean distance between the position numbers. The retention degree Sim of the above attack technology is calculated according to the fourth formula T (E i ), the fourth formula above is Where n2 represents the total number of attack techniques in the above initial network security incident script, t i is a weight parameter used to indicate the importance of the i-th attack technique in the above initial network security event script (the default value is 1 if there is no special weight information). is a similarity function used to evaluate the i-th attack technique in the above initial network security incident script The similarity degree in the above historical network security event scripts. The above similarity function Among them, m2 is the total number of attack techniques in the above historical network security event scripts, is a type similarity function used to measure the above historical network security event scripts and the initial cybersecurity incident script The similarity of attack technology types can be calculated by and The similarity between the attack sub-techniques of each attack behavior is weighted summed up. is a distance similarity function, which is used to measure the similarity of the application positions of attack techniques in historical network security event scripts and initial network security event scripts. The number of the attack tactic in the initial network security incident script above and The number of the attack tactic in the above historical network security event script The Euclidean distance between them is calculated, for example Among them, γ is a control parameter that determines the influence of position difference on similarity. According to the fifth formula, the retention degree Sim of the above attack sub-technique is calculated. C (E i ), the fifth formula above is Where n3 is the total number of attack behaviors in the initial network security event script, c i is the weight, which is used to indicate the importance of the ith attack behavior in the initial network security event script (the default is 1 if there is no special weight information). is a similarity function used to evaluate the attack sub-technique of the i-th attack behavior in the initial network security incident script The degree of similarity in historical cybersecurity event scripts. Similarity function It can be defined based on type consistency and position consistency. The type consistency is to determine whether the types of attack sub-techniques are consistent, and the position consistency is to measure the matching degree of the application positions of the attack sub-techniques. Where m3 is the total number of attack behaviors in the historical network security event scripts, It is a type consistency function that measures the similarity of attack sub-technique types in historical cybersecurity incident scripts and initial cybersecurity incident scripts. It is a position consistency function, which measures the similarity of the application position of the attack sub-technique in the historical network security incident script and the initial network security incident script. The type consistency function can be defined as a binary function or a similarity measure based on type features: The position consistency function evaluates the similarity of where the attack sub-technique is applied in the event script: In the formula, and Attack sub-techniques and The position number in the initial cybersecurity event script and the historical cybersecurity event script, The position difference metric (such as Euclidean distance or other metric), γ is a control parameter that determines the degree of influence of position difference on similarity. The calculation method for the retention of attack results is as follows: (1) The last attack behavior of all attack techniques in the last attack tactic in the initial network security event script is combined into a new set (2) The last attack behavior of all attack techniques in the last attack tactic in the historical network security event script is combined into a new set Then the retention degree of the attack result Sim R (E i ) is R N The attack results of the attack sub-techniques in R O The number of similarities between the attack results of the attack sub-techniques in m and R N The ratio of the number of elements p in , that is Satisfaction is achieved by bringing the topological nodes in the mapped attack behavior into the topological node requirement function of the corresponding attack sub-technology. If it is satisfied, true is returned, otherwise false is returned. All attack behaviors must satisfy the topological satisfaction, that is, the function returns true. If the topological satisfaction of an attack behavior is not satisfied, the value of the fitness function of the individual (i.e., the script) is negative infinity, that is, it is completely unfit.
[0065] In order to improve the diversity of adapted network security event scripts, in an optional implementation, the above step S204 includes:
[0066] Step S2041, randomly selecting a of the above initial network security event scripts from all the above initial network security event scripts;
[0067] Step S2042, determining two of the a initial network security event scripts whose crossover rates between each other are greater than a crossover rate threshold as the first parent individual and the second parent individual, respectively, wherein the crossover rate is a probability of the two initial network security event scripts crossing each other;
[0068] Step S2043, dividing the first parent individual into a first front portion and a first rear portion according to the intersection point, and dividing the second parent individual into a second front portion and a second rear portion according to the intersection point, wherein the intersection point is less than or equal to a minimum length value, and the minimum length value is a smaller length value between the length of the first parent individual and the length of the second parent individual;
[0069] Step S2044, sequentially splicing the first front part and the second rear part to obtain a first offspring individual, and sequentially splicing the second front part and the first rear part to obtain a second offspring individual;
[0070] Step S2045, adding the first child individual and the second child individual to a network security event script set, where the network security event script set is a set formed by all the child individuals;
[0071] Step S2046, randomly select at least one mutant individual from the above-mentioned network security event script set to perform a mutation operation to obtain the above-mentioned adapted network security event script, the above-mentioned mutant individual is the above-mentioned offspring individual whose mutation rate is greater than the mutation threshold, the above-mentioned mutation rate is the probability of random change of the above-mentioned offspring individual, and the above-mentioned mutation operation is an operation to change the above-mentioned mutant individual.
[0072] In the above embodiment, a individuals are randomly selected from the population, and the individual with the highest fitness is selected from the a individuals according to the selection formula. The above selection formula is: Among them, tour represents a group of a randomly selected individuals, E selected is the individual with the highest fitness. selected As one of the parents. Order-preserving Crossover (OPC) is used, and the specific steps are as follows: select two parent individuals E1 and E2 according to the crossover rate ε. In other words, select individuals whose crossover rate between the two parent individuals is greater than the crossover rate threshold as the first parent individual E1 and the second parent individual E2; randomly select a crossover point k and divide the parent individuals into the first half and the second half. The first half of the attack tactic sequence of the first child individual E3 comes from the first parent individual E1, and the second half is completed according to the order of the second parent individual E2. The first half of the attack tactic sequence of the second child individual E4 comes from the second parent individual E2, and the second half is completed according to the order of the first parent individual E1. The above formula for the first child individual is E3={W 11 , ..., W 1k , W 2(k+1) , ....., W 2m}, the formula for the second offspring individuals is E4 = {W 21 , ..., W 2k , W 1(k+1) , ....., W 1m}, where W ij represents the jth attack tactic of the i-th parent individual, k is the intersection point, and m is the total number of attack tactics. Example: Assume that the attack tactic sequences of E1 and E2 are: E1 = {W 11 , W 12 , W 13}, E2={W 21 , W 22 , W 23}, select the crossover point k = 1, generate the offspring individual: E3 = {W 11 , W 22 , W 23}, E4={W 21 , W 12 , W 13The above-mentioned offspring individuals are the above-mentioned adapted network security event scripts. A new population is formed based on all the offspring individuals, namely the above-mentioned network security event script set, and the above-mentioned mutation operation is performed. The above-mentioned mutation operation introduces new genotypes by making small random changes to certain parts of the individuals, thereby improving the diversity of the network security event script set.
[0073] In order to maintain the diversity of the network security event script set and avoid falling into a local optimum, in an optional implementation manner, the above step S2046 includes:
[0074] Step S20461, randomly selecting at least one mutant individual from the above network security event script set according to the mutation rate;
[0075] Step S20462, randomly selecting one of the above attack tactics from the above mutated individuals to obtain a random attack tactic;
[0076] Step S20463, randomly selecting one of the above attack behaviors in the above random attack tactics to obtain a random attack behavior;
[0077] Step S20464, searching for a mapping network topology node according to the network topology node in the random attack behavior, and replacing the network topology node in the random attack behavior with the mapping network topology node, wherein the mapping network topology node is a network topology node corresponding to the target network topology found according to the mapping relationship;
[0078] Step S20465, in the case that the mapped network topology node cannot be found according to the network topology node in the random attack behavior, randomly search for an adaptive attack sub-technology in the attack sub-technology library according to the adaptation condition, and replace the attack sub-technology in the random attack behavior with the adaptive attack sub-technology, the adaptation condition is a condition that satisfies the topology node requirement of the attack sub-technology in the random attack behavior, and the adaptive attack sub-technology is an attack sub-technology that meets the adaptation condition;
[0079] Step S20466, changing the above-mentioned mutated individual according to the above-mentioned mapping network topology node or the above-mentioned adaptation attack sub-technology to obtain the above-mentioned adaptation network security event script.
[0080] In the above embodiment, an order-preserving mutation operation (OPM) is adopted, and the specific steps are as follows: select a mutant individual according to the mutation rate θ. In other words, randomly select an individual whose mutation rate θ in the network security event script is greater than the mutation rate threshold as the above mutant individual; randomly select an attack tactic W from the above mutant individuals. i, that is, the above-mentioned random attack tactics, and then randomly select an attack technique T from the random attack tactics i , that is, the above random attack technology T i , and then randomly select an attack behavior S from the random attack technique i Perform the operation. Prioritize replacing network topology nodes: Attack sub-technique C based on attack behavior i In the target network topology Gt, the above-mentioned mapping topology network node is searched according to the mapping relationship and replaced with the above-mentioned mapping topology network node; if the above-mentioned mapping topology network node cannot be found, the attack sub-technology is replaced: according to the topology node requirements, the attack sub-technology library L of the attack behavior is randomly searched for an adaptive attack sub-technology for replacement; if a replaceable attack sub-technology cannot be found, the above-mentioned mutation operation does not need to be performed. E′={W1,....,W i ′, ..., W n},W i ′={T i1 , ..., T′ ij , ..., T i(ni)}, T′ ij ={S ij1 , ..., S′ ijk , ..., S ij(ni)}, where S′ ijk is the mutated aggressive behavior, T ij ′ is the mutated attack technology, ensuring that the new attack behavior meets the topological node requirements, n i Indicates attack technique W i The total number of attack behaviors in ′.
[0081] In order to speed up the iterative convergence, in an optional implementation manner, before the above step S20461, the method further includes:
[0082] Step S301, adaptively adjusting the mutation rate according to a first adaptive formula to accelerate iterative convergence, wherein the first adaptive formula is θ t+1 =θ min+ (θ max +θ min ) -μfavg(t) , where θ t+1 is the mutation rate of the t+1th iteration, θ min To set the minimum mutation rate, θ max To set the maximum mutation rate, f avg (t) is the average value of the fitness of the initial network security event script in the tth iteration, and μ is a control parameter.
[0083] In the above embodiment, the mutation rate and crossover rate are adaptively adjusted according to the evolutionary situation to accelerate convergence. Usually, a higher mutation rate is set in the early stage of evolution to increase the diversity of the population, and the mutation rate is reduced in the later stage of evolution to stabilize the population. μ is a control parameter that determines the speed of mutation rate decay. The above mutation rate is adaptively adjusted according to the first adaptive formula to accelerate iterative convergence. Similarly, the crossover rate is adaptively adjusted according to the second adaptive formula. The second adaptive formula is ε t+1 =ε min +(ε max +ε min ) -σfavg(t) , where ε t+l is the crossover rate of the t+1th iteration, ε min To set the minimum crossover rate, ε max To set the maximum crossover rate, f avg (t) is the average value of the above fitness of the above initial network security event script in the tth iteration, and σ is a control parameter that determines the speed at which the crossover rate increases.
[0084] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0085] The embodiment of the present application also provides an adaptation device for a network security event script. It should be noted that the adaptation device for the network security event script of the embodiment of the present application can be used to execute the adaptation method for the network security event script provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0086] The following introduces the adaptation device of the network security event script provided in the embodiment of the present application.
[0087] Figure 3 1 is a structural block diagram of an adaptation device for a network security event script according to an embodiment of the present application. Figure 3 As shown, the device comprises:
[0088] The acquisition unit 10 is used to acquire all historical network security event scripts, where the historical network security event scripts are scripts generated based on network security events that have occurred.
[0089] Specifically, in order to adapt the generated network security event script to different network topologies, the specific network security event script that actually occurred is first obtained as a data basis.
[0090] The first generating unit 20 is used to generate multiple initial network security event scripts according to the source network topology and the target network topology corresponding to the above-mentioned historical network security event scripts, wherein the above-mentioned source network topology is the network topology to which the above-mentioned historical network security event scripts belong, and the above-mentioned target network topology is the network topology to be adapted.
[0091] Specifically, an initial population of an adaptive evolutionary algorithm is generated based on a specific network security event script that actually occurs and its corresponding source network topology and a target network topology that needs to be adapted, and the individuals of the initial population are the above-mentioned initial network security event scripts.
[0092] The evaluation unit 30 is used to perform an evaluation step to evaluate the fitness of each of the above initial network security event scripts.
[0093] Specifically, a fitness function is defined to evaluate the fitness of each initial network security event script so as to select the initial network security event script with high fitness.
[0094] The iteration unit 40 is used to perform the iteration step, and selects a set number of the above-mentioned initial network security event scripts for iteration according to the above-mentioned fitness to obtain an adapted network security event script, wherein the above-mentioned adapted network security event script is a script optimized according to the above-mentioned initial network security event script.
[0095] Specifically, in order to generate new population individuals, namely the above-mentioned adapted network security event scripts, through selection, crossover and mutation operations, the above-mentioned excellent initial network security event scripts are selected for reproduction according to fitness to obtain the above-mentioned adapted network security event scripts.
[0096] The second generation unit 50 is used to repeat the above-mentioned evaluation step and the above-mentioned iteration step in sequence at least once until the maximum number of iterations is reached or the above-mentioned fitness reaches the fitness threshold, and generate a target network security event script. The above-mentioned target network security event script is the network security event script with the highest current fitness among all the above-mentioned adapted network security event scripts.
[0097] Specifically, the above evaluation step and the above iteration step are repeated until the maximum number of iterations is reached or the fitness reaches a threshold, and one or a group of adapted network security event scripts with the highest fitness are selected as the target network security event script.
[0098] The adaptation unit 60 is used to adapt the target network security event script to the target network topology to complete the network security drill.
[0099] Specifically, one or a group of network security event scripts generated by the above method can be used as a variant of the original script to automatically adapt to the user's network topology environment, so that the user can verify the attack effect of the network security event on itself or a specific network topology environment and conduct impact assessment or network security emergency drills while retaining certain attack technical characteristics of the original network security event script. The above target network security event script is a specific drill script that can match the target network topology, and the above target network security event script is adapted to the above target network topology to complete the network security drill.
[0100] In this embodiment, an acquisition unit is used to acquire all historical network security event scripts, where the historical network security event scripts are scripts generated by network security events that have occurred; a first generation unit is used to generate multiple initial network security event scripts according to the source network topology and target network topology corresponding to the historical network security event scripts, where the source network topology is the network topology to which the historical network security event scripts belong, and the target network topology is the network topology to be adapted; an evaluation unit is used to perform an evaluation step to evaluate the fitness of each of the initial network security event scripts; an iteration unit is used to perform an iteration step to select a set number of the initial network security event scripts for iteration according to the fitness to obtain an adapted network security event script, where the adapted network security event script is a script optimized according to the initial network security event script; a second generation unit is used to repeat the evaluation step and the iteration step in sequence at least once until the maximum number of iterations is reached or the fitness reaches a fitness threshold, and generate a target network security event script, where the target network security event script is the network security event script with the highest current fitness among all the adapted network security event scripts; an adaptation unit is used to adapt the target network security event script to the target network topology to complete the network security drill. The present application obtains historical network security event scripts that have occurred, generates an initial network security event script based on the actual historical network security event scripts and the corresponding source network topology and the target network topology that needs to be adapted, defines a fitness function, evaluates the fitness of each initial network security event script, selects excellent initial network security event scripts for reproduction according to the fitness, generates an adapted network security event script, and then continues to evaluate all adapted network security event scripts, and adapts the adapted network security event script with the highest fitness to the target network topology as the target network security event script. The present application enables the network security event scripts generated based on the network security events that have occurred to adapt to different network topologies, thereby conducting effective security drills and impact assessments in different environments. The present application solves the problem in the prior art that network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments.
[0101] In order to obtain a network security event script generated based on a network security event that has occurred to provide a data basis, in an optional implementation, the acquisition unit includes:
[0102] An acquisition module acquires all attack sub-techniques, each of which consists of an attack sub-technique type, topology node requirements, attack actions, and attack results;
[0103] A first forming module forms a corresponding attack behavior according to each of the above-mentioned attack sub-techniques and the corresponding network topology node, wherein the above-mentioned network topology node is a node adapted to the above-mentioned topology node requirements of the above-mentioned attack sub-technique, and one above-mentioned attack sub-technique and one above-mentioned network topology node form one above-mentioned attack behavior;
[0104] The second forming module combines all the above attack behaviors to form multiple attack techniques, where the above attack techniques are sequences formed by multiple attack behaviors;
[0105] The third forming module combines all the above attack techniques to form multiple attack tactics, where the above attack tactics are a collection of multiple above attack techniques;
[0106] The fourth forming module forms a plurality of attack tactic sequences from all the above attack tactics to obtain the above historical network security event scripts. A group of the above attack tactic sequences is one of the above historical network security event scripts.
[0107] In the above embodiment, the network security event script E is represented as a set of ordered attack tactic sequences E={W1, W2, ..., W m}, for each attack tactic W m Is a set of attack techniques: W m ={T1, T2, ..., T k}, each attack technology T k It is a set of attack behavior sequences containing specific attack sub-techniques: k ={S1, S2, ..., S n}, each attack behavior S n Expressed as: S n=(C, N), C represents the attack sub-technology, N represents the network topology node, and the node adapts to the topology requirements of the attack sub-technology C. Each attack sub-technology C is expressed as C=(M, O, A, R), M represents the attack sub-technology type, O represents the topology node requirements, A represents the specific attack action, and represents the attack result of the network topology node. According to the above rules, all historical network security event scripts are obtained to provide a data basis for the subsequent target network security event script generation. Attack behavior, attack tactics, attack technology, and attack sub-technology are all concepts in the network security ATT&CK attack chain. Attack behavior is a structure or a class, which indicates which network topology node the attack sub-technology is specifically applied to. The attack sub-technology here is specifically represented as a class, which contains the attribute M representing its type, and the attribute A is the description of the specific attack action. The function O returns whether the topology node requirements are met based on the input topology node, and the function R modifies the state of the input topology node to the state after the attack.
[0108] In order to improve the quality of the initial network security event script as much as possible under the premise of ensuring diversity and global search, in an optional implementation manner, the first generating unit includes:
[0109] A fifth forming module, forming a plurality of attack sub-technique libraries according to all the above attack sub-techniques, wherein all the above attack sub-techniques in each of the above attack sub-technique libraries are of the same type;
[0110] A construction module, constructing a mapping relationship according to the network topology nodes in the source network topology and the network topology nodes in the target network topology, wherein the mapping relationship at least includes a type relationship of the network topology nodes and a connection relationship between the network topology nodes;
[0111] A query module, for the source network topology node of each source topology behavior in the source network topology, queries according to the mapping relationship to obtain a corresponding target network topology node, wherein the source topology behavior represents the network topology node corresponding to the attack behavior of the source network topology, and the target network topology node is the network topology node corresponding to the source network topology node in the mapping relationship;
[0112] A search module searches for each of the target network topology nodes in a target attack sub-technology library to obtain a corresponding target attack sub-technology, wherein the target attack sub-technology library is an attack sub-technology library corresponding to the type of the target network topology node, and the target attack sub-technology is an attack sub-technology that the target network topology node can meet the requirements of the topology node;
[0113] A first generation module generates new attack behaviors according to all the target network topology nodes and the corresponding target attack sub-techniques;
[0114] The second generation module updates the above attack techniques and the above attack tactics in sequence according to all the new above attack behaviors, so as to generate the current attack tactics accordingly;
[0115] The third generation module updates the corresponding historical network security events according to each of the current attack tactics to generate all the initial network security event scripts.
[0116] In the above embodiment, assuming that the source network topology Gs and the target network topology Gt are known, and the nodes and connection modes of the source network topology and the target network topology are known, an attack sub-technique library based on the attack sub-technique type is first formed according to all attack sub-techniques. Each attack sub-technique library contains the same type of attack sub-techniques that can be applied to nodes in different topologies. A mapping relationship M is constructed for the nodes of the source network topology Gs and the target network topology Gt. The mapping relationship can be based on the type, attribute and connection relationship of the node. Example mapping relationship M: {N s1 →N t1 , N s1 -N t2 , ...}. For each attack behavior S in the source network topology Gs i , find the topological nodes that meet the topological node requirements in the target network topology Gt, and replace the nodes in the attack behavior, such as the attack behavior in the historical network security event script of the source network topology Find the node N that meets the conditions in the target network topology Gt t1 , and then in the attack sub-technique library of the same attack sub-technique type A new attack sub-technique was found in Make N t1 It can meet the topological node requirements and generate new attack behaviors The newly generated attack behavior Assemble the attack techniques and tactics in the original historical network security event script in order to form new attack techniques T1′ and attack tactics W1′; add the assembled attack tactics sequence {W1′} as individuals to the initial population E0. Each individual is a complete network security event script, that is, the above initial network security event script, including remapped attack tactics, attack techniques and attack behaviors; repeat the above actions until no new individuals can be generated.
[0117] In order to evaluate the pros and cons of each initial network security event in the target network topology to achieve optimal iteration, in an optional implementation, the evaluation unit includes:
[0118] A first calculation module calculates the fitness of the initial network security event script according to a first formula when a first condition is met, wherein the first formula is F(E i )=α×Sim W (E i )+β×Sim T (E i )+γ×Sim C (E i )+δ×Sim R (E i ), Simw(E i ) represents the retention degree of the attack tactics, Sim T (E i ) represents the retention of attack technology, Sim C (E i ) represents the retention degree of the attack sub-technique, Sim R (E i ) represents the retention degree of the attack result, E represents the i-th initial network security event script, α, β, γ, δ are all weight parameters and satisfy α+β+γ+δ=1, and the first condition is that the satisfaction degree of the topological node requirements of all the attack sub-techniques in the initial network security event script is greater than the satisfaction threshold;
[0119] A first determining module, when the first condition is not met, determines the fitness of the initial network security event script according to a second formula, wherein the second formula is F(E i )=-∞.
[0120] In the above embodiment, the fitness function F(E i ) is used to assess the initial cybersecurity incident E i The fitness of the attack sub-technique is based on the following five aspects: p (C ijk ), Attack Tactics Retention: Simw(E i ), Attack Technique Retention: Sim T (E i ), Attack sub-technique retention: Sim C (E i ), the retention of attack results: Sim R (E i ). The fitness function is defined as:
[0121] , calculate the fitness corresponding to the initial network security incident script according to the fitness function. Calculate the retention degree Simw(E) of the above attack tactics according to the third formula i ), the third formula above is Where n represents the total number of attack tactics in the above initial network security event script, and wi is a weight parameter used to represent the i-th attack tactic. Importance in the initial network security event script above (defaults to 1 if no specific weight is given). is a similarity function used to evaluate the i-th attack tactic in the initial network security incident script The degree of similarity in the above historical cybersecurity incident scripts. Among them, m1 is the total number of attack tactics in the above historical network security event scripts, for Compared with the jth attack tactic in the above historical network security incident script The type similarity can be calculated and The weighted sum of the similarities between the types of attack techniques in the above historical network security event scripts and the ratio of the number of the above attack tactics. for The position number in the above historical network security event script is the same as the attack tactic in the above historical network security event. The Euclidean distance between the position numbers. The retention degree Sim of the above attack technology is calculated according to the fourth formula T (E i ), the fourth formula above is Where n2 represents the total number of attack techniques in the above initial network security incident script, t i is a weight parameter used to indicate the importance of the i-th attack technique in the above initial network security event script (the default value is 1 if there is no special weight information). is a similarity function used to evaluate the i-th attack technique in the above initial network security incident script The similarity degree in the above historical network security event scripts. The above similarity function Among them, m2 is the total number of attack techniques in the above historical network security event scripts, is a type similarity function used to measure the above historical network security event scripts and the initial cybersecurity incident script The similarity of attack technology types can be calculated by and The similarity between the attack sub-techniques of each attack behavior is weighted summed up. is a distance similarity function, which is used to measure the similarity of the application positions of attack techniques in historical network security event scripts and initial network security event scripts. The number of the attack tactic in the initial network security incident script above and The number of the attack tactic in the above historical network security event script The Euclidean distance between them is calculated, for example Among them, γ is a control parameter that determines the influence of position difference on similarity. According to the fifth formula, the retention degree Sim of the above attack sub-technique is calculated. C (E i ), the fifth formula above is Where n3 is the total number of attack behaviors in the initial network security event script, c i is the weight, which is used to indicate the importance of the ith attack behavior in the initial network security event script (the default is 1 if there is no special weight information). is a similarity function used to evaluate the attack sub-technique of the i-th attack behavior in the initial network security incident script The degree of similarity in historical cybersecurity event scripts. Similarity function It can be defined based on type consistency and position consistency. The type consistency is to determine whether the types of attack sub-techniques are consistent, and the position consistency is to measure the matching degree of the application positions of the attack sub-techniques. Where m3 is the total number of attack behaviors in the historical network security event scripts, It is a type consistency function that measures the similarity of attack sub-technique types in historical cybersecurity incident scripts and initial cybersecurity incident scripts. It is a position consistency function, which measures the similarity of the application position of the attack sub-technique in the historical network security incident script and the initial network security incident script. The type consistency function can be defined as a binary function or a similarity measure based on type features: The position consistency function evaluates the similarity of where the attack sub-technique is applied in the event script: In the formula, and Attack sub-techniques and The position number in the initial cybersecurity event script and the historical cybersecurity event script, The position difference metric (such as Euclidean distance or other metric), γ is a control parameter that determines the degree of influence of position difference on similarity. The calculation method for the retention of attack results is as follows: (1) The last attack behavior of all attack techniques in the last attack tactic in the initial network security event script is combined into a new set (2) The last attack behavior of all attack techniques in the last attack tactic in the historical network security event script is combined into a new set Then the retention degree of the attack result SimR (E i ) is R N The attack results of the attack sub-techniques in R O The number of similarities between the attack results of the attack sub-techniques in m and R N The ratio of the number of elements p in , that is Satisfaction is achieved by bringing the topological nodes in the mapped attack behavior into the topological node requirement function of the corresponding attack sub-technology. If it is satisfied, true is returned, otherwise false is returned. All attack behaviors must satisfy the topological satisfaction, that is, the function returns true. If the topological satisfaction of an attack behavior is not satisfied, the value of the fitness function of the individual (i.e., the script) is negative infinity, that is, it is completely unfit.
[0123] In order to improve the diversity of adapted network security event scripts, in an optional implementation, the second generating unit includes:
[0124] A selection module randomly selects a of the above initial network security event scripts from all the above initial network security event scripts;
[0125] The second determination module determines two of the a initial network security event scripts whose crossover rate between each other is greater than a crossover rate threshold as the first parent individual and the second parent individual, respectively, and the crossover rate is a probability of the two initial network security event scripts crossing;
[0126] A crossover module, dividing the first parent individual into a first front portion and a first rear portion according to a crossover point, and dividing the second parent individual into a second front portion and a second rear portion according to the crossover point, wherein the crossover point is less than or equal to a minimum length value, and the minimum length value is a smaller length value between a length of the first parent individual and a length of the second parent individual;
[0127] A first splicing module sequentially splices the first front part and the second rear part to obtain a first offspring individual, and sequentially splices the second front part and the first rear part to obtain a second offspring individual;
[0128] A second splicing module adds the first offspring individual and the second offspring individual to a network security event script set, where the network security event script set is a set formed by all offspring individuals;
[0129] The mutation module randomly selects at least one mutant individual from the above-mentioned network security event script set to perform a mutation operation to obtain the above-mentioned adapted network security event script, wherein the above-mentioned mutant individual is the above-mentioned offspring individual whose mutation rate is greater than the mutation threshold, the above-mentioned mutation rate is the probability of random change of the above-mentioned offspring individual, and the above-mentioned mutation operation is an operation to change the above-mentioned mutant individual.
[0130] In the above embodiment, a individuals are randomly selected from the population, and the individual with the highest fitness is selected from the a individuals according to the selection formula. The above selection formula is: Among them, tour represents a group of a randomly selected individuals, E selected is the individual with the highest fitness. selected As one of the parents. Order-preserving Crossover (OPC) is used, and the specific steps are as follows: select two parent individuals E1 and E2 according to the crossover rate ε. In other words, select individuals whose crossover rate between the two parent individuals is greater than the crossover rate threshold as the first parent individual E1 and the second parent individual E2; randomly select a crossover point k and divide the parent individuals into the first half and the second half. The first half of the attack tactic sequence of the first child individual E3 comes from the first parent individual E1, and the second half is completed according to the order of the second parent individual E2. The first half of the attack tactic sequence of the second child individual E4 comes from the second parent individual E2, and the second half is completed according to the order of the first parent individual E1. The above formula for the first child individual is E3={W 11 , ..., W 1k , W 2(k+1) , ....., W 2m}, the formula for the second offspring individuals is E4 = {W 21 , ..., W 2k , W 1(k+1) , ....., W 1m}, where W ij represents the jth attack tactic of the i-th parent individual, k is the intersection point, and m is the total number of attack tactics. Example: Assume that the attack tactic sequences of E1 and E2 are: E1 = {W 11 , W 12 , W 13}, E2={W 21 , W 22 , W 23}, select the crossover point k = 1, generate the offspring individual: E3 = {W 11 , W 22 , W 23}, E4={W 21 , W 12 , W 13The above-mentioned offspring individuals are the above-mentioned adapted network security event scripts. A new population is formed based on all the offspring individuals, namely the above-mentioned network security event script set, and the above-mentioned mutation operation is performed. The above-mentioned mutation operation introduces new genotypes by making small random changes to certain parts of the individuals, thereby improving the diversity of the network security event script set.
[0131] In order to maintain the diversity of the network security event script set and avoid falling into a local optimum, in an optional implementation, the above-mentioned mutation module includes:
[0132] A first selection submodule randomly selects at least one mutant individual from the above network security event script set according to the mutation rate;
[0133] The second selection submodule randomly selects one of the above attack tactics from the above mutant individuals to obtain a random attack tactic;
[0134] The third selection submodule randomly selects one of the above attack behaviors from the above random attack tactics to obtain a random attack behavior;
[0135] A first replacement submodule searches for a mapping network topology node according to the network topology node in the random attack behavior, and replaces the network topology node in the random attack behavior with the mapping network topology node, wherein the mapping network topology node is a network topology node corresponding to the target network topology found according to the mapping relationship;
[0136] The second replacement submodule randomly searches for an adaptive attack sub-technology in the attack sub-technology library according to an adaptation condition when the mapped network topology node cannot be found according to the network topology node in the random attack behavior, and replaces the attack sub-technology in the random attack behavior with the adaptive attack sub-technology, wherein the adaptation condition is a condition that satisfies the topology node requirement of the attack sub-technology in the random attack behavior, and the adaptive attack sub-technology is an attack sub-technology that meets the adaptation condition;
[0137] The changing submodule changes the above-mentioned mutated individuals according to the above-mentioned mapping network topology nodes or the above-mentioned adaptation attack sub-technology to obtain the above-mentioned adaptation network security event script.
[0138] In the above embodiment, an order-preserving mutation operation (OPM) is adopted, and the specific steps are as follows: select a mutant individual according to the mutation rate θ. In other words, randomly select an individual whose mutation rate θ in the network security event script is greater than the mutation rate threshold as the above mutant individual; randomly select an attack tactic W from the above mutant individuals. i , that is, the above-mentioned random attack tactics, and then randomly select an attack technique T from the random attack tacticsi , that is, the above random attack technology T i , and then randomly select an attack behavior Si from the random attack technology to operate. Prioritize replacing network topology nodes: According to the attack sub-technology C of the attack behavior i In the target network topology Gt, the above-mentioned mapping topology network node is searched according to the mapping relationship and replaced with the above-mentioned mapping topology network node; if the above-mentioned mapping topology network node cannot be found, the attack sub-technology is replaced: according to the topology node requirements, the attack sub-technology library L of the attack behavior is randomly searched for an adaptive attack sub-technology for replacement; if a replaceable attack sub-technology cannot be found, the above-mentioned mutation operation does not need to be performed. E′={W1,....,W i ′, ..., W n},W i ′={T i1 , ..., T′ ij , ..., T i(ni)}, T′ ij ={S ij1 , ..., S′ ijk , ..., S ij(ni)}, where S′ ijk is the mutated aggressive behavior, T ij ′ is the mutated attack technology, ensuring that the new attack behavior meets the topological node requirements, n i Indicates attack technique W i The total number of attack behaviors in ′.
[0139] In order to speed up the iterative convergence, in an optional implementation manner, the device further includes:
[0140] The adjustment unit is used to adaptively adjust the mutation rate according to a first adaptive formula to accelerate iterative convergence before randomly selecting at least one variant individual from the network security event script set according to the mutation rate, wherein the first adaptive formula is θ t+1 =θ min +(θ max +θ min ) -μfavg(t) , where θ t+1 is the mutation rate of the t+1th iteration, θ min To set the minimum mutation rate, θ max To set the maximum mutation rate, f avg (t) is the average value of the fitness of the initial network security event script in the tth iteration, and μ is a control parameter.
[0141] In the above embodiment, the mutation rate and crossover rate are adaptively adjusted according to the evolutionary situation to accelerate convergence. Usually, a higher mutation rate is set in the early stage of evolution to increase the diversity of the population, and the mutation rate is reduced in the later stage of evolution to stabilize the population. μ is a control parameter that determines the speed of mutation rate decay. The above mutation rate is adaptively adjusted according to the first adaptive formula to accelerate iterative convergence. Similarly, the crossover rate is adaptively adjusted according to the second adaptive formula. The second adaptive formula is ε t+1 =ε min +(ε max +ε min ) -σfavg(t) , where ε t+1 is the crossover rate of the t+1th iteration, ε min To set the minimum crossover rate, ε max To set the maximum crossover rate, f avg (t) is the average value of the above fitness of the above initial network security event script in the tth iteration, and σ is a control parameter that determines the speed at which the crossover rate increases.
[0142] The adaptation device of the network security event script includes a processor and a memory. The acquisition unit, the first generation unit and the evaluation unit are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0143] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem that network security event scripts in the prior art are usually designed for specific network topologies and cannot be directly applied to other network environments.
[0144] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0145] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, a device where the computer-readable storage medium is located is controlled to execute an adaptation method for the network security event script.
[0146] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the adaptation method of the network security event script is executed when the program is running.
[0147] An embodiment of the present invention provides a network security event script adaptation system, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least steps corresponding to a method for adapting the network security event script are implemented.
[0148] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes steps corresponding to the adaptation method of at least a network security event script.
[0149] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0150] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0151] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0154] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0155] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0156] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0157] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0158] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0159] 1) The adaptation method of the network security event script of the present application, the present application obtains the historical network security event scripts that have occurred, generates the initial network security event script based on the actual historical network security event scripts and the corresponding source network topology and the target network topology that needs to be adapted, defines the fitness function, evaluates the fitness of each initial network security event script, selects excellent initial network security event scripts for reproduction according to the fitness, generates an adapted network security event script, and then continues to evaluate all the adapted network security event scripts, and adapts the adapted network security event script with the highest fitness to the target network topology as the target network security event script. The present application can adapt the network security event scripts generated based on the network security events that have occurred to different network topologies, so as to conduct effective security drills and impact assessments in different environments. The present application solves the problem in the prior art that network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments.
[0160] 2) The adaptation device of the network security event script of the present application obtains the historical network security event scripts that have occurred, generates the initial network security event script based on the actual historical network security event scripts and the corresponding source network topology and the target network topology that needs to be adapted, defines the fitness function, evaluates the fitness of each initial network security event script, selects excellent initial network security event scripts for reproduction according to the fitness, generates an adapted network security event script, and then continues to evaluate all the adapted network security event scripts, and adapts the adapted network security event script with the highest fitness to the target network topology as the target network security event script. The present application can adapt the network security event scripts generated based on the network security events that have occurred to different network topologies, thereby conducting effective security drills and impact assessments in different environments. The present application solves the problem in the prior art that network security event scripts are usually designed for specific network topologies and cannot be directly applied to other network environments.
[0161] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A network security event script adaptation method, It is characterized in that include: Obtain all historical network security event scripts, where the historical network security event scripts are scripts generated based on network security events that have occurred; Generate multiple initial network security event scripts according to the source network topology and the target network topology corresponding to the historical network security event script, the source network topology is the network topology to which the historical network security event script belongs, and the target network topology is the network topology to be adapted; An evaluation step of evaluating the fitness of each of the initial network security event scripts; an iterative step, selecting a set number of the initial network security event scripts according to the fitness to iterate, to obtain an adapted network security event script, wherein the adapted network security event script is a script optimized according to the initial network security event script; Repeat the evaluation step and the iteration step at least once in sequence until the maximum number of iterations is reached or the fitness reaches a fitness threshold, and generate a target network security event script, wherein the target network security event script is the network security event script with the highest fitness among all the adapted network security event scripts; The target network security event script is adapted to the target network topology to complete the network security drill.
2. The method according to claim 1, It is characterized in that Get all historical network security event scripts, including: Acquire all attack sub-techniques, each of which consists of an attack sub-technique type, topology node requirements, attack actions, and attack results; According to each of the attack sub-techniques and the corresponding network topology node, a corresponding attack behavior is formed. The network topology node is a node that adapts to the topology node requirements of the attack sub-technique. One attack sub-technique and one network topology node form one attack behavior. Combining all the attack behaviors to form a plurality of attack techniques, wherein the attack technique is a sequence formed by a plurality of the attack behaviors; Combining all of the attack techniques to form a plurality of attack tactics, wherein the attack tactics are a collection of the plurality of attack techniques; All the attack tactics are formed into multiple groups of attack tactic sequences to obtain the historical network security event script, and a group of the attack tactic sequences is one historical network security event script.
3. The method according to claim 2, It is characterized in that Generate multiple initial network security event scripts according to the source network topology and the target network topology corresponding to the historical network security event scripts, including: Forming a plurality of attack sub-technique libraries according to all the attack sub-techniques, wherein all the attack sub-techniques in each attack sub-technique library are of the same type; Building a mapping relationship according to the network topology nodes in the source network topology and the network topology nodes in the target network topology, wherein the mapping relationship includes at least a type relationship of the network topology nodes and a connection relationship between the network topology nodes; For the source network topology node of each source topology behavior in the source network topology, query according to the mapping relationship to obtain the corresponding target network topology node, the source topology behavior represents the network topology node corresponding to the attack behavior of the source network topology, and the target network topology node is the network topology node corresponding to the source network topology node in the mapping relationship; According to each of the target network topology nodes, a search is performed in a target attack sub-technology library to obtain a corresponding target attack sub-technology, wherein the target attack sub-technology library is an attack sub-technology library corresponding to the type of the target network topology node, and the target attack sub-technology is an attack sub-technology that the target network topology node can meet the topology node requirements; Generate new attack behaviors according to all the target network topology nodes and the corresponding target attack sub-techniques; The attack techniques and the attack tactics are updated in sequence according to all the new attack behaviors to generate current attack tactics accordingly; The corresponding historical network security events are updated according to each of the current attack tactics to generate all the initial network security event scripts.
4. The method according to claim 2, It is characterized in that Evaluate the fitness of each of the initial cybersecurity incident scripts, including: When the first condition is met, the fitness of the initial network security event script is calculated according to a first formula, where the first formula is F(E i )=α×Sim W (E i )+β×Sim T (E i )+γ×Sim C (E i )+δ×Sim R (E i ), Sim W (E i ) represents the retention degree of the attack tactics, Sim T (E i ) represents the retention of attack technology, Sim C (E i ) represents the retention degree of the attack sub-technique, Sim R (E i ) represents the retention degree of the attack result, E i represents the i-th initial network security event script, α, β, γ, δ are all weight parameters and satisfy α+β+γ+δ=1, and the first condition is that the satisfaction degree of the topological node requirements of all the attack sub-techniques in the initial network security event script is greater than the satisfaction degree threshold; In the case where the first condition is not met, the fitness of the initial network security event script is determined according to a second formula, where the second formula is F(E i )=-∞.
5. The method according to claim 1, It is characterized in that Selecting a set number of the initial network security event scripts according to the fitness to iterate and obtain an adapted network security event script, including: Randomly selecting a said initial network security event scripts from all said initial network security event scripts; Determine two of the a initial network security event scripts whose crossover rate between each other is greater than a crossover rate threshold as the first parent individual and the second parent individual, respectively, and the crossover rate is the probability of the two initial network security event scripts crossing; The first parent individual is divided into a first front portion and a first rear portion according to a crossover point, and the second parent individual is divided into a second front portion and a second rear portion according to the crossover point, wherein the crossover point is less than or equal to a minimum length value, and the minimum length value is a smaller length value between the length of the first parent individual and the length of the second parent individual; The first front part and the second rear part are sequentially spliced to obtain a first offspring individual, and the second front part and the first rear part are sequentially spliced to obtain a second offspring individual; Adding the first child individual and the second child individual to a network security event script set, where the network security event script set is a set formed by all child individuals; At least one mutant individual in the network security event script set is randomly selected to perform a mutation operation to obtain the adapted network security event script, wherein the mutant individual is the offspring individual whose mutation rate is greater than a mutation threshold, the mutation rate is the probability of random change of the offspring individual, and the mutation operation is an operation to change the mutant individual.
6. The method according to claim 3, It is characterized in that Randomly selecting at least one mutation individual in the network security event script set to perform a mutation operation to obtain the adapted network security event script, including: Randomly selecting at least one mutation individual from the network security event script set according to the mutation rate; Randomly selecting one of the attack tactics among the mutant individuals to obtain a random attack tactic; Randomly selecting one of the attack behaviors in the random attack tactics to obtain a random attack behavior; Searching for a mapping network topology node according to the network topology node in the random attack behavior, and replacing the network topology node in the random attack behavior with the mapping network topology node, wherein the mapping network topology node is a corresponding network topology node in the target network topology searched according to the mapping relationship; In the case that the mapped network topology node cannot be found according to the network topology node in the random attack behavior, randomly searching for an adaptive attack sub-technology in the attack sub-technology library according to an adaptation condition, and replacing the attack sub-technology in the random attack behavior with the adaptive attack sub-technology, wherein the adaptation condition is a condition that satisfies the topology node requirement of the attack sub-technology in the random attack behavior, and the adaptive attack sub-technology is an attack sub-technology that meets the adaptation condition; The mutated individual is changed according to the mapped network topology node or the adapted attack sub-technology to obtain the adapted network security event script.
7. The method according to claim 6, It is characterized in that Before randomly selecting at least one variant individual from the network security event script set according to the mutation rate, the method further includes: The mutation rate is adaptively adjusted according to a first adaptive formula to accelerate iterative convergence. The first adaptive formula is: where θ t+1 is the mutation rate of the t+1th iteration, θ min To set the minimum mutation rate, θ max To set the maximum mutation rate, f avg (t) is the average value of the fitness of the initial network security event script in the tth iteration, and μ is a control parameter.
8. An adaptation device for network security event scripts, It is characterized in that The device comprises: An acquisition unit, used to acquire all historical network security event scripts, wherein the historical network security event scripts are scripts generated by network security events that have occurred; A first generating unit, configured to generate a plurality of initial network security event scripts according to a source network topology and a target network topology corresponding to the historical network security event script, wherein the source network topology is a network topology to which the historical network security event script belongs, and the target network topology is a network topology to be adapted; An evaluation unit, configured to execute an evaluation step to evaluate the fitness of each of the initial network security event scripts; An iterative unit, configured to execute an iterative step, select a set number of the initial network security event scripts for iteration according to the fitness, and obtain an adapted network security event script, wherein the adapted network security event script is a script optimized according to the initial network security event script; A second generating unit is configured to sequentially repeat the evaluation step and the iteration step at least once until a maximum number of iterations is reached or the fitness reaches a fitness threshold, and generate a target network security event script, wherein the target network security event script is the network security event script with the highest fitness among all the adapted network security event scripts; An adaptation unit is used to adapt the target network security event script to the target network topology to complete the network security drill.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, It is characterized in that When the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for imitating, simulating and controlling large-scale network security events
CN101808084A
Electric power information network security situation assessment method and system
CN114066112A
Network security operation model quantitative evaluation system and evaluation method
CN117220978A
Ai-driven defensive cybersecurity strategy analysis and recommendation system
WO2021216163A2
