Automatic attack chain data generation and acquisition method based on TTPs script

Generate APT attack chain data through an automated method based on TTPs scripts, solving the problems of insufficient data and limitations of automated generation methods in the existing technology, realizing the consistency and authenticity of the attack chain, and simplifying the detection process.

CN119094198AActive Publication Date: 2024-12-06ZHEJIANG UNIV OF TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411201768.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

Due to the lack of sufficient data and single attack type, the existing APT attack detection methods have limited data volume and insufficient generalization capabilities. The existing automated attack chain generation methods rely on manual operations, which are time-consuming and labor-intensive, making it difficult to determine the attack. The consistency of delay and attack chains.

Method used

The attack chain is constructed using an automated method based on TTPs scripts. By obtaining known TTPs attack steps, sorting them to form a TTPs array, matching technical and tactical execution script library, supplementing unmatched steps, setting script parameters and delays, and generating the final attack chain script. And perform data acquisition in an isolated environment.

Benefits of technology

It realizes the automatic generation of attack data, provides standard reference basis, enhances the consistency and authenticity of the attack chain, simplifies research work, and reduces the errors and time-consuming of manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094198A_ABST
    Figure CN119094198A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network security, and discloses a TTPs script-based attack chain data automatic generation and acquisition method, which comprises the following steps of: obtaining TTPs attack steps and sorting in a time sequence to obtain a TTPs array; matching the TTPs array with a known technique and tactics execution script library, and extracting TTPs scripts in the technique and tactics execution script library if matching succeeds; if the matching is not successful, marking or generating a TTPs script according to a preset supplementary measure; according to the IOC library, script parameters are set for each TTPs script, a dependency relationship is established, and delay time is randomly generated for each TTPs script within a preset delay reasonable range; and inputting the final attack chain script into an isolation environment for execution, and collecting data in the whole execution process as a final automatically generated real attack chain data set. Attack chain execution data is obtained in an automatic execution mode, and the formed data can be provided for scientific research and research and development function simulation verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security, and in particular to a method for automatically building an attack chain by using a TTPs (Tactics, Techniques and Procedures) script and generating data by running the attack chain. Background Art

[0002] APT attacks (Advanced Persistent Threat) refer to persistent and effective attacks against specific targets. This type of attack is highly concealed and targeted, and attackers usually use various infected media, supply chains, social engineering and other means to implement advanced, persistent and effective threats and attacks.

[0003] In order to better analyze and understand this complex attack behavior, the industry has launched the ATT&CK model of APT. This model further constructs a tactical and technical matrix by finding common points in attack behaviors, providing a reference for more detailed attack behavior analysis. The ATT&CK model covers the technical and tactical matrices in three areas: enterprise, mobile phones, and ICS (Industrial Control Systems). It contains 14 tactical stages, covering 202 technologies, 435 sub-techniques, and various implementation references. These tactics, techniques, and processes simulate different stages and methods of attack behaviors, which helps to identify and analyze attack behaviors.

[0004] However, in the current APT attack detection, although the ATT&CK model provides a reference for APT attack behaviors, data-driven detection methods still face some challenges. One of them is the lack of sufficient data for model training. Due to the concealment and targeting of APT attacks, attack capture becomes difficult, resulting in a limited amount of data available for model training. In addition, the single attack type or lack of attack behavior also limits the generalization ability of the model. Summary of the invention

[0005] The purpose of the present invention is to provide a method for automatically generating and collecting attack chain data based on TTPs scripts, which uses an automated execution method to obtain attack chain execution data, and the generated data can be used for scientific research and R&D function simulation verification.

[0006] To achieve the above object, the technical solution adopted by the present invention is: A method for automatically generating and collecting attack chain data based on a TTPs script, the method comprising: 1) TTPs attack process construction: obtain known TTPs attack steps, sort the TTPs attack steps belonging to the same attack behavior in chronological order, and obtain the TTPs array of the corresponding attack behavior; 2) Attack chain script generation: Match each TTPs attack step in the TTPs array with the known technical and tactical execution script library. For the successfully matched TTPs attack steps, extract the successfully matched TTPs scripts in the technical and tactical execution script library; for the unmatched TTPs attack steps, mark or generate TTPs scripts according to the preset supplementary measures to obtain the primary attack chain script; 3) Improve the attack chain script: Set script parameters and establish dependencies for each TTPs script in the primary attack chain script according to the IOC library, and randomly generate a delay time for each TTPs script within a preset reasonable delay range to obtain the final attack chain script; 4) Data collection: The final attack chain script is input into the isolated environment for execution, and the data of the entire execution process is collected as the final automatically generated real attack chain data set.

