Threat intelligence intention classification method and device, storage medium and program product

By processing threat intelligence using binary classification and multi-label classification models, the problem of lacking attack intent classification in existing technologies is solved, enabling fast and accurate threat intelligence analysis.

CN119026121APending Publication Date: 2024-11-26BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing threat intelligence classification methods mainly focus on threat types, but lack classification of attack intentions, resulting in labor-intensive and inefficient in-depth analysis processes.

Method used

Threat intelligence is processed using a binary classification model and a multi-label classification model. First, it is determined whether the threat is related to ATT&CK. Then, the specific attack intent, including reconnaissance, resource exploitation, and initial access, is identified based on the multi-label classification model.

Benefits of technology

It enables rapid and accurate classification of threat intelligence, reduces the workload of in-depth analysis, and improves the efficiency and accuracy of attack intent identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026121A_ABST
    Figure CN119026121A_ABST
Patent Text Reader

Abstract

The invention provides an intention classification method and device for threat intelligence, a storage medium and a program product. The method comprises the following steps: processing a text sequence of threat intelligence through a text encoder to obtain a text embedding vector; inputting the text embedding vector into a dichotomy model to obtain a prediction result output by the dichotomy model; the prediction result is used for representing whether the threat intelligence is related to ATTamp; performing CK correlation; if the prediction result represents threat intelligence and ATTamp; and if CK correlation is carried out, inputting the text embedding vector into a multi-label classification model to obtain an intention label of threat intelligence output by the multi-label classification model. According to the method, the text embedding vectors corresponding to the threat intelligence are classified by using the dichotomy model, and then the threat intelligence and the ATTamp are determined; and under the condition of CK correlation, the multi-label classification model is utilized to re-classify the text embedding vector, and the intention label corresponding to the threat intelligence is determined, so that intention classification of the threat intelligence is realized, and subsequent analysis is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a threat intelligence intent classification method, device, storage medium and program product. Background Art

[0002] With the rapid increase in security attacks and data breaches, cybersecurity has become a top global concern. CTI is evidence-based knowledge about existing or emerging threats, used to understand the attacker's intentions and the correlation between attacks. Due to the existence of a wide variety of attacks, experts have developed unified standards to define different stages of attacks or classify attacks, and organize the sharing of threat information in various report exchange formats. With this standard, everyone can describe attack behavior and intentions in a common language, such as the MITRE ATT&CK lifecycle framework, which describes attacks through tactics, techniques, and procedures (TTPs). However, analysis reports rely on case-by-case processing. When a new attack is detected, it is necessary to observe which report the attack is similar to in order to determine the attacker's goal. Therefore, a technical solution that can classify attack intent with CTI is needed to alleviate the labor-intensive problem of in-depth analysis of attack events.

[0003] Currently, threat intelligence is usually classified into threat types. This classification method can only obtain the threat type of the text, but does not focus on the type of attack intent. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, storage medium and program product for classifying the intent of threat intelligence, so as to classify the intent of threat intelligence.

[0005] In a first aspect, an embodiment of the present application provides a method for classifying intent of threat intelligence, including:

[0006] The text sequence of threat intelligence is processed through a text encoder to obtain a text embedding vector;

[0007] The text embedding vector is input into the binary classification model to obtain the prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes LSTM layer, dropout layer and activation function;

[0008] If the prediction result indicates that the threat intelligence is related to ATT&CK, the text embedding vector is input into the multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer, and a classification layer.

[0009] The embodiment of the present application first classifies the text embedding vector corresponding to the threat intelligence by using a binary classification model. When it is determined that the threat intelligence is related to ATT&CK, the text embedding vector is classified again by using a multi-label classification model to determine the intent label corresponding to the threat intelligence, thereby realizing the intent classification of the threat intelligence and facilitating subsequent analysis.

[0010] In any embodiment, the text encoder includes an embedding layer, a self-attention mechanism, and a feed-forward neural network; the text sequence of the threat intelligence is processed by the text encoder, including:

[0011] Convert the text sequence into an initial vector representation through an embedding layer;

[0012] The vector representation is processed through the self-attention mechanism to obtain the target vector representation containing context information;

[0013] The target vector representation is transformed through a feedforward neural network to obtain the text embedding vector.

[0014] The embodiment of the present application generates a text embedding vector from the text sequence of threat intelligence by using a text encoder, so that subsequent binary classification models and multi-label classification models can recognize it, which facilitates subsequent classification processing.

[0015] In any embodiment, the text embedding vector is input into the binary classification model to obtain the prediction result output by the binary classification model, including:

[0016] The text embedding vector is processed through the LSTM layer and dropout layer in the binary classification model to obtain the dependency relationship of the sentences in the text embedding vector;

[0017] The text embedding vector is predicted through the activation function of the binary classification model to obtain the prediction result.

[0018] The embodiment of the present application classifies the text embedding vector by using a binary classification model. Since the binary classification model includes a dropout layer, the generalization ability of the binary classification model can be improved and the accuracy of the prediction results can be improved.

[0019] In any embodiment, the text embedding vector is input into the multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model, including:

[0020] Performing feature extraction on the text embedding vector through a feature extraction layer to obtain text features;

[0021] The forward and backward information of the text features are processed through the BiLSTM layer to obtain hidden state sequences in two directions; the hidden state sequence includes the context information of the text at different positions;

[0022] The attention weight of each time step is calculated through the attention layer, and a context vector that incorporates the attention weight is generated based on the attention weight and the hidden state sequence;

[0023] The context vector is predicted through the classification layer to obtain the intent label.

