APT attacker clustering method based on heterogeneous graph auto-encoder

Extracting attacker features in heterogeneous threat knowledge graphs through heterogeneous graph autoencoder and self-supervised learning, solving the problem of incomplete feature extraction and insufficient label data in the prior art, and realizing the problem of small number of labels Attacker feature extraction and clustering.

CN118981658APending Publication Date: 2024-11-19UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202411013426.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The existing technology cannot effectively utilize the correlation between different attack events, resulting in the inability to extract more comprehensive attacker features, and there are a large number of attackers with unknown attributes, lacking sufficient label data, making it difficult to extract attacker features.

Method used

Using heterogeneous graph autoencoder, extract the attacker's features in the heterogeneous threat knowledge graph through self-supervised learning, uses metapath reconstruction as the learning target, reduces dependence on label data, and uses K-means algorithm to cluster attackers .

Benefits of technology

In the case of insufficient label data, attacker features containing semantic information are extracted, which improves the accuracy of attacker clustering and can better complete attacker clustering tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981658A_ABST
    Figure CN118981658A_ABST
Patent Text Reader

Abstract

The invention discloses an APT attacker clustering method based on a heterogeneous graph auto-encoder. The method comprises the basic steps of information acquisition and STIX information mapping, heterogeneous graph auto-encoder training and attacker clustering. According to the scheme, for the clustering problem of APT attackers, comprehensive and complex threat knowledge is represented by using a heterogeneous graph; meanwhile, when label data is insufficient, a heterogeneous graph auto-encoder is used for extracting the characteristics of attackers from the data, the characteristics are used for attacker clustering, in the self-supervised learning process of auto-encoding, meta-path reconstruction is used as a learning target, the auto-encoder can effectively extract the characteristics of the APT attackers containing semantic information, and the accuracy of the APT attackers is improved. The method can be used for an APT attacker clustering task, the accuracy of attacker feature extraction is improved, and the attacker clustering task is better completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security and heterogeneous graph self-supervised learning methods, and in particular to an APT attacker clustering method based on a heterogeneous graph autoencoder. Background Art

[0002] Advanced persistent threats (APTs) are often long-term cyber attacks launched by organized malicious actors. These attacks are usually characterized by stealth and complexity, and are designed to steal information, infiltrate or destroy target networks over a long period of time. In order to prevent and combat these threats, security professionals need to continuously evolve their security strategies and technical means. Among them, feature extraction and cluster analysis of attackers are important parts of preventing and combating these threats.

[0003] By comparing the features of different attackers, we can cluster attackers and find similar attackers. By discovering the clustering relationship between unknown attackers and known attacks, security personnel can better understand the adversary, thereby enhancing network defense capabilities. However, the current methods are limited by the inability to utilize the correlation between different attack events, which makes it impossible to extract more comprehensive features. On the other hand, there are a large number of attackers with unknown attribution, that is, unlabeled attack data, which means that we do not have enough data to extract the attacker's features. Summary of the invention

[0004] In order to solve the first problem, the present invention proposes to use heterogeneous graph neural networks to learn the characteristics of attackers. On the one hand, heterogeneous graph neural networks can process heterogeneous data from different attack events and learn in a unified graph structure, thereby obtaining more comprehensive features. On the other hand, heterogeneous graph neural networks can make good use of the complex structure between entities to extract features in the graph.

[0005] In order to solve the second problem, the present invention proposes to use self-supervised learning to alleviate the dependence on data labels (i.e., the true attribution of the attacker). Self-supervised learning can extract information from the data itself with a small number of labels. Therefore, the present invention proposes a self-supervised learning method in the form of an autoencoder, which aims to reconstruct the meta-path and uses a heterogeneous threat knowledge graph as training data to train the autoencoder. The trained encoder can extract the attacker's characteristic information from the data itself without relying on sufficient labeled attacker data.

[0006] The specific technical solutions of the present invention are as follows.

[0007] A method for clustering APT attackers based on heterogeneous graph autoencoders includes the following steps:

[0008] Step S1: Intelligence acquisition and STIX intelligence mapping: obtain attack event reports and related security knowledge from open source intelligence providers in cyberspace, map security knowledge into security entities and security edges according to the STIX standard, and organize security entities and security edges in the form of a graph to form a threat knowledge graph;