[0007] Several optional methods are also provided below, but they are not intended to be additional limitations on the above-mentioned overall solution, but are merely further supplements or preferences. Under the premise that there are no technical or logical contradictions, each optional method can be combined with the above-mentioned overall solution separately, and multiple optional methods can also be combined.

[0008] Preferably, the TTPs attack process construction further includes: According to actual attack cases, TTPs attack steps are supplemented between the incoherent TTPs attack steps in the time sequence sorting.

[0009] Preferably, the TTPs attack process construction further includes: Check the TTPs array corresponding to each attack behavior and delete repeated and redundant TTPs attack steps in the TTPs array.

[0010] Preferably, the supplementary measures include automatic replacement, scripting, and deletion marking; The automatic replacement includes: for the TTPs attack step that fails to match successfully, searching for all technologies under the tactics to which it belongs according to the TTPs attack step, selecting a technology in the technology and tactics execution script library from all the technologies to replace the original technology, and extracting the TTPs script corresponding to the replaced technology in the technology and tactics execution script library; if there is no replacement technology, adding the TTPs attack step to the manually designed queue; The script design includes: reading TTPs attack steps from the artificially designed queue and generating TTPs scripts based on expert experience; The deletion mark includes: setting a deletion mark for a TTPs attack step in a manually designed queue that cannot generate a TTPs script through script design.

[0011] Preferably, the step of setting script parameters and establishing dependencies for each TTPs script in the primary attack chain script according to the IOC library includes: Set script parameters for TTPs scripts based on sensitive domain names and sensitive files stored in the IOC library; According to the script parameters of the previous and next TTPs scripts, the operation objects in the script parameters are unified to complete the establishment of dependency associations between the TTPs scripts.

[0012] Preferably, the running time of the TTPs script is the sum of the actual execution time and the delay time, and the running time of the attack chain script is the sum of the running times of all the included TTPs scripts.

[0013] At present, there is no complete attack chain data set and collection method, and the existing attack chain simulation method relies on manual operation, which is time-consuming and labor-intensive, and is prone to omission errors. The existing automated attack chain generation method has certain limitations, and it is difficult to determine the attack delay, and the continuity of the attack chain is broken. Therefore, the present invention provides an automatic generation and collection method of attack chain data based on TTPs scripts, which collects existing attack information to form attack steps; matches the script library based on the attack steps to obtain a primary attack script composed of a single executable script; combines the IOC (Indicators of Compromise, compromise indicators or intrusion indicators) library to improve the association of individual executable scripts to obtain a complete attack link script. The present invention has the following beneficial effects:

[0014] (1) By recording the running time of a single TTPs script and summarizing the running time range of a single script, the existence range of attack data is provided, providing a standard reference basis for the application.

[0015] (2) Use the intrusion indicator IOC to associate the scripts contained in the attack chain to make the generated attack chain more coherent and facilitate subsequent research work.

[0016] (3) The introduction of delay and conditional judgment mechanisms makes the attack chain simulation more consistent with real-world attack behaviors and indicates the authenticity of the simulated attack. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flow chart of a method for automatically generating and collecting attack chain data based on TTPs scripts of the present invention; Figure 2 An example diagram of the contents after the temporal relationship is constructed for the attack activities of the present invention; Figure 3 This is an example diagram of the matching between the TTPs attack steps and the technical and tactical execution script library of the present invention; Figure 4 Supplement the example diagram of the attack steps of the unmatched TTPs for the attack activities of the present invention; Figure 5 This is an example diagram of an attack chain script associating multiple TTPs scripts within it based on the IOC library. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0020] In order to overcome the defects of the prior art, this embodiment provides an automated attack chain data generation method based on TTPs scripts, such as Figure 1 As shown, the following steps are included: (1) Construction of TTPs attack process: Crawl known TTPs attack steps from public channels such as the Internet and threat intelligence, and supplement TTPs attack steps based on actual attack cases.

[0021] (1-1) Acquisition of known TTPs attack steps: Collect information related to known attack chains from publicly available information security knowledge bases and data sets (such as MITRE ATT&CK) such as network and threat intelligence. Search for various attack activities such as phishing and website attacks to obtain a detailed TTPs step description of each attack behavior, that is, the TTPs attack steps.

[0022] Since an attack behavior is composed of multiple tactical stages, one or more technologies in the tactical stages are selected to achieve the tactical goals. Therefore, when recording and describing the TTPs attack steps of an attack behavior, not only the TTP number (technical number) and TTP execution description used are recorded, but also the tactical stage and technical category to which the TTP belongs. Taking the C0011 attack activity published by ATT&CK as an example, the attack has multiple operations and involves multiple tactical stages. The following core information can be recorded, as shown in Table 1.