[0024] The embodiment of the present application classifies text embedding vectors through BiLSTM with an attention mechanism, which can accurately identify the key features of the text and capture the dependencies between different labels, thereby quickly classifying threat intelligence and improving classification accuracy.

[0025] In any embodiment, the method further comprises:

[0026] Acquire a training sample, wherein the training sample includes training threat intelligence and intent classification corresponding to the training threat intelligence;

[0027] Input the training text embedding vector corresponding to the training threat intelligence into the model to be trained to obtain the predicted value output by the model to be trained;

[0028] The loss function value is calculated according to the predicted value and the intent classification, and the model parameters of the model to be trained are optimized using the loss function value to obtain a multi-label classification model.

[0029] In any embodiment, optimizing the model parameters of the model to be trained using the loss function value includes:

[0030] The loss function value is used as the objective function, multiple initial points are determined in the parameter space, and a Gaussian process model is constructed using the multiple initial points;

[0031] Repeat the following steps until the optimal model parameters are determined from the selected target sampling points after the termination condition is reached:

[0032] Determine an acquisition function, and select a target sampling point in the parameter space according to an evaluation result of the acquisition function on the current model parameters corresponding to the model to be trained;

[0033] Evaluate the objective function at the target sampling point to obtain new observation data; the observation data includes new model parameters and corresponding loss function values;

[0034] Refit the Gaussian process model to the target sampling points.

[0035] The embodiment of the present application improves the performance of the multi-label classification model by training the model to be trained to determine the optimal model parameters.

[0036] In any embodiment, the intent tag includes at least one of: reconnaissance, resource exploitation, initial access, execution, persistence, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, command and control, data theft, and compromise.

[0037] In a second aspect, an embodiment of the present application provides a threat intelligence intent classification device, including:

[0038] The text embedding module is used to process the text sequence of threat intelligence through a text encoder to obtain a text embedding vector;

[0039] The binary classification module is used to input the text embedding vector into the binary classification model to obtain the prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer, and an activation function;

[0040] The multi-label classification module is used to input the text embedding vector into the multi-label classification model if the prediction result indicates that the threat intelligence is related to ATT&CK, so as to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer and a classification layer.

[0041] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus, wherein:

[0042] The processor and the memory communicate with each other via the bus;

[0043] The memory stores program instructions that can be executed by the processor, and the processor can execute the method of the first aspect by calling the program instructions.

[0044] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium, including:

[0045] The non-transitory computer-readable storage medium stores computer instructions that cause the computer to execute the method of the first aspect.

[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, wherein when the computer program instructions are read and executed by a processor, the method of the first aspect is executed.

[0047] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A flowchart of a threat intelligence intent classification method provided in an embodiment of the present application;

[0050] Figure 2 A schematic diagram of the structure of a threat intelligence intent classification device provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0054] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0055] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0056] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0057] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0058] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0059] Given the increasing severity of cybersecurity issues and the emergence of cyberattacks, cybersecurity has become a global focus. CTI is evidence-based knowledge about existing or emerging threats and is the key to understanding attacker intent and the correlation between attacks. Due to the variety of attack methods, experts have developed unified standards to define or classify different stages of attacks and share threat information through various report exchange formats. These standards enable us to describe attack behaviors and intentions in a common language, such as the MITRE ATT&CK lifecycle framework, which uses tactics, techniques, and procedures (TTPs) to describe attacks.

[0060] However, current analysis reports mainly rely on processing each case one by one. Whenever a new attack is detected, it is necessary to carefully compare and observe which existing reports it is similar to in order to infer the attacker's goal. Therefore, a technical solution that can classify the attack intent of CTI is needed to reduce the workload during in-depth analysis and improve the efficiency and accuracy of responding to attack incidents. Currently, most of the threat intelligence is classified according to the threat type, and there are few methods for classifying the attack intent of threat intelligence.

[0061] Therefore, the embodiments of the present application provide a method, device, storage medium and program product for classifying the intent of threat intelligence. First, a binary classification model is used to determine whether the threat intelligence is related to ATT&CK. If it is related, a multi-label classification model is used to determine which ATT&CK tactic (i.e., attack intent) the threat intelligence belongs to, which enables threat intelligence experts to quickly identify the attack targets in the report, perform specific attack behavior analysis based on the attack intent, and reduce analysis time.

[0062] For ease of understanding, before introducing the specific implementation methods of the present application, the relevant terms involved in the embodiments of the present application are explained.

[0063] Cyber ​​Threat Intelligence (CTI): Information collected, analyzed, and shared about security threats to network systems, network devices, and network communications. It is designed to help organizations understand the motivations, goals, and attack patterns of threat actors, so that they can make more informed, data-driven security decisions. Cyber ​​threat intelligence usually includes the following types: malware intelligence, vulnerability intelligence, attack behavior intelligence, malicious domain name and IP address intelligence, social media intelligence, weak password and password attack intelligence, incident response intelligence, etc.

[0064] ATT&CK: The full name is MITRE Adversarial Tactics, Techniques, and Common Knowledge, which is a knowledge base based on actual observed attack techniques and tactics created and maintained by the non-profit organization MITRE.

[0065] Tactics: Indicates short-term tactical goals during an attack, such as "initial access", "persistence", "privilege escalation", etc. Tactics represent the "why" of ATT&CK techniques and are the tactical goals of the adversary's actions.

[0066] Techniques: Describes the means by which the adversary achieves its attack objectives, such as "Malicious Email Attachment," "Credential Theft," or "Windows Management Interface Exploitation." There are multiple techniques within each tactical category.

