APT attack detection method fusing mask auto-encoder and meta-path learning

By integrating mask autoencoder and metapath learning methods, a heterogeneous origin graph is constructed, node and edge features are extracted, and model parameters are optimized. The accuracy and calculation overhead of APT attack detection in the existing technology is solved, and the correct implementation is achieved. Efficient detection of complex cyber attacks.

CN119026139APending Publication Date: 2024-11-26ZHEJIANG UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411122994.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively detect complex advanced persistent threat (APT) attacks, traditional detection methods are easily bypassed, and pattern rule matching methods are powerless when facing zero-day exploitation, deep learning methods are expensive and generalized. Difference.

Method used

Using the method of fusion mask autoencoder and metapath learning, the heterogeneous origin graph is constructed, the features of nodes and edges are extracted, and the reconstruction loss calculation is performed using the autoencoder model, combining dynamic masking and causal occlusion, and optimizing Model parameters to realize attack detection at node and subgraph levels.

Benefits of technology

It improves the detection accuracy and generalization ability of APT attacks, can capture complex system behavior and semantic information, overcomes the latent nature of APT network attack behavior, and reduces computing overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026139A_ABST
    Figure CN119026139A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of APT attack detection and machine learning, and particularly relates to an APT attack detection method fusing a mask auto-encoder and meta-path learning. The method comprises the steps of collecting system kernel log data, constructing a heterogeneous origin graph, defining a meta-path according to the heterogeneous origin graph, designing comprehensive graph information of three training task multi-dimensional capture graph complex structures, node heterogeneous attributes and node structure positions, and calculating edge reconstruction loss, attribute reconstruction loss and position feature reconstruction loss based on the meta-path. And node-level and sub-graph-level attack detection and source tracing are carried out. According to the method, the performance can be improved through knowledge transfer between tasks, a unique dynamic mask rate shielding technology is adopted, the model is forced to learn more causal relationships, high-order proximity is captured, the generalization ability of the model is enhanced, coarse and fine granularities are considered, and the latency of APT network attack behaviors can be overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of APT attack detection and machine learning, and in particular relates to an APT attack detection method integrating masked autoencoder and meta-path learning. Background Art

[0002] The development of Internet information technology has also spawned many internal and external security risks and threats. In recent years, complex network attacks represented by advanced persistent threats (APT) have become the most prominent risk source with the widest social impact, the highest defense difficulty, and the strongest destructive power in cyberspace, causing huge damage and losses to user data security and national network security. Compared with traditional attack modes, APT attacks have the characteristics of long duration, long attack chain, high concealment, diverse means, and strong harm, so they are more difficult to be detected by security methods. Traditional network attack detection technology usually adopts traditional attack countermeasure solutions of single-point intrusion detection, but these detection methods have problems such as easy bypass, affecting system stability, and large delay. In addition, although the APT detection method based on pattern rule matching has a high accuracy rate when facing known attacks, it is powerless when facing advanced attack strategies such as zero-day vulnerability exploits because it is highly dependent on predefined rules or patterns for matching abnormal or malicious behaviors.

[0003] On the other hand, in recent years, with the development of machine learning and deep learning technologies, learning-based network attack detection methods have made many progresses in related fields, not only gaining wide attention in academia and industry, but also achieving remarkable results in practical applications. Among them, deep learning technology can automatically learn complex nonlinear hidden features, model the behavior of attackers, and more accurately identify hidden and fine-grained APT attack patterns. However, due to the low probability, difficulty in reproduction, and difficulty in labeling of complex network attacks, the number and diversity of relevant training samples are extremely low, which cannot support the training of supervised learning detection autoencoder models with high generalization ability; on the other hand, most deep learning-based methods have achieved good results but at the cost of heavy computational overhead, which is impractical in actual detection application scenarios. The graph mask autoencoder is a generative self-supervised learning method in the field of graph deep learning, which can effectively deal with these problems. Summary of the invention

[0004] The purpose of the present invention is to solve the problems of the prior art and propose an APT attack detection method that integrates masked autoencoder and meta-path learning.

[0005] In order to achieve the above object, the technical solution provided by the present invention is:

[0006] An APT attack detection method integrating masked autoencoder and meta-path learning, comprising:

[0007] Collect system kernel log data, build a system behavior graph, and build a heterogeneous provenance graph based on the system behavior graph. Define meta-paths based on the heterogeneous provenance graph to obtain a meta-path set.

[0008] Preprocess the node attributes and meta-paths of nodes in the heterogeneous provenance graph to extract the initial node embedding and meta-path-based adjacency matrix;

[0009] The meta-path-based adjacency matrix is ​​masked according to the Bernoulli distribution, and the meta-path-based reconstructed adjacency matrix is ​​obtained by using the autoencoder model and activation function to calculate the meta-path-based edge reconstruction loss.

[0010] The node attributes are masked at a dynamic mask rate to obtain node attribute embedding. The attribute reconstruction loss of each node is obtained using the autoencoder model based on the node attribute embedding and the graph adjacency matrix of the heterogeneous provenance graph. The attribute reconstruction loss of the heterogeneous provenance graph is obtained based on the attribute reconstruction loss of each node.

[0011] The actual position features are extracted according to the meta-path, and the predicted position features are obtained by using the autoencoder model. The position feature reconstruction loss of each node is obtained according to the actual position features and the predicted position features. The position feature reconstruction loss of the heterogeneous origin graph is obtained according to the position feature reconstruction loss of each node.

[0012] The joint loss is calculated based on the edge reconstruction loss based on the meta-path, the attribute reconstruction loss of the heterogeneous origin graph, and the position feature reconstruction loss of the heterogeneous origin graph. The parameters of the autoencoder model are optimized using the joint loss to complete the training of the autoencoder model.

[0013] Based on the benign heterogeneous provenance graph, the node-level average reconstruction error is calculated according to the attribute reconstruction loss of each node and the location feature reconstruction loss of each node, and the node abnormality threshold is set according to the node-level average reconstruction error;

[0014] The node-level reconstruction loss of each node of the heterogeneous origin graph to be detected is calculated based on the attribute reconstruction loss of each node and the location feature reconstruction loss of each node. If the node-level reconstruction loss of the current node is greater than the node abnormality threshold, the current node is recorded as a suspicious node. If the node-level reconstruction loss of the current node is less than or equal to the node abnormality threshold, the current node is benign.

[0015] For each suspicious node, multiple suspicious meta-path subgraphs with the current suspicious node as the root node are sampled according to each meta-path. The anomaly score is calculated for each suspicious meta-path subgraph based on the node-level reconstruction loss of each node on the suspicious meta-path subgraph and the meta-path-based edge reconstruction loss of the current meta-path. If the anomaly score of one or more suspicious meta-path subgraphs in all suspicious meta-path subgraphs with the current suspicious node as the root node is greater than the preset subgraph anomaly threshold, the current suspicious node is abnormal. If the anomaly score of all suspicious meta-path subgraphs with the current suspicious node as the root node is less than or equal to the subgraph anomaly threshold, the current suspicious node is benign.

[0016] Furthermore, the node attributes and meta-paths of the nodes in the heterogeneous provenance graph are preprocessed to extract the initial node embedding and the meta-path-based adjacency matrix, including: mapping the node attributes to a low-dimensional space through a hash function, performing a hierarchical representation in the low-dimensional space to obtain the initial node embedding, and creating a meta-path-based adjacency matrix for each meta-path through meta-path sampling using the MetaPath2Vec method.

[0017] Furthermore, the autoencoder model includes a graph neural network encoder, a graph neural network decoder and a multi-layer perceptron decoder.

[0018] Furthermore, the adjacency matrix based on the meta-path is masked according to the Bernoulli distribution, the reconstructed adjacency matrix based on the meta-path is obtained by using the autoencoder model and the activation function, and the edge reconstruction loss based on the meta-path is calculated, including:

[0019] For each meta-path based adjacency matrix, a binary mask M is constructed following a Bernoulli distribution φ ~Bernoulli(θ), where Bernoulli() represents Bernoulli distribution, θ is the mask ratio, θ∈[0,1];

[0020] Using the binary mask M φ The meta-path-based adjacency matrix of the masked meta-path is obtained by masking, and the meta-path-based adjacency matrix of the masked meta-path and the initial node embedding are input into the graph neural network encoder to obtain the potential node embedding

[0021] Embed the node The meta-path-based adjacency matrix of the masked meta-path is input into the graph neural network decoder to generate the decoded node embedding