[0009] Step S2: Heterogeneous graph autoencoder training, randomly initialize the feature vector of the security entity and use it as the initial feature vector of the threat knowledge graph node; input the feature vector into the autoencoder with meta-path reconstruction as the goal, and finally obtain the feature vectors of all attackers through self-supervised learning;

[0010] Step S3: Attacker clustering: input the threat knowledge graph into the encoder part of the autoencoder to obtain the attacker's feature vector, and then use the K-means algorithm to cluster the attacker nodes to find similar attackers.

[0011] Specifically, step S1 includes the following sub-steps:

[0012] Step S11: Intelligence collection, collecting APT attack event intelligence from the network;

[0013] Step S12: Intelligence formatting, mapping the security knowledge in the intelligence to security entities and security edges in the STIX format;

[0014] Step S13: construct a threat knowledge graph, organizing the formatted security entities and security edges into a heterogeneous graph.

[0015] Specifically, step S2 includes the following sub-steps:

[0016] Step S21: using randomly initialized feature vectors to threaten entity features in the knowledge graph;

[0017] Step S22: construct a meta-path based on expert knowledge, and capture different semantic relationships between nodes through the meta-path;

[0018] Step S23: randomly select some edges in the adjacency matrix based on the meta-path and mask them out;

[0019] Step S24: input the masked adjacency matrix and entity vector into the GAT-based encoder or the GCN encoder to obtain potential node embedding;

[0020] Step S25: input the potential node embedding generated by the encoder and the masked adjacency matrix into a GAT or GCN-based decoder to obtain a decoded node embedding;

[0021] Step S26: reconstructing the adjacency matrix according to the decoded node embedding, and calculating the loss function between the reconstructed adjacency matrix and the initial adjacency matrix;

[0022] Step S27: Use one-dimensional convolution to fuse the feature vectors obtained under different meta-paths and calculate the total loss function.

[0023] Specifically, the randomly initialized feature vector X is expressed as:

[0024]

[0025] Among them, d is the node feature dimension and n is the number of nodes.

[0026] Specifically, the construction of the adjacency matrix based on the meta-path includes:

[0027] For each predefined meta-path p, construct an adjacency matrix A based on the meta-path p ;

[0028] Using ρ as the mask rate, create a mask matrix M according to the Bernoulli distribution p , the elements in this matrix have only two values: 0 or 1, 1 means to keep, 0 means to mask;

[0029] The mask matrix M P and the meta-path-based adjacency matrix A p Multiplying together gives the masked adjacency matrix, expressed as:

[0030]

[0031] Specifically, the autoencoder reconstructs the original adjacency matrix A using the adjacency matrix as input. p , including an encoder and a decoder; the encoder encodes the graph information into the potential node embedding of the node, and the decoder reconstructs the meta-path using the potential node embedding; the encoding process of the encoder is expressed as:

[0032]

[0033] in, is the obtained potential node embedding, f E (·) is the encoder, which is an arbitrary graph neural network.

[0034] Specifically, the decoding process of the decoder is: embedding the obtained potential node into and the masked adjacency matrix Input decoder f D (·), expressed as:

[0035]

[0036] Finally, we get the decoded node embedding

[0037] Specifically, the formula for reconstructing the adjacency matrix is:

[0038]

[0039] Among them, σ(·) is the activation function; the loss function calculation formula is:

[0040]

[0041] Among them, MSE is the mean square error function.

[0042] Specifically, the one-dimensional convolution is used to fuse the features of nodes under different meta-paths and calculate the total loss function, which is expressed as:

[0043]

[0044] Among them, α P is a learnable parameter with the same dimension as the node, representing the importance of the meta-path; using the learned α P The sum of the losses under different meta-paths is expressed as:

[0045] L=∑ p α p βL p ;

[0046] Among them, β is a learnable parameter, and the total loss function is obtained. The autoencoder trains the loss function until convergence.

[0047] Beneficial effects of the present invention: The present invention proposes an APT attacker clustering method based on a heterogeneous graph autoencoder. Aiming at the clustering problem of APT attackers, the threat knowledge from different attack events is organized in the form of a heterogeneous graph, so that the method can extract comprehensive features of the attackers. The autoencoder is used to overcome the obstacle of insufficient labeled samples in reality. In the self-supervised learning process of the autoencoder, meta-path reconstruction is used as the learning goal, so that the autoencoder can effectively extract APT attacker features containing semantic information, so that it can be used for APT attacker clustering tasks. At the same time, the present invention can improve the accuracy of attacker feature extraction when the labeled training samples are insufficient, thereby better completing the attacker clustering task. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a diagram of a heterogeneous graph model architecture in an embodiment of the present invention;