[0067] Sub-techniques: Describes the adversary’s technical means of achieving tactical objectives at a lower level than technology. For example, the T1059 Command and Script Interpreter technique has eight sub-techniques, including PowerShell, AppleScript, Windows Command Shell, etc.

[0068] ATT&CK tactics include: reconnaissance, resource exploitation, initial access, execution, persistence, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, command and control, exfiltration, and impact.

[0069] Reconnaissance: Before an attacker compromises an organization, they gather information that can be used to plan future actions. Reconnaissance involves the attacker actively or passively gathering information that can be used to target an attack. This information may include details about the victim organization, infrastructure, or employees. Attackers can also use this information to assist in other stages of the attack lifecycle, such as using the collected information to plan and execute initial access, determine the scope of action and target priority after the compromise, or drive further reconnaissance efforts.

[0070] Resource development: This is when an attacker builds resources for future operations. Resource development involves attackers creating, purchasing, or stealing resources that can be used to target an attack. Such resources include infrastructure, accounts, or capabilities. Attackers can also use these resources in other stages of the attack lifecycle, such as using purchased domains for command and control, using email accounts for phishing to gain "initial access," or stealing code signing certificates to bypass defenses.

[0071] Initial Access: Typically, "initial access" is when an attacker establishes a foothold in an enterprise environment. From this point on, the attacker will use different techniques to achieve initial access based on the information gathered prior to the intrusion. For example, an attacker uses a spear-phishing attachment to attack. The attachment will exploit some type of vulnerability to achieve this level of access, such as PowerShell or other scripting technology. If executed successfully, the attacker can then employ other tactics and techniques to achieve the ultimate goal.

[0072] Execution: Of all the tactics an attacker can use in an offense, the most widely used one is “execution.” When an attacker considers using off-the-shelf malware, ransomware, or an APT attack, they will choose “execution.” For malware to be effective, it must be run so that defenders have a chance to block or detect it. However, not all malware has malicious executables that can be easily found with antivirus software. Additionally, command line interfaces, or PowerShell, are extremely useful to attackers. Many fileless malware utilize one or a combination of these techniques.

[0073] Persistence: After the attacker has persistent access, even if the operator takes measures such as restarting or changing credentials, the computer can still be infected with the virus again or maintain its existing connection. For example, the registry run key and startup folder are the most commonly used techniques, which are executed every time the computer is started. Therefore, the attacker can achieve persistence when launching common applications such as web browsers or Microsoft Office. Among all ATT&CK tactics, persistence is one of the tactics that should be paid attention to the most.

[0074] Privilege escalation: ATT&CK states that "the focus should be on preventing attack tools from running in the early stages of the activity chain and identifying subsequent malicious behavior." This means that in-depth defense is needed to prevent virus infection, such as the terminal's perimeter defense system or application whitelisting. For privilege escalation beyond the scope of ATT&CK, the prevention method is to use a hardened baseline on the terminal. Another way to deal with privilege escalation is audit logging. When attackers use certain techniques in privilege escalation, they usually leave clues that expose their purpose. Especially for host-side logs, all operation and maintenance commands of the server need to be recorded for forensics and real-time auditing.

[0075] Defense Evasion: These are techniques that attackers use to avoid detection by defenses throughout the attack. Techniques used to bypass defenses include uninstalling / disabling security software or obfuscating / encrypting data and scripts. Attackers can also exploit and abuse trusted processes to hide and disguise malware. An interesting aspect of this tactic is that some malware, such as ransomware, don't care about defense bypasses. Their only goal is to execute once on a device and then be detected as quickly as possible. Some techniques can fool antivirus (AV) products into not detecting them at all, or bypass application whitelisting techniques.

[0076] Credentialed access: Any attacker who breaks into an enterprise wants to maintain a certain level of stealth. Attackers want to steal as many credentials as possible. Sure, they can brute force, but that makes too much noise. There are also many examples of stealing hashed passwords and passing the hash or cracking hashed passwords offline. Of all the information to steal, the attacker's favorite is to steal plain text passwords. Plain text passwords may be stored in plain text files, databases, or even the registry. It is very common for an attacker to break into a system, steal local hashed passwords, and crack the local administrator password. The simplest way to deal with credentialed access is to use complex passwords. It is recommended to use a combination of uppercase and lowercase, numbers, and special characters to make it difficult for attackers to crack the password. Finally, it is necessary to monitor the use of valid accounts because in many cases, data breaches occur through valid credentials.

[0077] Discovery: Includes techniques that attackers use to gain information about systems and internal networks. These techniques help attackers observe the environment and determine direction before deciding how to act. Attackers can use these techniques to explore what they can control and what is happening around their entry point, and use this acquired information to help them achieve their attack objectives. Attackers can also use native operating system tools for post-compromise information gathering purposes.

[0078] Lateral Movement: Attackers will often attempt to move laterally within a network after exploiting a single system vulnerability. Even ransomware that targets a single system will attempt to move laterally within the network in search of additional targets. Attackers will often look for a foothold and then begin moving through systems, looking for higher access privileges in hopes of reaching their ultimate goal. When it comes to mitigating and detecting lateral movement, proper network segmentation can go a long way toward mitigating the risks posed by lateral movement.

[0079] Collection: refers to the techniques used by the attacker to gather information from sources that are relevant to the attacker's objectives. Often, the next step after gathering data is to steal it. Common attack sources include various drive types, browsers, audio, video, and email. Common collection methods include capturing screenshots and keyboard input. Enterprises can use the various techniques in this tactic to learn more about how malware is processing data in the organization. Attackers will try to steal information about users, including what is on the screen, what users are typing, what users are discussing, and what users look like.