[0022] Based on the decoded node embedding The reconstructed adjacency matrix based on the meta-path is obtained by using the sigmoid activation function;

[0023] The loss of each meta-path-based reconstructed adjacency matrix is ​​calculated using scaled cosine similarity, and the weight of each meta-path is obtained based on the self-attention mechanism;

[0024] The loss of each meta-path-based reconstructed adjacency matrix is ​​weighted and fused to obtain the meta-path-based edge reconstruction loss

[0025] Furthermore, the node attributes are masked at a dynamic mask rate to obtain node attribute embedding, the attribute reconstruction loss of each node is obtained using an autoencoder model according to the node attribute embedding and the graph adjacency matrix of the heterogeneous origin graph, and the attribute reconstruction loss of the heterogeneous origin graph is obtained according to the attribute reconstruction loss of each node, including:

[0026] For node attributes, the mask rate is gradually increased linearly according to the training batch to obtain node attribute embedding;

[0027] Input the node attribute embedding and the graph adjacency matrix of the heterogeneous provenance graph into the graph neural network encoder to obtain the node embedding E3;

[0028] The node embedding E3 and the graph adjacency matrix of the heterogeneous origin graph are input into the graph neural network decoder to obtain the reconstructed node attribute Z. The attribute reconstruction loss of each node is obtained by comparing the initial node embedding and the reconstructed node attribute Z through scaled cosine similarity.

[0029] Sum the attribute reconstruction loss of each node to get the attribute reconstruction loss of the heterogeneous origin graph

[0030] Furthermore, the actual position feature is extracted according to the meta-path, the predicted position feature is obtained by using the autoencoder model, the position feature reconstruction loss of each node is obtained according to the actual position feature and the predicted position feature, and the position feature reconstruction loss of the heterogeneous origin graph is obtained according to the position feature reconstruction loss of each node, including:

[0031] Use MetaPath2Vec method to extract meta-path-aware actual position features;

[0032] The node embedding E3 is mapped to the dimension of MetaPath2Vec features through the graph neural network encoder and the multi-layer perceptron decoder to generate the predicted position features;

[0033] The position feature reconstruction loss of each node is obtained by comparing the actual position feature and the predicted position feature through scaled cosine similarity

[0034] Sum the position feature reconstruction loss of each node to get the position feature reconstruction loss of the heterogeneous origin graph

[0035] Furthermore, the joint loss is expressed by the following formula:

[0036]

[0037] in, represents the joint loss, α, β, and γ are the balanced meta-path-based edge reconstruction losses. Attribute reconstruction loss for heterogeneous provenance graphs and position feature reconstruction loss of heterogeneous origin graphs The balance weight of represents the meta-path based edge reconstruction loss, represents the attribute reconstruction loss of heterogeneous provenance graphs, Representing the positional feature reconstruction loss for heterogeneous provenance graphs.

[0038] Compared with the prior art, the present invention has the following significant advantages:

[0039] (1) The autoencoder model is learned by using a heterogeneous provenance graph, which can represent complex system behaviors. Metapaths can effectively capture the complex structure and semantic information in heterogeneous provenance graphs, thereby obtaining richer and more accurate representation vectors of nodes and edges. (2) Three training tasks are designed to capture the comprehensive graph information of complex graph structure, heterogeneous node attributes, and node structural position in multiple dimensions, and improve performance through knowledge transfer between tasks. (3) Metapath masking is performed based on causal relationships and attack behavior patterns, and a unique dynamic mask rate masking technology is used to force the autoencoder model to learn more causal relationships, capture high-order proximity, and enhance the generalization ability of the autoencoder model. (4) Attack detection and tracing are performed at the node level and subgraph level, taking into account both coarse and fine granularity, which can overcome the latent nature of APT network attack behaviors. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flowchart of an APT attack detection method integrating masked autoencoder and meta-path learning according to the present invention;

[0041] Figure 2 Schematic diagram of three training tasks of the present invention;

[0042] Figure 3 Schematic diagram of the edge shielding strategy based on the meta-path of the present invention;

[0043] Figure 4 Schematic diagram of the adaptive node attribute masking strategy of the present invention. DETAILED DESCRIPTION

[0044] 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 used to limit the present invention.