[0049] Figure 2 It is a flow chart of an attacker clustering method based on a heterogeneous graph autoencoder in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described with reference to the accompanying drawings.

[0051] The purpose of the present invention is to overcome the shortcomings of the prior art and use heterogeneous graphs to represent comprehensive and complex threat knowledge. At the same time, a heterogeneous graph autoencoder is used to extract the characteristics of attackers from the data itself when there is insufficient label data, and to cluster attackers. This invention well copes with the situation in which a large amount of network attack data lacks labels, that is, attribution information, in practical applications.

[0052] The objective of the present invention is achieved through the following technical solutions:

[0053] A method for clustering APT attackers based on heterogeneous graph autoencoders includes the following steps:

[0054] Step S1: Intelligence acquisition and STIX intelligence mapping: obtain attack event reports and the security knowledge involved from open source intelligence providers in cyberspace, and map the knowledge into security entities and edges according to the STIX standard. Finally, organize the entities and edges in the form of a graph to form a threat knowledge graph;

[0055] Step S2: Heterogeneous graph autoencoder training, randomly initialize the feature vector of the security entity and use it as the initial feature vector of the threat knowledge graph node; input the feature vector into the autoencoder with the meta-path reconstruction as the goal, which is divided into an encoder and a decoder. Through self-supervised learning, the feature vectors of all attackers are finally obtained;

[0056] Step S3: Attacker clustering: input the threat knowledge graph into the encoder part of the autoencoder to obtain the attacker's feature vector, and then use the K-means algorithm to cluster the attacker nodes to find similar attackers.

[0057] Furthermore, the step S1 specifically includes the following sub-steps:

[0058] Step S11: Intelligence collection, collecting APT attack event intelligence from the network.

[0059] Step S12: Intelligence formatting, mapping the security knowledge in the intelligence to entities and edges in STIX format

[0060] Step S13: Threat knowledge graph construction, organizing the formatted entities and edges into a heterogeneous graph.

[0061] Furthermore, the step S2 specifically includes the following sub-steps:

[0062] Step S21: Use random vectors to initialize entity features in the threat knowledge graph.

[0063] Step S22: construct a meta-path based on expert knowledge, where the meta-path can capture different semantic relationships between nodes.

[0064] Step S23: Randomly select some edges in the adjacency matrix based on the meta-path and mask them out.

[0065] Step S24: Input the masked adjacency matrix and entity vector into the GAT or GCN based encoder to obtain the potential node embedding.

[0066] Step S25: Input the potential node embedding generated by the encoder and the masked adjacency matrix into the GAT or GCN based decoder to obtain the decoded node embedding.

[0067] Step S26: reconstruct the adjacency matrix according to the decoded node embedding, and calculate the loss function between the reconstructed adjacency matrix and the initial adjacency matrix.

[0068] Step S27: Use one-dimensional convolution to fuse the feature vectors obtained under different meta-paths and calculate the total loss function.

[0069] In one embodiment, a method for clustering APT attackers based on a heterogeneous graph autoencoder comprises the following steps:

[0070] Step 1: Intelligence acquisition and STIX intelligence mapping: obtain attack event reports and the security knowledge involved from open source intelligence providers in cyberspace, and map the knowledge into security entities and edges according to the STIX standard. Finally, organize the entities and edges in the form of a graph to form a threat knowledge graph.

[0071] “Intelligence” means data about cyber threats, attack incidents, and other security-related information. To obtain intelligence, data may be obtained from open source intelligence providers through APIs, web crawlers, or other appropriate means.

[0072] STIX (Structured Threat Information eXpression) is a standard for describing threat intelligence. It provides a set of structured data representations that facilitate the sharing and exchange of threat information between different security tools. The standard includes a variety of network security entities, such as malware, threat actors, vulnerabilities, attack patterns, etc.

[0073] By mapping the knowledge extracted from attack incident reports into security entities in the STIX standard, we can establish a relationship graph between security information and thus build a comprehensive threat knowledge graph.

[0074] Step 2: Heterogeneous graph autoencoder training: randomly initialize the feature vector of the security entity and use it as the initial feature vector of the threat knowledge graph node; input the feature vector into the autoencoder with the meta-path reconstruction as the goal, which is divided into an encoder and a decoder. Through self-supervised learning, the feature vectors of all attackers are finally obtained.