[0080] Command and Control: Consists of techniques used by attackers to communicate with compromised systems within the victim's network. Attackers typically avoid detection by mimicking normal, expected traffic. There are a number of ways that attackers can establish command and control with varying levels of stealth, depending on the victim's network structure and defenses. Most malware today uses command and control tactics to some degree. The attacker can receive data from a command and control server and tell the malware what to do next. For each type of command and control, the attacker is accessing the network from a remote location. Therefore, understanding what is happening on the network is critical to effectively counter these techniques.

[0081] Exfiltration: This includes techniques used by attackers to steal data from a user's network. Once an attacker has access, they will look around for relevant data and then begin to steal data, but not all malware reaches this stage. In the case of attackers stealing data over the network, especially when stealing large amounts of data (such as a customer database), having a network intrusion detection or prevention system in place can help identify when data is being transmitted.

[0082] Impact: The attacker attempts to manipulate, disrupt, or destroy the enterprise's systems and data. Techniques used for "impact" include destroying or tampering with data. In some cases, business processes may appear fine, but the data may have been tampered with by the attacker. These techniques may be used by the attacker to accomplish their ultimate goals or provide cover for stealing confidential information.

[0083] BERT model: A pre-trained language representation model based on the Transformer structure, designed to generate bidirectional representations of text through deep learning technology.

[0084] It can be understood that the intent classification method of threat intelligence provided in the embodiment of the present application can be applied to electronic devices, which include terminals and servers; wherein the terminal can specifically be a smart phone, a tablet computer, a computer, a personal digital assistant (PDA), etc.; the server can specifically be an application server or a Web server.

[0085] Figure 1 A flowchart of a threat intelligence intent classification method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0086] Step 101: Process the text sequence of threat intelligence through a text encoder to obtain a text embedding vector.

[0087] Among them, the text encoder can adopt the BERT model structure to process the text sequence of threat intelligence and obtain the corresponding text embedding vector. It is understandable that threat intelligence includes multiple sentences, but not all of them can be called sentences. Therefore, Stanza can be used to parse the sentences in the threat intelligence and retain sentences with more than a preset number of words, for example: retain sentences with more than three words. Stanza is a natural language processing toolkit based on neural networks. In addition, since the text encoder has requirements for the input length, for sentences in the threat intelligence that are longer than the preset length, they are split into multiple short sentences.

[0088] After obtaining multiple sentences, insert a start tag at the beginning of each sentence, for example: [CLS], and insert an end tag at the end of each sentence, for example: [SEP]. Then obtain the text sequence according to the position of the sentence. For example:

[0089] in, is a text sequence, x1,x2,...,x m For each sentence after splitting.

[0090] Step 102: Input the text embedding vector into the binary classification model to obtain the prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer, and an activation function.

[0091] The binary classification model is used to process the text embedding vector and output whether the threat intelligence is related to ATT&CK. The LSTM layer in the binary classification model includes at least one LSTM module, and each LSTM module includes an input gate, an output gate, and a forget gate. The LSTM layer can effectively capture long-term dependencies in the data.

[0092] The dropout layer is a regularization technique that reduces co-adaptation between neurons by randomly setting the output of a portion of the nodes in the network to 0 (i.e., "discarding") during training. This means that in each training iteration, the neural network "sees" a different subset of the data in a random manner, forcing the network to learn more robust feature representations rather than relying on noise or specific patterns that may exist in the training data. Therefore, by following the LSTM layer with a dropout layer, the model's generalization ability on unseen data can be improved to prevent overfitting.

[0093] The text embedding vector is used as the input of the LSTM layer of layer l. After passing through the dropout layer, its output is:

[0094] t l = dropout(lstm(t))

[0095] in, represents that the input t first passes through the LSTM layer and then the dropout layer, l is the number of layers of the LSTM module with dropout, and t l The output of the last layer of the stacked LSTM module with dropout. The dependency relationship of the complete sentence is learned through LSTM. Since LSTM modules often face overfitting, the use of dropout technology can effectively improve the generalization ability of the model and obtain better performance in the process of processing data.

[0096] Finally, the sigmoid function is used to predict the probability that threat intelligence is related or unrelated to ATT&CK.

[0097] The embodiment of the present application can set a probability threshold according to actual needs. For example, if the probability of obtaining threat intelligence related to ATT&CK is greater than 80%, the threat intelligence is considered to be related to ATT&CK; otherwise, the threat intelligence is considered to be unrelated to ATT&CK.

[0098] Step 103: If the prediction result indicates that the threat intelligence is related to ATT&CK, the text embedding vector is input into the multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer, and a classification layer.

[0099] The multi-label classification model can analyze the text embedding vector to output all the intent labels corresponding to the text embedding vector. It is understandable that the text embedding vector can have only one intent label or multiple intent labels. Intent labels include but are not limited to: reconnaissance, resource development, initial access, execution, maintenance, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, command and control, exfiltration, and influence.

[0100] In the case where the threat intelligence is determined to be relevant to ATT&CK in the previous step, the text embedding vector t corresponding to the threat intelligence is passed as input to the feature extraction layer, which includes multiple convolutional layers in CNN. Each convolutional layer uses ReLU as the activation function and extracts different features through convolution operations. After each convolutional layer, maximum pooling is used to further compress and extract features. There may be a large number of hidden layers in CNN, which use a lot of calculations to extract features.