[0045] Reference Figure 1 , an APT attack detection method integrating masked autoencoder and meta-path learning, comprising the following steps:

[0046] (1) Construction of a heterogeneous provenance graph based on system kernel log data: Collect system kernel log data, define the system entities and behaviors involved in the system log data, and on this basis, build a heterogeneous provenance graph representing the system behavior and define the meta-path in the heterogeneous provenance graph.

[0047] (1-1) Definition of system behavior graph: Based on the system entities and entity interaction behaviors in the system kernel log data, a system behavior graph Q = (A, R) is constructed with system entities as nodes and entity interaction behaviors as relationships, where A is a set of node types and R is a set of relationship types. Node types include processes, files, and sockets. Relationship types are defined based on the interaction behaviors between nodes, including the derivation relationship between processes, the execution relationship between processes, the creation relationship between processes and files, the reading relationship between processes and files, the connection relationship between processes and networks, and the closing relationship between processes and networks.

[0048] (1-2) Definition and construction of heterogeneous provenance graph: Collect system kernel log data through log collection tools, parse the content of each log, and build a heterogeneous provenance graph G = (V, E) based on the defined system behavior graph structure, where G is a directed graph, V is a node set, E is an edge set, any node in V corresponds to a node type in A, and any relationship in E corresponds to a relationship type in R.

[0049] (1-3) Meta-path definition: A meta-path is a path with different types of edges connecting different types of nodes. According to the behavior rules between nodes and relationships, multiple meta-paths are defined on the heterogeneous provenance graph G to obtain the meta-path set MPL. The form of each meta-path is shown in formula (1). i represents the i-th node type, R i Representative A i With A i+1 The relationship type between them. Formulas (2) to (5) list some representative meta-paths.

[0050]

[0051] (2) Figure 2As shown in the figure, graph learning is performed based on heterogeneous provenance graphs and masked autoencoders: data is preprocessed to extract features, node attributes are masked according to a dynamic masking rate, and edges based on meta-paths are masked according to Bernoulli distribution. Encoding and decoding learning is performed from three dimensions: edge reconstruction based on meta-paths, attribute reconstruction based on masked nodes, and position reconstruction based on structures. A function is designed to weight the three target losses.

[0052] (2-1) Data preprocessing: Use the hierarchical feature hashing technology based on node attributes to encode the node attributes and obtain the initial node embedding X. It maps high-dimensional features to low-dimensional space through hash functions and performs hierarchical representation in low-dimensional space to maintain the similarity between related features while ensuring that features at different levels can effectively represent the complexity of data. The hierarchical feature hashing technology based on node attributes is a feature engineering method for processing high-dimensional data. For each metapath φ∈MPL, the metapath2vec method is used to create a metapath-based adjacency matrix through metapath sampling

[0053] (2-2) Edge reconstruction based on meta-path: see Figure 3 , Masking the edges based on meta-paths will break the short-range semantic connections between nodes. Since meta-paths cover most of the short-range attack behaviors, they can be regarded as masking based on attack behavior patterns, which can more effectively utilize causal dependencies and naturally capture high-order proximity. For different meta-paths, since they contain different semantics, they are considered separately by masking and reconstructing each adjacency matrix based on each meta-path. Specifically, for each Construct a binary mask M following the Bernoulli distribution φ ~Bernoulli(θ), where θ is the mask ratio, which is between 0 and 1. φ Get the adjacency matrix based on the masked metapath Will and the initial node embedding X is sent to the graph neural network encoder (GNN encoder) f E , obtain the potential node embedding Afterwards, and Sent to the graph neural network decoder (GNN decoder) f D Generate decoded node embeddings

[0054]

[0055] Then based on the decoded node embedding Reconstruct the meta-path based reconstructed adjacency matrix using sigmoid activation function The reconstruction loss of each node is compared using scaled cosine similarity to calculate the loss of each meta-path-based reconstruction adjacency matrix, and the weight of each meta-path is obtained based on the self-attention mechanism. Finally, the loss of each meta-path-based reconstruction adjacency matrix is ​​weighted and fused to obtain the meta-path-based edge reconstruction loss.