[0023] Table 1 C0011 attack activities field Technical No. Technology Name Tactical Phase TTP Execution Description enterprise T1583.001 Get Infrastructure: Domain Resource Development The registered domains may be related to the targeting of students in India enterprise T1059.005 Command and script interpreter: Visual Basic Execution Malicious VBA macros were used in lure documents as part of the process of installing the Crimson malware onto infected hosts. enterprise T1587.003 Development capabilities: digital certificates Resource Development An SSL certificate was established on a misspelled domain name registered by the organization. enterprise T1566.002 Phishing: Phishing links Initial Access Emails containing malicious links targeting Indian students were sent. enterprise T1608.001 Stage Function: Upload Malware Resource Development Hosting malicious documents on domains registered to the organization. enterprise T1204.001 User Execution: Malicious Links Execution Relying on student targets to click on malicious links sent via email.

[0024] (1-2) Establishing the timing relationship of TTPs: For each TTP execution description attack step obtained in step (1-1), organize them based on the TTP execution description in Table 1 and the dependency relationship of the reference TTPs for tactical execution in the ATT&CK model (including additions, deletions, and arbitrary adjustments), and standardize them into a TTPs array in timing order to supplement the attack step description in (1-1).

[0025] like Figure 2 As shown, for the attack description of C0011 in step (1-1), combined with the tactical stage, for example, the tactical stage of resource development is the precursor of the initial access stage, the following TTPs array [T1583.001, T1587.003, T1608.001, T1566.002, T1204.001, T1059.005] can be established to supplement the attack step description of (1-1). In actual operation, the TTPs array is only transmitted with the technology number, because the technology number is uniquely corresponding to other information, so the array can only contain the technology number. In other embodiments, other information corresponding to the technology number can also be supplemented to the TTPs array according to needs.

[0026] (1-3) Attack behavior supplement: In order to improve the consistency of the attack chain, this embodiment also supports judging whether there are incoherent TTPs attack steps based on actual attack incident cases and expert experience, and supplementing TTPs attack steps between incoherent TTPs attack steps. For example, in combination with database intrusion cases, database intrusion attack techniques are added to the TTPs attack steps, and the attack activities are recorded in a formalized description of the attack activities in step (1-1).

[0027] (1-4) Attack behavior check: Check the TTPs array of each attack behavior and delete repeated and redundant steps to obtain a TTPs-based attack activity database, that is, a set of attack step descriptions.

[0028] (2) Attack chain script generation: sort out the various TTPs attack steps collected, match them with the existing technical and tactical execution script library to implement context binding, and build a primary attack chain script based on the executable TTPs script.

[0029] (2-1) Matching TTPs scripts: Based on the attack activity database obtained in (1), match the TTPs attack steps involved in the attack behavior, select the relevant TTPs attack steps that have been implemented in the existing technical and tactical attack behavior script library, extract the TTPs scripts corresponding to the TTPs attack steps that successfully match the technical and tactical attack behavior script library, and fill in its precondition setting TTPs script to obtain the primary attack chain script.

[0030] like Figure 3 As shown, taking attack behavior C0011 as an example, each TTPs attack step in the TTPs array in the attack step description of attack behavior C0011 is matched with the existing TTPs script implemented in the technical and tactical execution script library. It can be found that there are TTPs scripts for the two technologies T1059.005 and T1608.001. Then, the execution command, parameters and other information of this TTPs script are filled into the attack chain script.

[0031] When matching, the technical number in the TTPs array is matched with the technical number in the technical and tactical execution script library. If the technical number in the TTPs array exists in the technical and tactical execution script library, the match is successful, and the TTPs script corresponding to the successfully matched technical number in the technical and tactical execution script library is extracted to the corresponding TTPs attack step in the TTPs array, and then an attack chain is formed according to the timing sequence of the TTPs array.

[0032] The operation of TTPs scripts depends on the environment. The prerequisite is the prerequisite step required for the script to run. The extraction of the prerequisite is related to the setting of the technical and tactical execution script library. The script can be extracted according to the technical and tactical execution script library and filled with its prerequisite setting script.

[0033] (2-2) Supplementing unmatched scripts: For the unmatched TTPs attack steps, three measures are used to supplement the unmatched scripts, namely automatic replacement, script design and deletion mark.