[0101] The BiLSTM layer is a variant of LSTM that enhances the model's ability to capture contextual information by introducing a bidirectional mechanism. BiLSTM works by combining two LSTM layers in opposite directions (a forward LSTM and a reverse LSTM). The forward LSTM layer processes the sequence in the natural order of the input sequence (from front to back), while the reverse LSTM layer processes the sequence in the opposite order (from back to front). The outputs of the two LSTM layers at the same time step are then concatenated to form the final output for each time step.

[0102] The attention layer is located after the BiLSTM layer. It receives the output of the BiLSTM layer and calculates the attention weights for each time step or spatial position. These weights are then used to perform weighted summation on the output of the previous layer to obtain the output of the current layer.

[0103] The classification layer is used to analyze the output of the previous layer and output the intent label to which the threat intelligence belongs.

[0104] The embodiment of the present application first classifies the text embedding vector corresponding to the threat intelligence by using a binary classification model. When it is determined that the threat intelligence is related to ATT&CK, the text embedding vector is classified again by using a multi-label classification model to determine the intent label corresponding to the threat intelligence, thereby realizing the intent classification of the threat intelligence and facilitating subsequent analysis.

[0105] Based on the above embodiment, the text encoder includes an embedding layer, a self-attention mechanism, and a feedforward neural network; the text sequence of threat intelligence is processed by the text encoder, including:

[0106] Convert the text sequence into an initial vector representation through an embedding layer;

[0107] The vector representation is processed through the self-attention mechanism to obtain the target vector representation containing context information;

[0108] The target vector representation is transformed through a feedforward neural network to obtain the text embedding vector.

[0109] In the specific implementation process, the text encoder can be built based on the BERT model. The BERT model is based on the Transformer structure, which consists of two parts: an encoder and a decoder. However, BERT mainly uses the encoder part. In the encoder, the input sequence is first converted into a vector representation through an embedding layer, and these vectors are used as the initial representation of the input sequence. Then, these vectors pass through multiple layers of self-attention mechanisms and feed-forward neural networks to finally obtain the representation of the output sequence.

[0110] When using BERT to generate word embeddings, you can preprocess the input sequence, generate the sentence vector of the corresponding text through BERT, and use the sentence vector sequence of the text as text embedding. The specific method is as follows:

[0111] The input text sequence will first be segmented into a series of words or subwords by the tokenizer. These words or subwords will be converted into a fixed-length vector, namely word embedding. In addition, BERT will also add position embedding to represent the position information of the word in the sentence, and segment embedding (in some tasks such as question-answering systems) to distinguish different sentences or paragraphs. These three embeddings (word embedding, position embedding, paragraph embedding) will be added together to form the final input vector representation.

[0112] Self-Attention Mechanism: In a multi-layer Transformer encoder, each layer processes the input vector through a self-attention mechanism. The self-attention mechanism allows the model to simultaneously pay attention to all other words in the sentence when processing a certain word, and calculates the weights based on the similarity between them to obtain a new representation of the word. This mechanism enables BERT to capture the complex semantic relationship between words and generate vector representations containing rich contextual information.

[0113] Feed-Forward Neural Network: The vector processed by the self-attention mechanism is further transformed through a feed-forward neural network to extract higher-level features. Feed-forward neural networks are usually composed of multiple fully connected layers, and activation functions (such as ReLU) are used between each layer to increase nonlinearity.

[0114] After being processed by the multi-layer Transformer encoder, each word or subword in the input text will get a corresponding output vector. These output vectors are text embedding vectors, which can well represent the semantic information of words or texts.

[0115] The embodiment of the present application generates a text embedding vector from the text sequence of threat intelligence by using a text encoder, so that subsequent binary classification models and multi-label classification models can recognize it, which facilitates subsequent classification processing.

[0116] Based on the above embodiment, the text embedding vector is input into the binary classification model to obtain the prediction result output by the binary classification model, including:

[0117] The text embedding vector is processed through the LSTM layer and dropout layer in the binary classification model to obtain the dependency relationship of the sentences in the text embedding vector;

[0118] The text embedding vector is predicted through the activation function of the binary classification model to obtain the prediction result.

[0119] In the specific implementation process, when using the binary classification model to process the text embedding vector to determine whether the threat intelligence is related to ATT&CK, the specific method is as follows:

[0120] The text embedding vector is first input into the LSTM layer, and the flow of information is controlled by the forget gate, input gate, and output gate of the LSTM layer, so as to capture the long-term dependencies in the text embedding vector.

[0121] Among them, the forget gate determines how much information of the cell state at the previous moment needs to be forgotten. It decides which information to forget by looking at the input at the current moment and the output at the previous moment.

[0122] The input gate determines what new information needs to be added to the cell state. It has two parts: a sigmoid layer determines which values ​​will be updated. A tanh layer generates a new vector of candidate values ​​that may be added to the cell state.

[0123] The output gate determines what information will be passed to the current output value ht of the LSTM. It first passes through a sigmoid layer to determine which parts of the cell state will be output, then passes through a tanh layer to scale the cell state value to between -1 and 1, and finally outputs the product of the two.

[0124] Combine the outputs of the forget gate and the input gate to update the cell state. Specifically, first pass through the forget gate to decide how much old information to forget, and then pass through the input gate to decide how much new information to add.

[0125] The output of the LSTM layer is input to the dropout layer. It should be noted that since the cell state of the LSTM is passed across time steps, applying dropout directly to the LSTM output may destroy the information flow across time steps. Therefore, when applying dropout in LSTM, a common practice is to apply dropout on the output (i.e., hidden state) of the LSTM layer, but not on the cell state.