[0056] (2-3) Attribute reconstruction based on masked nodes: see Figure 4 First, we design an adaptive dynamic masking rate method, which specifically refers to masking with a variable percentage masking rate, that is, linearly increasing the node masking rate according to the training batch, so that the autoencoder model can adaptively learn from easy to difficult. For example, mask a small number of nodes with a masking rate of 50 in the first round, mask with a masking rate of 60 in the second round, increase by 10 each time, and so on. The node attribute embedding obtained after masking Can be defined as:

[0057]

[0058] in, represents node attribute embedding, represents the set of obscured nodes, and v represents a node.

[0059] Embed node attributes and the graph adjacency matrix of heterogeneous origin graphs Sent to the GNN encoder f E , get the node embedding E3, and add the node embedding E3 to the graph adjacency matrix of the heterogeneous origin graph Feed into the GNN decoder f D , obtain the reconstructed node attribute Z, and compare the initial node embedding X and the reconstructed node attribute Z by scaling the cosine similarity to obtain the attribute reconstruction loss of each node Sum the attribute reconstruction loss of each node to get the attribute reconstruction loss of the heterogeneous origin graph The reconstructed node attribute Z formula is as follows:

[0060]

[0061] (2-4) Structure-based position reconstruction: The purpose of position feature prediction is to fuse the position information and attribute information of each node. First, the metapath2vec method is used to extract the actual position feature P perceived by the metapath, and then the autoencoder model is forced to use only the information from the GNN encoder f E The potential node embedding E3 is used as input, and a multi-layer perceptron is used as a decoder, and then the GNN encoder f EThe multi-layer perceptron decoder structure maps E3 to the dimension of MetaPath2Vec features and generates predicted position features P'. Accordingly, the GNN encoder is able to capture node position information in a broader graph structure context based on the local graph structure of the node and the context on the meta-path, and determines the position feature reconstruction loss of each node by comparing the actual position feature P and the predicted position feature P' by scaled cosine similarity. Sum the position feature reconstruction loss of each node to get the position feature reconstruction loss of the heterogeneous origin graph

[0062] Final objective function is defined as the meta-path based edge reconstruction loss Attribute reconstruction loss and position feature reconstruction loss A weighted combination of:

[0063]

[0064] in, represents the joint loss, α, β, and γ are the balanced meta-path-based edge reconstruction losses. Attribute reconstruction loss for heterogeneous provenance graphs and position feature reconstruction loss of heterogeneous origin graphs The balance weight of .

[0065] (3) Attack detection based on subgraph sampling: During training, the node anomaly threshold is calculated based on the node-level average reconstruction error. A suspicious meta-path subgraph is sampled based on the meta-path and suspicious nodes. The anomaly score of the suspicious meta-path subgraph is calculated for fine-grained APT attack detection.

[0066] (3-1) Calculate the node anomaly threshold based on the node-level average reconstruction error to find suspicious nodes: In the training phase, based on the benign heterogeneous origin graph, the node-level average reconstruction error is calculated based on the attribute reconstruction loss and position feature reconstruction loss of each node on the heterogeneous origin graph, which can be expressed as follows:

[0067]

[0068] in, represents the node-level average reconstruction error, and m represents the number of nodes.

[0069] A node anomaly threshold is set according to the node-level average reconstruction error. The node anomaly threshold = b*node-level average reconstruction error, where b represents the adjustment parameter, which is determined based on experience or experiments. In the test phase, node-level anomaly detection is first performed, and the node-level reconstruction loss of each node of the heterogeneous origin graph to be detected is calculated. The node-level reconstruction loss is the joint loss of the attribute reconstruction loss of the current node and the position feature reconstruction loss. If the node-level reconstruction loss of a node is greater than the node abnormality threshold, it is recorded as a suspicious node, and the suspicious abnormal node is used as the object to be detected. If the node-level reconstruction loss of a node is less than or equal to the node abnormality threshold, the current node is benign.