[0034] Automatic replacement: Based on the description of the TTPs attack step in step (1), search for replaceable sub-techniques for the techniques of the tactics to which the unmatched TTPs attack steps belong, select other scripts of the technique in the technique and tactic execution script library to replace the required TTPs script, replace the technique number in the TTPs array, and update the primary attack chain script; if there are TTPs attack steps that cannot be replaced, add the TTPs attack step to the manual design queue.

[0035] Script design: The missing TTPs attack steps that have not been successfully replaced are obtained from the manually designed queue. Security personnel design TTPs scripts based on experience and the description of the missing TTPs scripts and update the primary attack chain script.

[0036] Deletion mark: If the TTPs script cannot be designed due to some reasons (such as environment, equipment, expert experience, etc.), a deletion mark is set.

[0037] like Figure 4 As shown in the figure, for the technologies that the attack behavior C0011 fails to match (T1583.001, T158.003, T1608.001, T1204.001), taking T1566.002 as an example, the automatic replacement operation is first used to find that the tactical phase (initial access) of the sub-technology T1566.002 belongs to the technical phishing T1566, which has 4 replaceable sub-techniques. Among them, although the phishing link T1566.002 is not implemented in the script library, the phishing attachment T1566.001 has been implemented, so the link method can be replaced, that is, the T1566.001 technology is used to replace the T1566.002 technology; similarly, T1204.001 is also replaced with T1204.002 based on this. At this point, the TTPs script sequence of C0011 is updated to [T1583.001, T1587.003, T1608.001, T1566.001, T1204.002, T1059.005].

[0038] Taking T1583.001 as an example, if the technical and tactical script library does not have the relevant technical implementation of the technical acquisition infrastructure (T1583) under the tactical phase (resource development) to which it belongs, it will be added to the manual design queue and enter the script design phase. Security personnel will design the technical implementation of T1583.001 and add it to the technical and tactical execution script library, and also add the TTPs script of the T1583.001 technology of the C0011 attack chain script.

[0039] (2-3) Construction of attack chain script: Scan and delete the TTPs attack steps with deletion marks in the TTPs array, build a primary attack chain script that can be executed by a single TTPs, and annotate the script.

[0040] (3) Improvement of attack chain scripts: Considering the delay of real attacks, the same entity must be used to associate scripts in different steps. By analyzing the entity, that is, the IOC library, the various TTPs scripts in the attack chain are further associated to form a more complete attack chain script.

[0041] (3-1) TTPs script association: For the TTPs script in the primary attack chain script formed in step (2-3), combine the IOC library and the TTPs script parameters, associate the dependencies of each script based on the IOC library, and optimize the association by modifying the TTPs script parameters.

[0042] like Figure 5As shown in the figure, it is the attack chain script corresponding to the attack behavior C0011 after step (2). The description in the figure is the Chinese description of the script, where {xx} is the script parameter. The script parameters are set in combination with the sensitive domain names and sensitive files stored in the IOC library. For example, T1583.001 and T1587.003 in the figure both act on {URL domain name}; and the associated execution script is mainly aimed at the unification of the operation object (i.e. the parameters in the TTPs script, such as the local address and remote address after the scp instruction). Specifically, according to the script parameters of the previous and next TTPs scripts, the operation objects in the script parameters are unified, and the establishment of dependent associations between TTPs scripts is completed. For example, in the figure, the script parameter of T1608.001 is {malicious file}, and the original script parameter of T1566.001 is {malicious link}. By associating the previous and next TTPs scripts, the original script parameter of T1566.001 is unified as {malicious file}. After setting, the scripts act on the domain name together, and a connection is generated during the execution of the behavior.

[0043] (3-2) Setting the running time of each TTPs script: Based on the primary attack chain script obtained in step (2), for each TTPs script, consider the maximum and minimum delays (i.e., the preset reasonable delay range) and set a random delay time for it; the running time of the TTPs script is the sum of the actual execution time and the delay time.

[0044] (3-3) Set the running time of each attack chain script: The running time of the attack chain script is the sum of the running times of all the TTPs scripts it contains.

[0045] (3-4) Attack chain script optimization: The attack chain script can be further optimized as needed. Based on the experience of network security personnel, logical codes such as conditional judgment and error handling during the script running process are added to finally form a final attack chain script that is more efficient and closer to the actual attack behavior. This step is performed by network security personnel according to business needs.

[0046] (4) Data collection: The optimized attack chain script is sent to an isolated environment for execution, and detailed data from the entire attack process is automatically collected as the final automatically generated real attack chain data set.

[0047] (4-1) Environment construction: Build an isolated and monitored environment, that is, a virtual target machine, and deploy data monitoring and collection components on the target machine to monitor execution activities.