[0126] After passing through the dropout layer, the output of the dropout layer is input into the activation layer, and the input content is predicted by the activation function in the activation layer to obtain the prediction result. The activation function may be a sigmoid function.

[0127] It should be noted that before using the binary classification model, the binary classification model can be trained using training samples, wherein the training samples include training threat intelligence and labels corresponding to the training threat intelligence, and the labels are used to characterize whether the training threat intelligence is related to ATT&CK. The training text embedding vector corresponding to the training threat intelligence is used as input to the binary classification model to be trained, and the binary classification model to be trained outputs a prediction result. The prediction result and the label are used to optimize the internal parameters of the binary classification model to be trained, and a trained binary classification model is obtained after multiple iterations of training.

[0128] The embodiment of the present application classifies the text embedding vector by using a binary classification model. Since the binary classification model includes a dropout layer, the generalization ability of the binary classification model can be improved and the accuracy of the prediction results can be improved.

[0129] Based on the above embodiment, the text embedding vector is input into the multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model, including:

[0130] Performing feature extraction on the text embedding vector by a feature extraction module to obtain text features;

[0131] The forward and backward information of the text features are processed through the BiLSTM layer to obtain hidden state sequences in two directions; the hidden state sequence includes the context information of the text at different positions;

[0132] The attention weight of each time step is calculated through the attention layer, and a context vector that incorporates the attention weight is generated based on the attention weight and the hidden state sequence;

[0133] The context vector is predicted through the classification layer to obtain the intent label.

[0134] In the specific implementation process, when using the multi-label classification model to process the text embedding vector, the specific steps are as follows:

[0135] First, the text embedding vector t is passed to the feature extraction layer as the input of the multi-label classification model. The feature extraction layer includes multiple convolutional layers, each of which uses ReLU as the activation function to extract different features through convolution operations. After each convolutional layer, maximum pooling is used to further compress and extract features. There may be a large number of hidden layers in the feature extraction layer, which use a lot of calculations to extract features.

[0136] After that, the output of the feature extraction layer is used as the input of the BiLSTM with attention mechanism. BiLSTM consists of two unidirectional LSTMs, one from front to back and one from back to front, which can consider the contextual information of the input data at the same time, laying the foundation for subsequent predictions. The attention mechanism allows the model to give different attention or attention to different parts when processing a sequence. This helps the model focus on the most important parts of the input sequence and ignore irrelevant parts. In text classification, this can ensure that the model can more accurately identify the key features of the text.

[0137] On the output of the Bi-LSTM layer, the multi-label classification model applies an attention mechanism to calculate attention scores for each time step and combines these scores with the corresponding hidden states to generate a context vector for a given time step.

[0138] For a given time step t, calculate the attention score of the hidden state And concatenate it with the corresponding hidden state to generate the context vector

[0139]

[0140] For a given time step t, represents the attention score, W A is the weight parameter, b A is the deviation term, is the set of forward and backward hidden states, is the context vector. By calculating the attention score, it helps the multi-label classification model focus on the more important parts of the threat intelligence. The context vector captures the important information of all time steps in the input sequence.

[0141] Finally, the context vector is sent to the sigmoid output layer, and 14 tactics are predicted through a single-layer forward network with a sigmoid activation function. Since the embodiment of the present application constructs a multi-label classifier, if the probability difference between the highest and second highest intent labels is within 10%, then the text has two tactical labels. Similarly, if the probability difference between the top three highest intent labels is within 10%, then the text has three tactical labels.

[0142] The embodiment of the present application classifies text embedding vectors through BiLSTM with an attention mechanism, which can accurately identify the key features of the text and capture the dependencies between different labels, thereby quickly classifying threat intelligence and improving classification accuracy.

[0143] Based on the above embodiment, before using the multi-label classification model, the multi-label classification model may be trained first, and the training method is as follows:

[0144] A large number of training samples can be obtained from the Internet, each of which includes training threat intelligence and corresponding intent classification. It is understood that the intent classification includes but is not limited to: reconnaissance, resource development, initial access, execution, maintenance, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, command and control, exfiltration and impact.

[0145] The training text embedding vector corresponding to the training threat intelligence is used as the input of the model, and the intent classification corresponding to the training threat intelligence is used as the label to train the model to be trained. Among them, the method for obtaining the training text embedding vector can refer to the method for obtaining the text embedding vector in the above embodiment. The model to be trained processes the training text embedding vector and outputs a predicted value. Then, the loss function value is calculated using the predicted value and the intent classification corresponding to the training threat intelligence, and the model parameters of the model to be trained are optimized using the loss function value.

[0146] The training model is iteratively trained according to the above method until the training stop condition is reached to obtain a trained multi-label classification model.

[0147] The condition for stopping training may be that the number of iterative training reaches a preset number; the rate of change of the loss function value is less than a preset value, etc.

[0148] When optimizing model parameters, the following methods can be used:

[0149] The loss function value is used as the objective function, multiple initial points are determined in the parameter space, and a Gaussian process model is constructed using the multiple initial points;

[0150] Repeat the following steps until the optimal model parameters are determined from the selected target sampling points after the termination condition is reached:

[0151] Determine an acquisition function, and select a target sampling point in the parameter space according to an evaluation result of the acquisition function on the current model parameters corresponding to the model to be trained;

[0152] Evaluate the objective function at the target sampling point to obtain new observation data; the observation data includes new model parameters and corresponding loss function values;

[0153] Refit the Gaussian process model to the target sampling points.