[0075] A heterogeneous graph is a graph model that contains multiple different types of nodes and edges, which can represent different entities and the relationships between them. Compared with homogeneous graphs (in which all nodes and edges are of the same type), heterogeneous graphs are more flexible and can better capture and represent complex relationship networks in the real world. Since the threat knowledge graph contains different types of security entities and security relationships, this method constructs and processes the threat knowledge graph in the form of a heterogeneous graph.

[0076] The structure of the model is as follows Figure 1 As shown, the explanation and formula are as follows. First, each entity in the graph is assigned a randomly initialized feature vector:

[0077]

[0078] Where d is the node feature dimension and n is the number of nodes.

[0079] An autoencoder is an unsupervised learning algorithm used to learn an effective representation of data. It consists of two parts, an encoder and a decoder, which maps the input data to a low-dimensional encoding space and then reconstructs the original input data from this encoding space. Since a large number of network attacks in reality cannot be attributed, that is, there are no labels, the supervised learning algorithms that relied on data labels in the past cannot obtain accurate results. Therefore, the present invention proposes an autoencoder algorithm that aims to reconstruct the meta-path.

[0080] Metapath is a concept used to capture the relationship between nodes in heterogeneous graph structures. In heterogeneous graphs, there may be multiple types of relationships between different types of nodes, and metapath defines a node sequence pattern that describes how to connect from one node type to another in the graph. In this method, we aim to reconstruct metapaths so that the autoencoder can learn multiple semantic relationships between attackers.

[0081] For each predefined meta-path p, construct an adjacency matrix A based on the meta-path p Then, using ρ as the mask rate, we create the mask matrix M according to the Bernoulli distribution. P , the elements in this matrix have only two values: 0 or 1, 1 represents retention and 0 represents masking. Then the mask matrix M P and the meta-path-based adjacency matrix A pMultiply to get the masked adjacency matrix:

[0082]

[0083] The goal of the autoencoder is to reconstruct the original adjacency matrix A using the adjacency matrix as input. p .

[0084] The autoencoder consists of two parts: the encoder and the decoder. The encoder encodes the graph information into the latent node embedding of the node, and the decoder is responsible for reconstructing the meta-path using the latent node embedding. The process of the encoder is as follows:

[0085]

[0086] in, is the obtained potential node embedding, f E (·) is the encoder, which can be any graph neural network.

[0087] Then the obtained potential nodes are embedded and the masked adjacency matrix Input decoder f D (·):

[0088]

[0089] Get the decoded node embedding Then, the adjacency matrix based on the meta-path is reconstructed in a similar way to link prediction:

[0090]

[0091] Where σ(·) is the activation function. From this, the loss function can be calculated:

[0092]

[0093] Among them, MSE is the mean square error function. Since multiple meta-paths are usually used, different meta-paths need to be fused next. We use one-dimensional convolution to fuse the features of nodes under different meta-paths and calculate the total loss function.

[0094]

[0095] where α P is a learnable parameter with the same dimension as the node, representing the importance of the meta-path. Similarly, we use the learned α P Let's talk about the sum of losses under different meta-paths:

[0096]

[0097] Where β is a learnable parameter. The total loss function is obtained, and the autoencoder will be trained with this loss function until convergence.

[0098] Step 3: Attacker clustering: input the threat knowledge graph into the encoder part of the autoencoder to obtain the attacker's feature vector, and then use the K-means algorithm to cluster the attacker nodes to find similar attackers.

[0099] Feed the threat knowledge graph into the encoder f in the autoencoder E (·), and obtain the attacker’s node feature H attacker .

[0100] Then, the K-means algorithm is used for clustering, and attackers with similar attack characteristics will be discovered.

[0101] The flow chart of the whole process is as follows: Figure 2 shown.

[0102] The present invention has shown and described the basic principles and main features of the present invention and the advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for clustering APT attackers based on heterogeneous graph autoencoders, characterized in that: The following steps are involved: Step S1: Intelligence acquisition and STIX intelligence mapping: obtain attack event reports and related security knowledge from open source intelligence providers in cyberspace, map security knowledge into security entities and security edges according to the STIX standard, and organize security entities and security edges in the form of a graph to form a threat knowledge graph; Step S2: Heterogeneous graph autoencoder training, randomly initialize the feature vector of the security entity, and use it as the initial feature vector of the threat knowledge graph node; The feature vector is input into the autoencoder with the goal of meta-path reconstruction. Through self-supervised learning, the feature vectors of all attackers are finally obtained. Step S3: Attacker clustering: input the threat knowledge graph into the encoder part of the autoencoder to obtain the attacker's feature vector, and then use the K-means algorithm to cluster the attacker nodes to find similar attackers.

