APT attack behavior detection method and system and readable storage medium
By combining static and dynamic analysis, an SVM model is constructed to detect APT attack behavior, which solves the problem of low detection accuracy in the existing technology, and achieves more efficient APT attack identification and early warning, providing timely information to the security team.
Patent Information
- Application Number
- CN202411213807.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-31
- Publication Date
- 2024-11-01
AI Technical Summary
Existing IDS and IPS have low accuracy in detecting APT attacks, making it difficult to capture and defend against highly concealed attack activities, especially because attackers use escape techniques to circumvent traditional detection.
By combining static analysis and dynamic analysis, abnormal behavior characteristics, behavior sequence characteristics and behavior graph characteristics are constructed, and monitoring data is detected using the SVM model to reduce dependence on rules and improve the ability to identify APT attack behavior.
It improves the accuracy and efficiency of APT intrusion detection, can automatically learn patterns from a large number of behavioral data, identify unknown attack behaviors, reduces dependence on normal samples, and alleviates the problem of unbalanced distribution of training data.
Smart Images

Figure CN118890211A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security protection technology, and in particular to a detection method, system and readable storage medium for APT attack behavior. Background Art
[0002] With the popularization of the Internet and the development of information technology, the transmission of information is increasingly dependent on network systems, making network systems a new target of attack. Some groups use advanced attack methods to carry out long-term, planned attacks on selected targets to steal sensitive information, destroy critical infrastructure, or conduct other malicious activities. This attack mode is called APT attack. The characteristics of APT attacks are their high degree of concealment and persistence. Attackers usually use a variety of technologies and methods to carry out activities at various stages of the network kill chain model, including reconnaissance, weaponization, delivery, exploitation, installation, command and control, and target actions. Since APT attack activities are often targeted at specific targets and are highly customized, they are difficult to be captured by traditional security defense systems.
[0003] Intrusion Detection Systems (IDS) are designed to protect against a variety of network threats, including APT attacks. IDS provides early warning and response to APT attacks by monitoring network traffic and system behavior and analyzing potential malicious activities or security violations. Intrusion Prevention Systems (IPS) go a step further and are not only able to detect malicious activities, but also take proactive measures to block them. When malicious traffic is detected, the IPS immediately intercepts the traffic and prevents it from reaching the target system. This is usually achieved by setting firewall rules or configuring access control lists (ACLs) on network devices. In some cases, the IPS may modify the malicious traffic to remove the malicious content or make it invalid, rendering the traffic harmless before allowing it to reach the target system. In addition to this, the IPS can redirect suspicious traffic to a secure area or honeypot to further analyze the attacker's behavior while protecting the real target system from being affected. Some advanced IPS can automatically apply security patches to fix known vulnerabilities, thereby preventing attackers from exploiting these vulnerabilities to attack. While the IPS is taking action, it also sends alerts to network administrators, informing them of potential security threats and the blocking measures taken.
[0004] However, existing IDS and IPS still have shortcomings in detecting APT attacks. They usually rely on predefined rules, signatures, and behavioral analysis technologies. The effectiveness and accuracy of the two systems depend largely on their configuration and maintenance, as well as the update frequency of the rules and signatures they rely on. Due to the highly concealed nature of APT attacks, attackers will use various evasion techniques (such as zero-day vulnerability exploits, encrypted communications, polymorphism and deformation techniques, etc.) to evade the detection of traditional IDS and IPS, making APT attack activities difficult to capture and defend against. Summary of the invention
[0005] The purpose of this application is to provide a method, system and readable storage medium for detecting APT attack behaviors, aiming to solve the problem that attack activities are difficult to capture and defend against due to low detection accuracy.
[0006] In a first aspect, the present application provides a method for detecting APT attack behavior, the method comprising:
[0007] Collecting behavior data, and performing static analysis on the behavior data to obtain file metadata, and obtaining suspicious files in the behavior data based on the file metadata;
[0008] Performing dynamic analysis on the suspicious file to construct a behavior feature sequence according to the dynamic analysis result, and collecting log data, network flow data, and host data when the suspicious file is run during the dynamic analysis;
[0009] Build abnormal behavior signatures based on log data, network traffic data, and host data;
[0010] A behavior graph feature is constructed according to the behavior feature sequence, and a SVM model is constructed according to the abnormal behavior feature and the behavior graph feature, so as to detect the monitoring data according to the SVM model and obtain a detection result.
[0011] Furthermore, the steps of collecting behavior data, performing static analysis on the behavior data, obtaining file metadata, and obtaining suspicious files in the behavior data according to the file metadata include:
[0012] The file metadata includes file name, file type, size, and hash value;
[0013] Check the API call features, function call features, and exception handling features in the behavior data, and analyze the code logic in the behavior data to identify potential malicious behaviors, including self-replication, data encryption, and network communication, and define the behavior data corresponding to the potential malicious behaviors as suspicious files.
[0014] Furthermore, the steps of dynamically analyzing the suspicious file to construct a behavior feature sequence according to the dynamic analysis result, and collecting log data, network traffic data, and host data when the suspicious file is run during the dynamic analysis include:
[0015] Executing the suspicious file and monitoring the behavior log of the suspicious file when it is running, so as to extract key behavior features according to the behavior log;
[0016] A behavior feature sequence is constructed according to the key behavior feature, and the behavior feature sequence includes a system call sequence, a network request sequence, and a dynamic behavior sequence.
[0017] Furthermore, the step of constructing the behavior graph feature according to the behavior feature sequence includes:
[0018] The system entities are divided into process nodes, file nodes, network nodes and socket nodes, and the system entity types are defined based on the interaction between the entities and the nodes, wherein the system entity types include process-file, process-process, process-network and process-socket;
[0019] Defining system event types, wherein the system event types include process events, file events, and network events;
[0020] The direction of the edge in the behavior graph is determined according to the timestamp and the system call sequence, and a triple including the system entity type, the relationship between the entity pairs, and the system event type is generated to obtain the behavior graph, and the behavior graph feature is generated according to the behavior graph.
[0021] Furthermore, the step of constructing the SVM model according to the abnormal behavior characteristics and behavior graph characteristics includes:
[0022] Generate a behavior sequence feature according to the behavior feature sequence, and construct a feature vector set according to the behavior sequence feature, the behavior graph feature and the abnormal behavior feature;
[0023] A dual objective function of the SVM model is constructed according to the feature vector set, and a training objective of the SVM model is defined as minimizing the value of the dual objective function.
[0024] Furthermore, the step of detecting the monitoring data according to the SVM model to obtain the detection result includes:
[0025] The target behavior data is monitored according to the SVM model to output a determination result of whether the current behavior is an APT attack behavior.
[0026] Furthermore, the step of constructing a dual objective function of the SVM model according to the feature vector set and defining the training objective of the SVM model as minimizing the value of the dual objective function includes:
[0027] The dual objective function is constructed according to the following formula:
[0028]
[0029] Among them, minF represents the value of minimizing the dual objective function, α i represents the Lagrange multiplier of the i-th training sample, α j represents the Lagrange multiplier of the jth training sample, K(x i ,x j ) represents the kernel function, x i represents the i-th eigenvector in the eigenvector set, x j represents the jth eigenvector in the eigenvector set, represents the maximum value used to obtain the Lagrange multiplier, and m represents the total number of training samples;
[0030] The kernel function is calculated according to the following formula:
[0031]
[0032] Among them, σ represents the parameter used to control the influence of each sample on the final kernel function.
[0033] In a second aspect, the present application provides a system for detecting APT attack behaviors, the system comprising:
[0034] A behavior data collection module is used to collect behavior data, perform static analysis on the behavior data, obtain file metadata, and obtain suspicious files in the behavior data based on the file metadata;
[0035] A dynamic analysis module, used to dynamically analyze the suspicious file, to construct a behavior feature sequence according to the dynamic analysis result, and to collect log data, network flow data and host data when the suspicious file is run during the dynamic analysis;
[0036] An abnormal behavior feature construction module is used to construct abnormal behavior features based on log data, network traffic data and host data;
[0037] The data monitoring module is used to construct a behavior graph feature according to a behavior feature sequence, and to construct a SVM model according to the abnormal behavior feature and the behavior graph feature, so as to detect the monitoring data according to the SVM model to obtain a detection result.
[0038] In a third aspect, the present application provides a readable storage medium, wherein the readable storage medium stores one or more programs, which, when executed by a processor, implement the above-mentioned method for detecting APT attack behavior.
[0039] In a fourth aspect, the present application provides a computer device, the computer device comprising a memory and a processor, wherein:
[0040] The memory is used to store computer programs;
[0041] When the processor is used to execute the computer program stored in the memory, the above-mentioned APT attack behavior detection method is implemented.
[0042] Compared with the prior art, this application has the following advantages:
[0043] 1. The embodiment of the present application combines dynamic analysis and static analysis, and uses machine learning algorithms to perform abnormal behavior baseline modeling of system and network behaviors from three aspects: abnormal behavior characteristics, behavior sequence characteristics, and behavior graph characteristics, and associates the results of different detection levels to improve the accuracy of APT intrusion detection evasion technology detection.
[0044] 2. The embodiment of the present application can automatically learn behavior patterns from a large amount of behavior data by building an SVM model to identify APT attack behaviors, reduce reliance on rules, and effectively discover unknown attack behaviors. In addition, by accurately identifying abnormal behaviors such as APT attacks and issuing early warnings, the detection efficiency of APT attack evasion techniques can be improved, providing timely information to the security team.
[0045] 3. The behavior sequence features and behavior graph features obtained by dynamic analysis in the embodiment of the present application can be combined with the abnormal behavior features extracted by static analysis to form a more comprehensive behavior description. This fusion can improve the recognition ability of the constructed SVM model for abnormal behavior (SPT attack behavior), reduce the dependence on a large number of normal samples, and alleviate the problem of unbalanced distribution of training data.
[0046] 4. The embodiment of the present application can effectively reduce the complexity and resource consumption of technical implementation by extracting the structural features of the behavior graph and assisting in establishing a behavior baseline model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of a method for detecting APT attack behavior proposed in one embodiment of the present application;
[0048] Figure 2 This is an overall architecture diagram of the SVM model proposed in one embodiment of the present application;
[0049] Figure 3 A schematic diagram of the structure of an APT attack behavior detection system proposed in an embodiment of the present application.
[0050] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which this application belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0052] Regarding the technical term "static analysis", it refers to the non-running analysis of network traffic or files and codes in the system. It is mainly used for preliminary screening and rapid identification of known threats, such as known malware signatures, code patterns, etc. It can quickly filter out most of the normal traffic and reduce the workload of subsequent analysis.
[0053] Regarding the technical term "dynamic analysis", it means running suspicious code or simulating network traffic in a controlled environment to observe its behavior and reveal behavioral patterns that cannot be detected by static analysis, such as the sequence of system calls during execution, the behavior of network communications, etc. Capturing the actual behavior of malware helps to more accurately identify potential threats. At the same time, dynamic analysis can verify the results of static analysis and provide additional behavioral information.
[0054] Regarding "abnormal behavior detection", it does not rely on known threat features, but refers to discovering potential threats by identifying activities that deviate from normal behavior patterns. Its process mainly includes data collection, feature engineering, model training, and anomaly detection. First, collect data such as network traffic and system logs; then, perform feature engineering to extract key features that can represent normal and abnormal behaviors; then, use machine learning algorithms to train the model to establish a baseline for normal behavior; finally, in real-time monitoring, compare the actual observed behavior with the baseline to detect abnormal behavior. Abnormal behavior detection can help detect new or unknown types of attacks, provide early warnings for unknown threats, and reduce reliance on known threat features. At the same time, abnormal behavior detection serves as the last line of defense to detect abnormal behaviors that are not identified by static and dynamic analysis.
[0055] The applicant found that currently the abnormal behavior detection methods are mainly divided into the following categories: rule-based methods, statistics-based methods, machine learning-based methods and traceability graph-based methods.
[0056] Traditional rule-based network attack detection methods rely heavily on abnormal behavior rules formulated by expert knowledge, which may result in a high false alarm rate due to the rules being too strict or too loose. In addition, this method relies on known attack features and may not be able to effectively detect new or unknown attacks.
[0057] Statistical and machine learning-based methods identify abnormal behaviors by counting and analyzing the characteristics of normal behavior patterns, establish a baseline model of normal behavior through machine learning algorithms (such as support vector machines, random forests, etc.), and monitor the deviation of actual behavior from the baseline to detect abnormal behaviors. However, a common problem faced by abnormal behavior detection models is that the number of normal samples far exceeds that of abnormal samples. This unbalanced data distribution may cause the model to overfit normal behaviors, making it difficult to accurately identify abnormal behaviors in practical applications, especially when faced with complex and diverse normal behaviors.
[0058] The above methods usually do not involve the analysis of network structure information and behavior sequence information, so they lack the ability to learn structure information and sequence information. In addition, these methods do not consider the causal relationship between abnormal behaviors and cannot accurately detect and trace the overall APT attack events. The method based on the traceability graph provides a novel perspective in abnormal behavior detection. It forms a structured network by associating different types of data to help understand the reasons behind abnormal behavior. However, the data integration of constructing the traceability graph is difficult, the knowledge update cost is high, and it requires powerful computing resources to support it, so it is difficult to implement.
[0059] Based on this, the embodiment of the present application proposes a method for detecting APT attack behaviors. According to the characteristics of APT intrusion detection and evasion technology, a static analysis is performed on suspicious files or malicious samples, and then the results of the static analysis are verified by combining dynamic analysis. Starting from the three aspects of abnormal behavior characteristics, behavior sequence characteristics, and behavior graph characteristics, a behavior baseline model is constructed to detect behaviors that deviate from the baseline and score the degree of deviation to determine the degree of abnormality, so as to achieve accurate identification and effective early warning.
[0060] See also Figure 1 , which is a flow chart of a method for detecting APT attack behavior provided by an embodiment of the present application, the method includes steps S101 to S104, wherein:
[0061] Step S101: collecting behavior data, and performing static analysis on the behavior data to obtain file metadata, and obtaining suspicious files in the behavior data according to the file metadata;
[0062] It should be pointed out that in this step, a large amount of historically collected behavior data is statically analyzed to extract file metadata of suspicious files or malicious files in the large amount of behavior data. The file metadata includes file name, file type, size, hash value, etc.
[0063] In addition, during the static analysis process, we will also check whether various files in the behavioral data are encrypted, compressed or obfuscated. Then, we will use disassembly tools (such as IDA Pro, Ghidra, etc.) to convert the binary code into assembly code. We will analyze the assembly code to identify key functions and instructions. We will also check the API calls, function calls, exception handling and other features in the file, analyze the code logic, and identify potential malicious behaviors, such as self-replication, data encryption, network communication, etc. In this way, we can preliminarily screen out suspicious files from massive behavioral data.
[0064] Step S102: dynamically analyzing the suspicious file to construct a behavior feature sequence according to the dynamic analysis result, and collecting log data, network traffic data, and host data when the suspicious file is run during the dynamic analysis;
[0065] It should be noted that during the dynamic analysis process, the suspicious file is first executed in a virtual machine or sandbox and its running behavior is observed. During the running of the suspicious file, all system calls, file operations, network communications and process activities are recorded, and monitoring tools (such as Procmon, Wireshark, etc.) are used to record the runtime behavior. Capture activities such as process creation, file reading / writing, registry modification, network connection, etc.
[0066] Then, the behavior logs of the executable files are analyzed to extract key behavior features, and behavior feature sequences are constructed based on the key behavior features, such as system call sequences, network request sequences, dynamic behavior sequences, etc.
[0067] In addition, dynamic analysis can also detect whether the sample uses escape techniques, such as anti-debugging, anti-sandbox detection, environment check, etc. Record and analyze the specific manifestations and implementation methods of escape techniques. Compare and correlate dynamic analysis results with static analysis results.
[0068] In some embodiments, after obtaining the behavior feature sequence, a behavior sequence feature is also obtained according to the behavior feature sequence. The specific steps are as follows:
[0069] (1) System call sequence characteristics: The operating system log records system call information, including timestamps, the name of the called system call, and parameters. Some system monitoring tools (such as strace, DTrace, etc.) can monitor the system calls of a process at runtime and provide detailed system call sequences. For example, when a malware sample attempts to elevate its privileges, the following system call sequence may occur: NtOpenProcessToken->NtAdjustPrivilegesToken.
[0070] (2) Network request sequence characteristics: When using a network traffic capture tool, the data packets captured contain the requested URL, request method, request header, etc. Firewalls and IDS can also record network request data. A malicious sample may communicate with the command and control (C&C) server through the following sequence: DNS Lookup->HTTP GET->Encrypted TCPSession. It first resolves the address of the C&C server, then obtains instructions through an HTTP GET request, and executes the instructions through an encrypted TCP connection.
[0071] (3) Dynamic behavior sequence characteristics: Execute suspicious files in a sandbox environment and capture their dynamic behaviors during execution, such as process creation, file operations, registry modifications, etc. EDR can also monitor and record dynamic behaviors on power failures, including file operations, network connections, process activities, etc. A malicious sample may establish persistence through the following dynamic behavior sequence: CreateRegistryKey->WriteRegistryValue->CreateService. It first creates a registry key, then writes the relevant value, and finally creates a service to run automatically when the system starts.
[0072] Step S103: construct abnormal behavior features based on log data, network traffic data and host data;
[0073] It can be understood that the abnormal behavior characteristics are mainly completed by collecting log data, network flow data and host data. That is to say, the abnormal behavior characteristics in this embodiment include three types, namely log data, network flow data and host data. The specific construction process is as follows:
[0074] (1) Log data collection: System log files record system events, user activities, error messages, etc. Applications and network services also have their own log files to record related activities.
[0075] (2) Network traffic capture: Use Wireshark, tcpdump, etc. to capture data packets in the network, including source IP and destination IP addresses, port numbers, protocol types, etc. Some network devices such as switches and routers also have built-in traffic capture functions that can monitor and record network traffic.
[0076] (3) Host data capture: System monitoring tools such as Nagios and Zabbix can monitor the performance indicators of the host. Endpoint Detection and Response (EDR) can capture host behavior data such as file operations, process activities, and network connections on the endpoint.
[0077] In addition to collecting the above data, data from multiple sources can also be collected through security information and event management (SIEM) systems or IDS, IPS, etc.
[0078] Step S104: constructing a behavior graph feature according to the behavior feature sequence, and constructing a SVM model according to the abnormal behavior feature and the behavior graph feature, so as to detect the monitoring data according to the SVM model and obtain a detection result.
[0079] In this step, regarding the construction of behavioral graph features, the main focus is on capturing kernel-level system call events by deploying audit event collectors, such as using audit tools such as Windows ETW and Linux Auditd, to collect information including event ID, system call type, timestamp, and system entities involved in the event.
[0080] In some embodiments, in order to construct a behavior graph feature, the system entities are first divided into process nodes, file nodes, network nodes, and socket nodes, and the system entity types are defined based on the interaction between entities and nodes, and the system entity types include process-file, process-process, process-network, and process-socket; then the system event types are defined, and the system event types include process events, file events, and network events; and the direction of the edges in the behavior graph is determined based on the timestamp and the system call sequence, and a triple containing the system entity type, the relationship between entity pairs, and the system event type is generated to obtain a behavior graph, and a behavior graph feature is generated based on the behavior graph.
[0081] As an example but not a limitation, regarding the definition of nodes: system entities are divided into process nodes Process, file nodes File, network nodes Network, and socket nodes Socket. According to the different interactions between entity nodes, system entity type pairs can be summarized as follows: process-file, process-process, process-network, process-socket. The relationship between entity pairs can be execute, read, open, change, connect, etc.
[0082] Regarding the definition of system event types: Based on the collected events, system events are divided into three categories: process events, file events, and network events according to the differences in system event source nodes and target nodes.
[0083] Finally, based on the system entities and system events, the direction of the edge is determined according to information such as timestamps and system call sequences to form triples such as (process A, open, file A), thereby constructing a complete behavior graph.
[0084] In addition, after obtaining the behavior graph, a random walk (such as DeepWalk) method is used to generate a feature embedding vector.
[0085] Furthermore, in some optional embodiments, it is necessary to construct a feature vector set based on the behavior sequence features, behavior graph features and abnormal behavior features, and the feature vector set integrates the results of static analysis, dynamic analysis and abnormal behavior detection; and then construct the dual objective function of the SVM model based on the feature vector set, and define the training objective of the SVM model as minimizing the value of the dual objective function.
[0086] Specifically, in the process of constructing the SVM model, abnormal behavior detection is regarded as a binary classification problem, and the support vector machine (SVM) is used to realize the recognition of abnormal behavior. The training process of SVM is usually completed by solving an optimization problem. For the binary classification problem, the training goal of SVM is to minimize the value of the "dual objective function", that is, to find a hyperplane to split the sample, and the principle of segmentation is to maximize the interval. The specific process is as follows:
[0087] (1) Since SVM may not be able to find a linearly separable hyperplane in the original feature space, it is necessary to use a kernel function to map the feature vector to a higher-dimensional feature space. Here, the Gaussian kernel function K(x i ,x j ) to achieve this process, specifically constructing a suitable kernel function based on the following:
[0088]
[0089] Among them, σ represents the parameter used to control the influence range of each sample on the final kernel function, which should not be too small in actual selection.
[0090] (2) For abnormal behavior detection, the SVM model usually assumes that the data set is nonlinearly separable, because the boundary between normal and abnormal behavior is usually complex and may involve nonlinear relationships between multiple features. For the nonlinearly separable SVM problem, the dual objective function is obtained by applying the Lagrange multiplier method to the original SVM problem, that is:
[0091]
[0092] Among them, minF represents the value of minimizing the dual objective function, α i represents the Lagrange multiplier of the i-th training sample, α j represents the Lagrange multiplier of the jth training sample, K(x i ,x j ) represents the calculation result of the kernel function, which is used to calculate the similarity between support vectors in the high-dimensional feature space. i represents the i-th eigenvector in the eigenvector set, x j represents the jth eigenvector in the eigenvector set, represents the maximum value used to obtain the Lagrange multiplier, and m represents the total number of training samples;
[0093] It should be noted that when the value of the dual objective function reaches the minimum, it means that the optimization problem has found the optimal solution, the model has converged, and the SVM training is completed. At this time, the target behavior data is monitored according to the SVM model to output the judgment result of whether the current behavior is an APT attack behavior.
[0094] In some optional embodiments, after the judgment results of the monitoring data are output, the results of static analysis, dynamic analysis, and abnormal behavior detection can be combined to generate a clear and readable analysis report for the user.
[0095] In summary, the above-mentioned APT attack behavior detection method has the following advantages:
[0096] 1. The embodiment of the present application combines dynamic analysis and static analysis, and uses machine learning algorithms to perform abnormal behavior baseline modeling of system and network behaviors from three aspects: abnormal behavior characteristics, behavior sequence characteristics, and behavior graph characteristics, and associates the results of different detection levels to improve the accuracy of APT intrusion detection evasion technology detection.
[0097] 2. The embodiment of the present application can automatically learn behavior patterns from a large amount of behavior data by building an SVM model to identify APT attack behaviors, reduce reliance on rules, and effectively discover unknown attack behaviors. In addition, by accurately identifying abnormal behaviors such as APT attacks and issuing early warnings, the detection efficiency of APT attack evasion techniques can be improved, providing timely information to the security team.
[0098] 3. The behavior sequence features and behavior graph features obtained by dynamic analysis in the embodiment of the present application can be combined with the abnormal behavior features extracted by static analysis to form a more comprehensive behavior description. This fusion can improve the recognition ability of the constructed SVM model for abnormal behavior (SPT attack behavior), reduce the dependence on a large number of normal samples, and alleviate the problem of unbalanced distribution of training data.
[0099] 4. The embodiment of the present application can effectively reduce the complexity and resource consumption of technical implementation by extracting the structural features of the behavior graph and assisting in establishing a behavior baseline model.
[0100] See also Figure 3 , which is a schematic diagram of the structure of a detection system for APT attack behavior in an embodiment of the present application, the system includes:
[0101] The behavior data collection module 10 is used to collect behavior data, perform static analysis on the behavior data, obtain file metadata, and obtain suspicious files in the behavior data according to the file metadata;
[0102] A dynamic analysis module 20, configured to dynamically analyze the suspicious file, to construct a behavior feature sequence according to the dynamic analysis result, and to collect log data, network flow data, and host data when the suspicious file is run during the dynamic analysis;
[0103] An abnormal behavior feature construction module 30, used to construct abnormal behavior features based on log data, network traffic data and host data;
[0104] The data monitoring module 40 is used to construct a behavior graph feature according to the behavior feature sequence, and to construct a SVM model according to the abnormal behavior feature and the behavior graph feature, so as to detect the monitoring data according to the SVM model to obtain a detection result.
[0105] On the other hand, the present application also proposes a readable storage medium on which one or more programs are stored, and when the program is executed by a processor, the above-mentioned APT attack behavior detection method is implemented.
[0106] On the other hand, the present application also proposes a computer device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the above-mentioned APT attack behavior detection method.
[0107] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0108] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0109] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0110] Although the embodiments of the present application are described in detail above, it is obvious to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations are within the scope and spirit of the present application as described in the claims. Moreover, the present application described herein may have other embodiments and may be implemented or realized in a variety of ways.
Claims
1. A method for detecting APT attack behavior, characterized in that: The method comprises: Collecting behavior data, and performing static analysis on the behavior data to obtain file metadata, and obtaining suspicious files in the behavior data based on the file metadata; Performing dynamic analysis on the suspicious file to construct a behavior feature sequence according to the dynamic analysis result, and collecting log data, network flow data, and host data when the suspicious file is run during the dynamic analysis; Build abnormal behavior signatures based on log data, network traffic data, and host data; A behavior graph feature is constructed according to the behavior feature sequence, and a SVM model is constructed according to the abnormal behavior feature and the behavior graph feature, so as to detect the monitoring data according to the SVM model and obtain a detection result.
2. The method for detecting APT attack behavior according to claim 1, characterized in that: The steps of collecting behavior data, performing static analysis on the behavior data, obtaining file metadata, and obtaining suspicious files in the behavior data according to the file metadata include: The file metadata includes file name, file type, size, and hash value; Check the API call features, function call features, and exception handling features in the behavior data, and analyze the code logic in the behavior data to identify potential malicious behaviors, including self-replication, data encryption, and network communication, and define the behavior data corresponding to the potential malicious behaviors as suspicious files.
3. The method for detecting APT attack behavior according to claim 2, characterized in that: The steps of dynamically analyzing the suspicious file to construct a behavior feature sequence according to the dynamic analysis result, and collecting log data, network traffic data, and host data when the suspicious file is run during the dynamic analysis include: Executing the suspicious file and monitoring the behavior log of the suspicious file when it is running, so as to extract key behavior features according to the behavior log; A behavior feature sequence is constructed according to the key behavior feature, and the behavior feature sequence includes a system call sequence, a network request sequence, and a dynamic behavior sequence.
4. The method for detecting APT attack behavior according to claim 3, characterized in that: The step of constructing behavior graph features according to the behavior feature sequence comprises: The system entities are divided into process nodes, file nodes, network nodes and socket nodes, and the system entity types are defined based on the interaction between the entities and the nodes, wherein the system entity types include process-file, process-process, process-network and process-socket; Defining system event types, wherein the system event types include process events, file events, and network events; The direction of the edge in the behavior graph is determined according to the timestamp and the system call sequence, and a triple including the system entity type, the relationship between the entity pairs, and the system event type is generated to obtain the behavior graph, and the behavior graph feature is generated according to the behavior graph.
5. The method for detecting APT attack behavior according to claim 4, characterized in that: The step of constructing the SVM model according to the abnormal behavior characteristics and behavior graph characteristics comprises: Generate a behavior sequence feature according to the behavior feature sequence, and construct a feature vector set according to the behavior sequence feature, the behavior graph feature and the abnormal behavior feature; A dual objective function of the SVM model is constructed according to the feature vector set, and a training objective of the SVM model is defined as minimizing the value of the dual objective function.
6. The method for detecting APT attack behavior according to claim 5, characterized in that: The step of detecting the monitoring data according to the SVM model to obtain the detection result comprises: The target behavior data is monitored according to the SVM model to output a determination result of whether the current behavior is an APT attack behavior.
7. The method for detecting APT attack behavior according to claim 5, characterized in that: The step of constructing a dual objective function of the SVM model according to the feature vector set and defining the training objective of the SVM model as minimizing the value of the dual objective function comprises: The dual objective function is constructed according to the following formula: Among them, minF represents the value of minimizing the dual objective function, α i represents the Lagrange multiplier of the i-th training sample, α j represents the Lagrange multiplier of the jth training sample, K(x i ,x j ) represents the kernel function, x i represents the i-th eigenvector in the eigenvector set, x j represents the jth eigenvector in the eigenvector set, maxα represents the maximum value used to obtain the Lagrange multiplier, and m represents the total number of training samples; The kernel function is calculated according to the following formula: Among them, σ represents the parameter used to control the influence of each sample on the final kernel function.
8. A detection system for APT attack behavior, characterized in that: The system comprises: A behavior data collection module is used to collect behavior data, perform static analysis on the behavior data, obtain file metadata, and obtain suspicious files in the behavior data based on the file metadata; A dynamic analysis module, used to dynamically analyze the suspicious file, to construct a behavior feature sequence according to the dynamic analysis result, and to collect log data, network flow data and host data when the suspicious file is run during the dynamic analysis; An abnormal behavior feature construction module is used to construct abnormal behavior features based on log data, network traffic data and host data; The data monitoring module is used to construct a behavior graph feature according to a behavior feature sequence, and to construct a SVM model according to the abnormal behavior feature and the behavior graph feature, so as to detect the monitoring data according to the SVM model to obtain a detection result.
9. A readable storage medium storing one or more programs, which, when executed by a processor, implements the method for detecting APT attack behaviors according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, wherein: The memory is used to store computer programs; When the processor is used to execute the computer program stored in the memory, it implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
A method for constructing a traceability graph between devices based on real-time analysis of communication requests
CN119766707A
Attack detection method, device, equipment and program product
CN120750635A