[0154] In the specific implementation process, the method of optimizing model parameters may include four parts: preparation stage, building Gaussian process model, iterative optimization and output results. Each part is described below:

[0155] 1. Preparation stage:

[0156] 1. Define the problem: clarify the objective function (i.e., the model performance index to be adjusted) and parameter space (i.e., the set of all possible model parameters) that need to be optimized. In the embodiment of the present application, the loss function of the model to be trained is used as the objective function.

[0157] 2. Initialization:

[0158] Select initial points: Select several initial points in the parameter space, which can be chosen randomly or based on prior knowledge.

[0159] Evaluate initial points: Calculate the objective function value at these initial points as the initial data set.

[0160] 2. Constructing Gaussian Process Model

[0161] 1. Gaussian Process (GP):

[0162] Assume that the objective function follows a Gaussian process, that is, the joint distribution of the function values ​​on any finite set of points follows a Gaussian distribution.

[0163] Define the mean function and covariance function (or kernel function) of the Gaussian process, which determine the properties of the Gaussian process.

[0164] 2. Fitting model:

[0165] Use the initial data set to fit the Gaussian process model, that is, to solve the parameters of the model (such as the parameters of the mean function and the hyperparameters of the covariance function).

[0166] This is usually done by maximizing the marginal likelihood, which is the probability of the Gaussian process model on the observed data.

[0167] 3. Iterative Optimization

[0168] 1. Select the acquisition function:

[0169] The acquisition function is used to evaluate the potential value of different parameter combinations in the next iteration.

[0170] Common acquisition functions include Expected Improvement (EI), Probability of Improvement (PI) and Upper Confidence Bound (UCB).

[0171] 2. Select the next sampling point:

[0172] According to the evaluation result of the acquisition function, a sampling point that is most likely to bring improvement is selected in the parameter space, namely the target sampling point.

[0173] This point will be used for the next round of objective function evaluation.

[0174] 3. Evaluate the objective function:

[0175] The objective function is evaluated at the selected target sampling points to obtain new observation data (i.e., parameter combinations and their corresponding objective function values).

[0176] 4. Update the Gaussian process model:

[0177] New observations are added to the dataset and the Gaussian process model is refitted.

[0178] Update the model's mean and covariance functions to reflect the new observation information.

[0179] 5. Repeat iteration:

[0180] Repeat steps 2 to 4 until a preset maximum number of iterations, a time limit, or other termination conditions are met (such as the improvement in the objective function value is less than a certain threshold).

[0181] 4. Output results

[0182] Optimal parameter combination: After the iteration is completed, the optimal parameter combination found during the entire iteration process is output.

[0183] Objective function value: Output the objective function value corresponding to the optimal parameter combination, that is, the performance index of the model under the optimal parameters.

[0184] The embodiment of the present application improves the performance of the multi-label classification model by training the model to be trained to determine the optimal model parameters.

[0185] Figure 2 The schematic diagram of the structure of a threat intelligence intent classification device provided in the embodiment of the present application, the device can be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the description above. To avoid repetition, detailed description is appropriately omitted here. The device includes: a text embedding module 201, a binary classification module 202 and a multi-label classification module 203, wherein:

[0186] The text embedding module 201 is used to process the text sequence of threat intelligence through a text encoder to obtain a text embedding vector;

[0187] The binary classification module 202 is used to input the text embedding vector into the binary classification model to obtain the prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer, and an activation function;

[0188] The multi-label classification module 203 is used to input the text embedding vector into the multi-label classification model if the prediction result indicates that the threat intelligence is related to ATT&CK, so as to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer and a classification layer.

[0189] Based on the above embodiment, the text encoder includes an embedding layer, a self-attention mechanism and a feedforward neural network; the text embedding module 201 is specifically used for:

[0190] Convert the text sequence into an initial vector representation through an embedding layer;

[0191] Processing the vector representation through the self-attention mechanism to obtain a target vector representation containing context information;

[0192] The target vector representation is transformed by the feedforward neural network to obtain the text embedding vector.

[0193] Based on the above embodiment, the binary classification module 202 is specifically used for:

[0194] Processing the text embedding vector through the LSTM layer and the dropout layer in the binary classification model to obtain the dependency relationship of the sentences in the text embedding vector;

[0195] The text embedding vector is predicted by using the activation function of the binary classification model to obtain the prediction result.

[0196] Based on the above embodiment, the multi-label classification module 203 is specifically used for:

[0197] Performing feature extraction on the text embedding vector through a feature extraction layer to obtain text features;

[0198] Processing the forward information and backward information of the text feature through the BiLSTM layer to obtain hidden state sequences in two directions; the hidden state sequence includes the context information of the text at different positions;

[0199] Calculate the attention weight of each time step through the attention layer, and generate a context vector fused with the attention weight according to the attention weight and the hidden state sequence;

[0200] The context vector is predicted through the classification layer to obtain the intent label.

[0201] Based on the above embodiment, the device further includes a model training module, which is used to:

[0202] Acquire a training sample, wherein the training sample includes training threat intelligence and intent classification corresponding to the training threat intelligence;

[0203] Inputting the training text embedding vector corresponding to the training threat intelligence into the model to be trained to obtain the predicted value output by the model to be trained;

[0204] A loss function value is calculated according to the predicted value and the intent classification, and the model parameters of the model to be trained are optimized using the loss function value to obtain the multi-label classification model.

[0205] Based on the above embodiment, the model training module is specifically used for:

[0206] Using the loss function value as the objective function, determining a plurality of initial points in the parameter space, and constructing a Gaussian process model using the plurality of initial points;