2. According to claim 1, the APT attacker clustering method based on heterogeneous graph autoencoder is characterized in that: The step S1 comprises the following sub-steps: Step S11: Intelligence collection, collecting APT attack event intelligence from the network; Step S12: Intelligence formatting, mapping the security knowledge in the intelligence to security entities and security edges in the STIX format; Step S13: construct a threat knowledge graph, organizing the formatted security entities and security edges into a heterogeneous graph.

3. According to claim 1, the APT attacker clustering method based on heterogeneous graph autoencoder is characterized in that: The step S2 comprises the following sub-steps: Step S21: using randomly initialized feature vectors to threaten entity features in the knowledge graph; Step S22: construct a meta-path based on expert knowledge, and capture different semantic relationships between nodes through the meta-path; Step S23: randomly select some edges in the adjacency matrix based on the meta-path and mask them out; Step S24: input the masked adjacency matrix and entity vector into the GAT-based encoder or the GCN encoder to obtain potential node embedding; Step S25: input the potential node embedding generated by the encoder and the masked adjacency matrix into a GAT or GCN-based decoder to obtain a decoded node embedding; Step S26: reconstructing the adjacency matrix according to the decoded node embedding, and calculating the loss function between the reconstructed adjacency matrix and the initial adjacency matrix; Step S27: Use one-dimensional convolution to fuse the feature vectors obtained under different meta-paths and calculate the total loss function.

4. According to claim 3, the APT attacker clustering method based on heterogeneous graph autoencoder is characterized in that: The randomly initialized feature vector X is expressed as: Among them, d is the node feature dimension and n is the number of nodes.

5. The APT attacker clustering method based on heterogeneous graph autoencoder according to claim 3 is characterized in that: The construction of the adjacency matrix based on the meta-path includes: For each predefined meta-path p, construct an adjacency matrix A based on the meta-path p ; Using ρ as the mask rate, create a mask matrix M according to the Bernoulli distribution P , the elements in this matrix have only two values: 0 or 1, 1 means to keep, and 0 means to mask; The mask matrix M P and the meta-path-based adjacency matrix A p Multiplying together gives the masked adjacency matrix, expressed as:

6. The APT attacker clustering method based on heterogeneous graph autoencoder according to claim 5 is characterized in that: The autoencoder uses the adjacency matrix as input to reconstruct the original adjacency matrix A p , including an encoder and a decoder; the encoder encodes the graph information into the potential node embedding of the node, and the decoder reconstructs the meta-path using the potential node embedding; the encoding process of the encoder is expressed as: in, is the obtained potential node embedding, f E (·) is the encoder, which is an arbitrary graph neural network.

7. The APT attacker clustering method based on heterogeneous graph autoencoder according to claim 6 is characterized in that: The decoding process of the decoder is: embedding the obtained potential node into and the masked adjacency matrix Input decoder f D (·), expressed as: Finally, we get the decoded node embedding 8. The APT attacker clustering method based on heterogeneous graph autoencoder according to claim 7 is characterized in that: The formula for reconstructing the adjacency matrix is: Among them, σ(·) is the activation function; the loss function calculation formula is: Among them, MSE is the mean square error function.

9. The APT attacker clustering method based on heterogeneous graph autoencoder according to claim 8, characterized in that: The one-dimensional convolution is used to fuse the features of nodes in different meta-paths and calculate the total loss function, which is expressed as: Among them, α P is a learnable parameter with the same dimension as the node, representing the importance of the meta-path; using the learned α P The sum of the losses under different meta-paths is expressed as: L=∑ p a P βL P ; Among them, β is a learnable parameter, and the total loss function is obtained. The autoencoder trains the loss function until convergence.

Citation Information

Patent Citations

  • APT attack detection method and device based on mask graph auto-encoder

    CN116192477A

  • Intranet lateral movement attack detection method based on heterogeneous graph

    CN118074924A

  • Network space security threat detection method and system based on heterogeneous graph embedding

    WO2021077642A1

Cited By

  • Heterogeneous graph node representation learning method based on multi-level auto-encoder

    CN119167994A