[0048] (4-2) Attack chain script execution: The final attack chain script obtained in step (3) is uploaded to the control end, triggering the control end to automatically execute the attack chain script. The system monitoring and acquisition component collects system events of the target machine in real time during the script execution.

[0049] (4-3) Repeat (4-2) multiple times to continuously enrich and improve the final attack chain dataset.

[0050] In another embodiment, the present invention also provides an automatic generation and collection device for attack chain data based on TTPs scripts, including a processor and a memory storing a plurality of computer instructions, wherein the computer instructions, when executed by the processor, implement the steps of the automatic generation and collection method for attack chain data based on TTPs scripts.

[0051] For the specific limitations of the automatic generation and collection device of attack chain data based on TTPs scripts, please refer to the limitations of the automatic generation and collection method of attack chain data based on TTPs scripts above, which will not be repeated here.

[0052] The memory and the processor are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory stores a computer program that can be run on the processor, and the processor implements the method of the present invention by running the computer program stored in the memory.

[0053] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory is used to store a program, and the processor executes the program after receiving an execution instruction.

[0054] The processor may be an integrated circuit chip with data processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0055] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0056] The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A method for automatically generating and collecting attack chain data based on TTPs scripts. It is characterized in that The attack chain data automatic generation and collection method based on TTPs scripts includes: TTPs attack process construction: Get the known TTPs attack steps, sort the TTPs attack steps belonging to the same attack behavior in chronological order, and get the TTPs array of the corresponding attack behavior; Attack chain script generation: Match each TTPs attack step in the TTPs array with the known technical and tactical execution script library. For the successfully matched TTPs attack steps, extract the successfully matched TTPs scripts in the technical and tactical execution script library; for the unsuccessful matched TTPs attack steps, mark or generate TTPs scripts according to the preset supplementary measures to obtain the primary attack chain script; Improve the attack chain script: Set script parameters and establish dependencies for each TTPs script in the primary attack chain script according to the IOC library, and randomly generate a delay time for each TTPs script within a preset reasonable delay range to obtain the final attack chain script; Data collection: The final attack chain script is input into the isolated environment for execution, and the data of the entire execution process is collected as the final automatically generated real attack chain data set.

2. The method for automatically generating and collecting attack chain data based on TTPs scripts according to claim 1, It is characterized in that The TTPs attack process construction also includes: According to actual attack cases, TTPs attack steps are supplemented between the incoherent TTPs attack steps in the time sequence sorting.

3. The method for automatically generating and collecting attack chain data based on TTPs scripts according to claim 1, It is characterized in that The TTPs attack process construction also includes: Check the TTPs array corresponding to each attack behavior and delete repeated and redundant TTPs attack steps in the TTPs array.

4. The method for automatically generating and collecting attack chain data based on TTPs scripts according to claim 1, It is characterized in that Said supplementary measures include automatic replacement, scripting, and removal of tags; The automatic replacement includes: for the TTPs attack step that fails to match successfully, searching for all technologies under the tactics to which it belongs according to the TTPs attack step, selecting a technology in the technology and tactics execution script library from all the technologies to replace the original technology, and extracting the TTPs script corresponding to the replaced technology in the technology and tactics execution script library; if there is no replacement technology, adding the TTPs attack step to the manually designed queue; The script design includes: reading TTPs attack steps from the artificially designed queue and generating TTPs scripts based on expert experience; The deletion mark includes: setting a deletion mark for a TTPs attack step in a manually designed queue that cannot generate a TTPs script through script design.

5. The method for automatically generating and collecting attack chain data based on TTPs scripts according to claim 1, It is characterized in that The script parameters are set and dependencies are established for each TTPs script in the primary attack chain script according to the IOC library, including: Set script parameters for TTPs scripts based on sensitive domain names and sensitive files stored in the IOC library; According to the script parameters of the previous and next TTPs scripts, the operation objects in the script parameters are unified to complete the establishment of dependency associations between the TTPs scripts.

6. The method for automatically generating and collecting attack chain data based on TTPs scripts according to claim 1, It is characterized in that The running time of the TTPs script is the sum of the actual execution time and the delay time, and the running time of the attack chain script is the sum of the running times of all the included TTPs scripts.

Citation Information

Patent Citations

  • Attack organization traceability analysis method and device and storage medium

    CN111030986A

  • Behavior prediction method and device, electronic equipment and computer readable storage medium

    CN114301699A

  • Automatic attack script library updating method, system and equipment based on machine learning

    CN118199952A

  • Attack scenario generation device and attack scenario generation method

    JP2022179929A