[0207] Repeat the following steps until the optimal model parameters are determined from the selected target sampling points after the termination condition is reached:

[0208] Determine an acquisition function, and select a target sampling point in the parameter space according to an evaluation result of the acquisition function on the current model parameters corresponding to the model to be trained;

[0209] Evaluate the objective function at the target sampling point to obtain new observation data; the observation data includes new model parameters and corresponding loss function values;

[0210] The Gaussian process model is refitted according to the target sampling points.

[0211] Based on the above embodiments, the intent tag includes at least one of the following: reconnaissance, resource exploitation, initial access, execution, persistence, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, command and control, data theft, and compromise.

[0212] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application, such as Figure 3 As shown, the electronic device includes: a processor (processor) 301, a memory (memory) 302 and a bus 303; wherein,

[0213] The processor 301 and the memory 302 communicate with each other via the bus 303;

[0214] The processor 301 is used to call the program instructions in the memory 302 to execute the methods provided by the above-mentioned method embodiments, for example, including: processing the text sequence of threat intelligence through a text encoder to obtain a text embedding vector; inputting the text embedding vector into a binary classification model to obtain a prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer and an activation function; if the prediction result characterizes that the threat intelligence is related to ATT&CK, then inputting the text embedding vector into a multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer and a classification layer.

[0215] The processor 301 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0216] The memory 302 may include but is not limited to random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.

[0217] The present embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: processing a text sequence of threat intelligence through a text encoder to obtain a text embedding vector; inputting the text embedding vector into a binary classification model to obtain a prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer and an activation function; if the prediction result characterizes that the threat intelligence is related to ATT&CK, inputting the text embedding vector into a multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer and a classification layer.

[0218] The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: processing the text sequence of threat intelligence through a text encoder to obtain a text embedding vector; inputting the text embedding vector into a binary classification model to obtain a prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer and an activation function; if the prediction result characterizes that the threat intelligence is related to ATT&CK, then inputting the text embedding vector into a multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer and a classification layer.

[0219] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0220] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0221] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0222] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0223] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A threat intelligence intent classification method, characterized in that: include: The text sequence of threat intelligence is processed through a text encoder to obtain a text embedding vector; Inputting the text embedding vector into a binary classification model to obtain a prediction result output by the binary classification model; the prediction result is used to characterize whether the threat intelligence is related to ATT&CK; the binary classification model includes an LSTM layer, a dropout layer, and an activation function; If the prediction result represents that the threat intelligence is related to ATT&CK, the text embedding vector is input into a multi-label classification model to obtain the intent label of the threat intelligence output by the multi-label classification model; the multi-label classification model includes a feature extraction layer, a BiLSTM layer, an attention layer and a classification layer.

2. The method according to claim 1, characterized in that The text encoder includes an embedding layer, a self-attention mechanism, and a feedforward neural network; the text encoder is used to process the text sequence of threat intelligence, including: Convert the text sequence into an initial vector representation through an embedding layer; Processing the vector representation through the self-attention mechanism to obtain a target vector representation containing context information; The target vector representation is transformed by the feedforward neural network to obtain the text embedding vector.

3. The method according to claim 1, characterized in that The step of inputting the text embedding vector into a binary classification model to obtain a prediction result output by the binary classification model includes: Processing the text embedding vector through the LSTM layer and the dropout layer in the binary classification model to obtain the dependency relationship of the sentences in the text embedding vector; The text embedding vector is predicted by using the activation function of the binary classification model to obtain the prediction result.

4. The method according to claim 1, characterized in that: Inputting the text embedding vector into a multi-label classification model to obtain an intent label of the threat intelligence output by the multi-label classification model includes: Performing feature extraction on the text embedding vector through a feature extraction layer to obtain text features; Processing the forward information and backward information of the text feature through the BiLSTM layer to obtain hidden state sequences in two directions; the hidden state sequence includes the context information of the text at different positions; Calculate the attention weight of each time step through the attention layer, and generate a context vector fused with the attention weight according to the attention weight and the hidden state sequence; The context vector is predicted through the classification layer to obtain the intent label.

5. The method according to claim 1, characterized in that The method further comprises: Acquire a training sample, wherein the training sample includes training threat intelligence and intent classification corresponding to the training threat intelligence; Inputting the training text embedding vector corresponding to the training threat intelligence into the model to be trained to obtain the predicted value output by the model to be trained; A loss function value is calculated according to the predicted value and the intent classification, and the model parameters of the model to be trained are optimized using the loss function value to obtain the multi-label classification model.

6. The method according to claim 5, characterized in that The optimizing the model parameters of the model to be trained by using the loss function value includes: Using the loss function value as the objective function, determining a plurality of initial points in the parameter space, and constructing a Gaussian process model using the plurality of initial points; Repeat the following steps until the optimal model parameters are determined from the selected target sampling points after the termination condition is reached: Determine an acquisition function, and select a target sampling point in the parameter space according to an evaluation result of the acquisition function on the current model parameters corresponding to the model to be trained; Evaluate the objective function at the target sampling point to obtain new observation data; the observation data includes new model parameters and corresponding loss function values; The Gaussian process model is refitted according to the target sampling points.

7. The method according to any one of claims 1 to 6, characterized in that: The intent tag includes at least one of the following: reconnaissance, resource exploitation, initial access, execution, persistence, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, command and control, data theft, and compromise.

8. An electronic device, characterized in that: include: processor, memory and bus, wherein, The processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which, when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 6 is executed.

Citation Information

Cited By

  • TTP description matching method, program product, electronic equipment and storage medium

    CN119766567A