[0070] (3-2) Subgraph sampling and detection: In the heterogeneous provenance graph, multiple suspicious meta-path subgraphs with the suspicious node as the root node are sampled based on each meta-path. The anomaly score is calculated for each suspicious meta-path subgraph based on the node-level reconstruction loss of each node on the suspicious meta-path subgraph and the meta-path-based edge reconstruction loss on the meta-path. The anomaly score is the sum of the attribute reconstruction loss, position feature reconstruction loss and meta-path-based edge reconstruction loss of the nodes in the suspicious meta-path subgraph divided by the number of meta-path hops. The subgraph anomaly threshold is set based on experience. If the anomaly score of one or more suspicious meta-path subgraphs in all suspicious meta-path subgraphs with the current suspicious node as the root node is greater than the preset subgraph anomaly threshold, the current suspicious node is abnormal, and the detection module will issue a warning for this suspicious node. At the same time, the suspicious meta-path subgraph with the highest anomaly score with the suspicious node as the root node is recorded to facilitate security practitioners to trace and study based on this; if the anomaly score of all suspicious meta-path subgraphs with the current suspicious node as the root node is less than or equal to the subgraph anomaly threshold, the current suspicious node is benign and the suspicious node is a false alarm.

[0071] 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. An APT attack detection method integrating masked autoencoder and meta-path learning, characterized in that: The APT attack detection method integrating mask autoencoder and meta-path learning includes: Collect system kernel log data, build a system behavior graph, and build a heterogeneous provenance graph based on the system behavior graph. Define meta-paths based on the heterogeneous provenance graph to obtain a meta-path set. Preprocess the node attributes and meta-paths of nodes in the heterogeneous provenance graph to extract the initial node embedding and meta-path-based adjacency matrix; The meta-path-based adjacency matrix is ​​masked according to the Bernoulli distribution, and the meta-path-based reconstructed adjacency matrix is ​​obtained by using the autoencoder model and activation function to calculate the meta-path-based edge reconstruction loss. The node attributes are masked at a dynamic mask rate to obtain node attribute embedding. The attribute reconstruction loss of each node is obtained using the autoencoder model based on the node attribute embedding and the graph adjacency matrix of the heterogeneous provenance graph. The attribute reconstruction loss of the heterogeneous provenance graph is obtained based on the attribute reconstruction loss of each node. The actual position features are extracted according to the meta-path, and the predicted position features are obtained by using the autoencoder model. The position feature reconstruction loss of each node is obtained according to the actual position features and the predicted position features. The position feature reconstruction loss of the heterogeneous origin graph is obtained according to the position feature reconstruction loss of each node. The joint loss is calculated based on the edge reconstruction loss based on the meta-path, the attribute reconstruction loss of the heterogeneous origin graph, and the position feature reconstruction loss of the heterogeneous origin graph. The parameters of the autoencoder model are optimized using the joint loss to complete the training of the autoencoder model. Based on the benign heterogeneous provenance graph, the node-level average reconstruction error is calculated according to the attribute reconstruction loss of each node and the location feature reconstruction loss of each node, and the node abnormality threshold is set according to the node-level average reconstruction error; The node-level reconstruction loss of each node of the heterogeneous origin graph to be detected is calculated based on the attribute reconstruction loss of each node and the location feature reconstruction loss of each node. If the node-level reconstruction loss of the current node is greater than the node abnormality threshold, the current node is recorded as a suspicious node. If the node-level reconstruction loss of the current node is less than or equal to the node abnormality threshold, the current node is benign. For each suspicious node, multiple suspicious meta-path subgraphs with the current suspicious node as the root node are sampled according to each meta-path. The anomaly score is calculated for each suspicious meta-path subgraph based on the node-level reconstruction loss of each node on the suspicious meta-path subgraph and the meta-path-based edge reconstruction loss of the current meta-path. If the anomaly score of one or more suspicious meta-path subgraphs in all suspicious meta-path subgraphs with the current suspicious node as the root node is greater than the preset subgraph anomaly threshold, the current suspicious node is abnormal. If the anomaly score of all suspicious meta-path subgraphs with the current suspicious node as the root node is less than or equal to the subgraph anomaly threshold, the current suspicious node is benign.

2. The APT attack detection method integrating masked autoencoder and meta-path learning according to claim 1 is characterized in that: The node attributes and meta-paths of the nodes in the heterogeneous provenance graph are preprocessed to extract the initial node embedding and the meta-path-based adjacency matrix, including: mapping the node attributes to a low-dimensional space through a hash function, performing hierarchical representation in the low-dimensional space to obtain the initial node embedding, and creating a meta-path-based adjacency matrix for each meta-path through meta-path sampling using the MetaPath2Vec method.

