APT attack detection method based on malicious intention representation diagram
By constructing a malicious intent graph characterization graph and combining a variational autoencoder model, the problems of high false alarm rate and false alarm rate in traditional APT attack detection methods are solved, more accurate abnormal detection is achieved, false alarm rate is reduced, and the false alarm rate is improved. Detection efficiency.
Patent Information
- Application Number
- CN202411159486.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Traditional APT attack detection methods have problems with high false alarm rates and missed alarm rates, and it is difficult to effectively detect unknown zero-day vulnerabilities and imitation attacks.
Using the detection method based on malicious intent graph characterization graph, the system traceability event flow is converted into nodes and edges by constructing a knowledge graph, and the malicious intent labels are assigned. The WL graph kernel method is used to extract the structural features and malicious intent features of nodes, and the variable segmentation is used. The autoencoder model performs abnormal detection.
By integrating structural features and malicious intent features, the false positive rate is reduced, the detection effect is improved, the model is lighter, the detection efficiency is higher, and abnormal nodes can be more accurately identified.
Smart Images

Figure CN119051935A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network security, and in particular relates to an APT attack detection method based on a malicious intent representation graph. Background Art
[0002] In recent years, security threats against large enterprises have been escalating, among which the most representative are advanced persistent threats (APTs) carried out by skilled attackers with complex network capabilities. Such attacks are tightly organized and have clear goals, frequently exploit zero-day vulnerabilities, and adopt a "slow and low-key" attack mode. Once the attack is successful, it will cause serious economic losses and political harm.
[0003] Traditional attack investigation methods often make it difficult to make attack judgments due to insufficient evidence. In order to combat these threats, attack events must be accurately located for attack investigation. The research community has proposed data provenance technology, which uses a provenance graph that describes the execution history of the system to browse audit records. The rich context in the provenance data enables analysts to perform causal analysis of system activities to detect intrusions, track interdependencies, and understand security events. A large number of detection systems have been generated based on provenance graphs. Currently, the most common ones can be divided into two categories: rule-based IDS and learning-based IDS. Rule-based detection systems perform detection by formulating rules. The main idea is to use threat knowledge to formulate rules. Once a behavior violates the rules, it is considered an anomaly. Learning-based detection systems perform anomaly detection by learning benign behavior patterns in the system. The main idea is that malicious behavior often has a large difference compared to benign behavior in the system. The system's benign behavior is modeled to detect its behavioral deviation. If the deviation exceeds a given condition, it is considered an anomaly. Although learning-based detection methods have achieved great success in detecting unknown zero-day vulnerabilities, it can be observed that this detection method is prone to a large number of false positives and is easily affected by imitation attacks.
[0004] In order to make the traceability graph applicable to machine learning modeling, most of the current detection systems encode the graph / path / node into a fixed-length vector representation based on the structural information around it. Anomaly detection is performed by modeling the benign behavior patterns of the learning system. The basic idea of this detection method is that the behavioral characteristics of the attack graph / attack path / attack node must be different from the behavioral characteristics of the benign graph / benign path / benign node. From the perspective of modeling, that is to say, the structural characteristics of the related attack graph / attack path / attack node must also be different from those of the benign node. However, it is well known that normal behavior cannot be completely learned. Once unlearned benign behavior appears, the detection system will also sound an alarm. This is the reason why traditional intrusion detection methods have many false alarms. Summary of the invention
[0005] The purpose of the present invention is to solve the problems of high false alarm rate and high missed alarm rate in traditional detection methods, and propose an APT attack detection method based on malicious intent characterization graph.
[0006] In order to achieve the above object, the technical solution provided by the present invention is: An APT attack detection method based on a malicious intent representation graph includes: Collect system traceability event streams, convert them into nodes and edges and build a knowledge graph. According to the node behavior and label transfer rules, assign corresponding malicious intent labels to the nodes, and use the knowledge graph and malicious intent labels to build a malicious intent representation graph. The WL graph kernel method is used to extract the structural features of the nodes, and the malicious intent features of the nodes are extracted based on the malicious intent labels; The structural features and malicious intent features of each node are normalized and concatenated to obtain fused features, which are then input into the variational autoencoder model to obtain reconstructed features. The fused features are compared with the reconstructed features using cosine similarity. When the difference is greater than the preset abnormal threshold, the current node is an abnormal node. When the difference is less than or equal to the preset abnormal threshold, the current node is a benign node.
[0007] Furthermore, the system traceability event stream is collected, the system traceability event stream is converted into nodes and edges and a knowledge graph is constructed, corresponding malicious intent labels are assigned to the nodes according to the node behavior and label transfer rules, and a malicious intent representation graph is constructed using the knowledge graph and labels, including: Collect system traceability event streams to build a knowledge graph. When an event has not been recorded, add the source node and target node to the knowledge graph as new nodes, assign corresponding timestamps and attribute information to the new nodes, and create an edge for the new nodes. When the number of nodes in the knowledge graph reaches a first preset number, the construction of the knowledge graph is completed; Continue to collect system traceability event streams. If the source node or target node of a new event is a node connected to a node in the knowledge graph, add the source node or target node to the knowledge graph and assign a corresponding malicious intent label to the source node or target node of the new event according to the label transfer rule. If the source node or target node of a new event is a node not connected to a node in the knowledge graph, use it to construct a new knowledge graph. When the number of nodes in the knowledge graph reaches a second preset number, a malicious intent representation graph is generated.
[0008] Furthermore, the use of the WL graph kernel method to extract the structural features of the node includes: The node type is used as the node type label, and the event type is used as the edge type label; For each node, the WL graph kernel method is used to obtain the new type label of the current node according to the type label of the current node and the type labels of the edges and nodes connected to the current node in chronological order, and the type label of each node is updated a preset number of times; Based on the updated type labels, the Skip-Gram model of doc2vec is used to generate the structural features of the nodes.
[0009] Further, extracting the malicious intent feature of the node according to the malicious intent label includes: Calculate the number of different malicious intent labels, denoted as ; Set the type mapping function for malicious intent labels to , mapping the type of malicious intent label to The integer range of ; Calculate the number of labels of each type for each node and get the Dimensional node malicious intent characteristics.
[0010] Compared with the prior art, the present invention has the following significant advantages: (1) By constructing a malicious intent representation graph, APT attacks are detected from a new perspective. Compared with traditional APT attack detection, the present invention integrates structural features and malicious intent features. (2) The integration of structural features and malicious intent features makes the detection effect better. The change of structural features has a smaller impact on the model. The model not only focuses on the changes in structural features, but also on the changes in the malicious behavior tendency of nodes, further reducing false positives. (3) The VAE model is used for model training and detection. The model is lightweight and has higher detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A flowchart of an APT attack detection method based on a malicious intent characterization graph of the present invention; Figure 2 This is an example diagram of the malicious intent characterization diagram of the present invention. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0013] like Figure 1 As shown, the present invention provides an APT attack detection method based on a malicious intent representation graph, and the specific steps are as follows: (1) Constructing a malicious intent representation graph: Receive the system traceability event stream collected from the agent installed on the monitoring host, build a knowledge graph (KG) in memory, and construct a malicious intent representation graph based on pre-defined label transfer rules.
[0014] (1-1) Knowledge graph construction: Receive the system tracing event stream collected by the agent installed on the monitoring host to build a knowledge graph. Through a set of nodes V={v1,v2,v3,.....,v n} and edge E={e1,e2,e3,...,e m}Define a knowledge graph KG, where v n represents the nth node, e m Represents the mth edge. KG is a triple<srcid,dstid,attr> Each edge in KG is stored in the form of, where the edge represents the type of event, srcid and dstid are the IDs of the source node and the target node of the edge respectively, the source node represents the subject of the event, which is usually a node of type Process, the target node represents the object being operated, and attr is the attribute of the edge, including the operation type and timestamp. KG also stores the necessary attributes of the node: such as process name, related command line, etc. Table 1 shows the considered subject and object types and the relationship between them, and also shows the corresponding considered node attributes.
[0015] Table 1 Subject and event types
[0016] (1-2) Malicious intention construction: In order to obtain the malicious intention of each node, a malicious intention characterization graph is constructed in the present invention by defining a series of malicious intention labels. For example, the intentions of attackers that are commonly known are: obtaining sensitive data, running attacker code, replacing important files, etc. Therefore, the malicious tendency of the node can be defined by this. For example, when a file involves sensitive data, a dedicated malicious intention label Sensitive_data is defined for it. When the node accesses the sensitive data (Sensitive_data), a dedicated malicious intention label Acc_sen_data is defined for the node. Here, only the specific ideas of the definition are given. How to define it can be defined differently according to different needs. You can refer to the label transfer rules disclosed in the document "Zhu T, Yu J, Xiong C, et al. Aptshield: A stable, efficient and real-time apt detection system forlinux hosts[J]. IEEE Transactions on Dependable and Secure Computing, 2023,20(6): 5247-5264.". Generally speaking, it is believed that the more malicious intention labels a node has, the more malicious behavior tendencies the node has.
[0017] (1-3) Malicious intent representation graph construction: In order to process data efficiently, the incoming system tracing event stream is processed in chronological order, and a fixed-size knowledge graph is built in memory (i.e., step 1-1). For each incoming system tracing event stream, when the event in the system tracing event stream has not been recorded, the source node and target node of the event are added to the KG as new nodes, and the corresponding timestamps and related attribute information are assigned to the nodes. An edge is created for the new node, which represents the specific type of the event. The newly added subjects, objects, and events are marked as recorded. At the same time, the label transfer rules defined by the malicious intent construction are applied to assign corresponding malicious intent labels to the nodes: when the number of nodes reaches a fixed size j, it is recorded as graph a. At this time, graph a is not rushed to the next step (node feature extractor), but is retained until the number of nodes in the graph reaches j (1+f s )(f sis a given learning rate). During this process, for each newly arrived system tracing event stream x, and the corresponding source node and target node, observe whether the source node and target node in the event stream are nodes connected to the nodes in Figure a. If the source node or target node is a node connected to the node in Figure a, then add the source node or target node to Figure a, and assign the corresponding malicious intent label to the source node or target node according to the label transfer rule, that is, add the corresponding attribute to the source node or target node in Figure a. If neither the source node nor the target node is connected to the node in Figure a, construct a new knowledge graph according to the method of step (1-1), and generate the corresponding malicious intent representation graph b. This step ensures that the transmitted malicious behavior tendency is obtained. It alleviates the problem of node information disconnection in the traditional graph processing process. The specific algorithm flow is as follows:
[0018] Input: Event Stream E, MIR-Graph size n, rate f s Output: MIR-Graph MIRG_Seq={} MIRG_Seq = {} K = 0 G = Graph() While catching e from E: If len(G.nodes())>n and len(G.nodes())< j(1+f s ) : KG = G.copy() MIRG_Seq[k] = KG K = K+1 If len(G.nodes())> j(1+f s ): older = sort(G.nodes,G.timestamps)[: j] G.remove_nodes(older) G.add_node(e.src) G.add_node(e.dst) G.add_edge(e) G.add_sign(e.src) ##label assignment G.add_sign(e.dst) ##label assignment G.convey_sign(e) ##label transfer (2) Node feature extraction: The node feature extractor receives the malicious intent representation graph, extracts the structural feature vector representation of the node (structural feature) and the malicious behavior tendency feature vector representation of the node (malicious intent feature), and generates the final node feature vector representation based on the above two features.
[0019] (2-1) Node structure feature extraction: In order to obtain the structural features of the nodes and further improve the runtime performance of the algorithm, the WL (Weisfeiler-Lehman) graph kernel method is used to extract the structural features of the nodes. Specifically, the WL graph kernel is used to capture the label information of the nodes, and the structural feature vector representation of the nodes is generated through doc2vec. The specific process is as follows.
[0020] Step 1 (initialization): The types of subjects and objects are used as type labels of nodes (as shown in Table 1), and the types of events are used as type labels of edges (as shown in Table 1).
[0021] Step 2 (iterative process): For each node v, the WL graph kernel method updates its own type label according to the neighbor information of node v (type labels of surrounding nodes and type labels of edges). In each iteration, the new type label of the node is composed of the type label of the node and the type labels of the edges and nodes connected to it in chronological order. The latest type label of the node is used to iterate and generate a new type label.
[0022] Step 3 (feature vector construction): Based on the type labels of the nodes generated above, use the Skip-Gram model of doc2vec to generate the structural features of the nodes.
[0023] (2-2) Node malicious intent feature extraction: Each node in the malicious intent representation graph obtained in step (1) has its corresponding malicious intent label, which is represented here in the form of malicious intent labels. In the feature extraction process, the number of different malicious intent label types is first calculated and recorded as . Set the type mapping function for the malicious intent label to , mapping malicious intent labels to At the same time, the number of labels of each type is calculated for node v, and the features of node v are assigned as a dimensional feature vector, and finally form a The malicious intent features of the nodes in the dimension are extracted. After the malicious intent features are extracted, they are added to the malicious intent representation graph. An example of the malicious intent representation graph is shown in the figure below: Figure 2 As shown, the ellipses connected by dotted lines in the figure are malicious intent features of the nodes.
[0024] (3) Model training and anomaly detection: The node feature vector in step (2) is sent to the VAE model to generate new data instances by learning the potential representation of the input data. The VAE model is used to perform reconstruction loss and obtain the anomaly threshold. When performing detection, if the reconstruction loss of a node is higher than the anomaly threshold, the node is considered an anomaly node.
[0025] The variational autoencoder (VAE) model is used. The VAE model is favored for its lightweight and efficient performance. It maps the input data to a low-dimensional latent space through the encoder and reconstructs the data by the decoder. In the application, the encoder part of the VAE model is used to extract the feature vectors of the nodes, while the decoder part is used to reconstruct these feature vectors to evaluate the abnormality of the data.
[0026] Specifically, for a node v, first extract the structural features of the node and malicious intent characteristics of nodes , normalize the two to eliminate the dimensionality effect between different features, and then concatenate the two normalized feature vectors to form a new fusion feature , as the input of the VAE model, its formal expression is as follows: (1) (2) Here, x represents a single data point, which is a dimension value of the feature vector, and X represents all data points, which is all dimension values in the feature vector.
[0027] Afterwards, the fusion features Send it to the VAE model and get the reconstructed features of the fused features Then, use cosine similarity to convert and For comparison. and When the difference between is greater than the preset abnormal threshold, node v is an abnormal node. and When the difference is less than or equal to the preset abnormal threshold, the node v is a benign node. The criterion based on this is that abnormal nodes are more difficult to accurately represent in the vector space, so when trying to reconstruct them, they will have a larger loss value.
[0028] The above-mentioned embodiments only express one or 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 patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for detecting APT attacks based on malicious intent representation graph, It is characterized in that The APT attack detection method based on the malicious intent representation graph includes: Collect system traceability event streams, convert them into nodes and edges and build a knowledge graph. According to the node behavior and label transfer rules, assign corresponding malicious intent labels to the nodes, and use the knowledge graph and malicious intent labels to build a malicious intent representation graph. The WL graph kernel method is used to extract the structural features of the nodes, and the malicious intent features of the nodes are extracted based on the malicious intent labels; The structural features and malicious intent features of each node are normalized and concatenated to obtain fused features, which are then input into the variational autoencoder model to obtain reconstructed features. The fused features are compared with the reconstructed features using cosine similarity. When the difference is greater than the preset abnormal threshold, the current node is an abnormal node. When the difference is less than or equal to the preset abnormal threshold, the current node is a benign node.
2. According to the APT attack detection method based on malicious intent representation graph according to claim 1, It is characterized in that The system traceability event stream is collected, the system traceability event stream is converted into nodes and edges and a knowledge graph is constructed, corresponding malicious intent labels are assigned to the nodes according to the node behavior and label transfer rules, and a malicious intent representation graph is constructed using the knowledge graph and labels, including: Collect system traceability event streams to build a knowledge graph. When an event has not been recorded, add the source node and target node to the knowledge graph as new nodes, assign corresponding timestamps and attribute information to the new nodes, and create an edge for the new nodes. When the number of nodes in the knowledge graph reaches a first preset number, the construction of the knowledge graph is completed; Continue to collect system traceability event streams. If the source node or target node of a new event is a node connected to a node in the knowledge graph, add the source node or target node to the knowledge graph and assign a corresponding malicious intent label to the source node or target node of the new event according to the label transfer rule. If the source node or target node of a new event is a node not connected to a node in the knowledge graph, use it to construct a new knowledge graph. When the number of nodes in the knowledge graph reaches a second preset number, a malicious intent representation graph is generated.
3. According to the APT attack detection method based on malicious intent representation graph according to claim 1, It is characterized in that The method of extracting the structural features of nodes by using the WL graph kernel method includes: The node type is used as the node type label, and the event type is used as the edge type label; For each node, the WL graph kernel method is used to obtain the new type label of the current node according to the type label of the current node and the type labels of the edges and nodes connected to the current node in chronological order, and the type label of each node is updated a preset number of times; Based on the updated type labels, the Skip-Gram model of doc2vec is used to generate the structural features of the nodes.
4. The APT attack detection method based on malicious intent representation graph according to claim 1, It is characterized in that The extracting the malicious intent feature of the node according to the malicious intent label includes: Calculate the number of different malicious intent labels, denoted as ; Set the type mapping function for malicious intent labels to , mapping the type of malicious intent label to The integer range of ; Calculate the number of labels of each type for each node and get the Dimensional node malicious intent characteristics.
Citation Information
Patent Citations
APT intrusion detection method based on tense diagram and mask auto-encoder
CN118101295A
APT attack detection method fusing traceability graph node semantics and neighborhood features
CN118264474A
Intrusion detection method and device, electronic equipment and storage medium
CN118349996A
Complex multi-step attack detection method and system for electric power system
WO2024113927A1
Cited By
APT attack detection method and system based on multi-source knowledge fusion
CN119420576A