3. The APT attack detection method integrating masked autoencoder and meta-path learning according to claim 1 is characterized in that: The autoencoder model includes a graph neural network encoder, a graph neural network decoder and a multi-layer perceptron decoder.

4. The APT attack detection method integrating masked autoencoder and meta-path learning according to claim 3 is characterized in that: The adjacency matrix based on the meta-path is masked according to the Bernoulli distribution, the reconstructed adjacency matrix based on the meta-path is reconstructed using the autoencoder model and the activation function, and the edge reconstruction loss based on the meta-path is calculated, including: For each meta-path based adjacency matrix, a binary mask M is constructed following a Bernoulli distribution φ ~Bernoulli(θ), where Bernoulli() represents Bernoulli distribution, θ is the mask ratio, θ∈[0,1]; Using the binary mask M φ The meta-path-based adjacency matrix of the masked meta-path is obtained by masking, and the meta-path-based adjacency matrix of the masked meta-path and the initial node embedding are input into the graph neural network encoder to obtain the potential node embedding Embed the node The meta-path-based adjacency matrix of the masked meta-path is input into the graph neural network decoder to generate the decoded node embedding Based on the decoded node embedding The reconstructed adjacency matrix based on the meta-path is obtained by using the sigmoid activation function; The loss of each meta-path-based reconstructed adjacency matrix is ​​calculated using scaled cosine similarity, and the weight of each meta-path is obtained based on the self-attention mechanism; The loss of each meta-path-based reconstructed adjacency matrix is ​​weighted and fused to obtain the meta-path-based edge reconstruction loss 5. The APT attack detection method integrating masked autoencoder and meta-path learning according to claim 3 is characterized in that: The node attributes are masked at a dynamic mask rate to obtain node attribute embedding, the attribute reconstruction loss of each node is obtained by using an autoencoder model according to the node attribute embedding and the graph adjacency matrix of the heterogeneous origin graph, and the attribute reconstruction loss of the heterogeneous origin graph is obtained according to the attribute reconstruction loss of each node, including: For node attributes, the mask rate is gradually increased linearly according to the training batch to obtain node attribute embedding; Input the node attribute embedding and the graph adjacency matrix of the heterogeneous provenance graph into the graph neural network encoder to obtain the node embedding E3; The node embedding E3 and the graph adjacency matrix of the heterogeneous origin graph are input into the graph neural network decoder to obtain the reconstructed node attribute Z. The attribute reconstruction loss of each node is obtained by comparing the initial node embedding and the reconstructed node attribute Z through scaled cosine similarity. Sum the attribute reconstruction loss of each node to get the attribute reconstruction loss of the heterogeneous origin graph 6. The APT attack detection method integrating masked autoencoder and meta-path learning according to claim 5, characterized in that: The actual position feature is extracted according to the meta-path, the predicted position feature is obtained by using the autoencoder model, the position feature reconstruction loss of each node is obtained according to the actual position feature and the predicted position feature, and the position feature reconstruction loss of the heterogeneous origin graph is obtained according to the position feature reconstruction loss of each node, including: MetaPath2Vec method is used to extract meta-path-aware actual position features; The node embedding E3 is mapped to the dimension of MetaPath2Vec features through the graph neural network encoder and the multi-layer perceptron decoder to generate the predicted position features; The position feature reconstruction loss of each node is obtained by comparing the actual position feature and the predicted position feature through scaled cosine similarity Sum the position feature reconstruction loss of each node to get the position feature reconstruction loss of the heterogeneous origin graph 7. The APT attack detection method integrating masked autoencoder and meta-path learning according to claim 1, characterized in that: The combined loss is expressed by the following formula: in, represents the joint loss, α, β, and γ are the balanced meta-path-based edge reconstruction losses. Attribute reconstruction loss for heterogeneous provenance graphs and position feature reconstruction loss of heterogeneous origin graphs The balance weight of represents the meta-path based edge reconstruction loss, represents the attribute reconstruction loss of heterogeneous provenance graphs, Representing the positional feature reconstruction loss for heterogeneous provenance graphs.

Citation Information

Cited By

  • APT attack detection method and system based on multi-source knowledge fusion

    CN119420576A

  • Social recommendation method and system based on structure and semantic double-view comparison and medium

    CN120277278A