Network attack traffic detection rule generation method and system based on big language model prompt learning, and medium
Through the large language model, we can learn to generate and optimize network attack traffic detection rules, and solve the problems of high misreport rate and high false alarm rate in the existing technology, realize the detection rule set of low false alarm and low misreport, and improve the network Protective effect and reduce labor costs.
Patent Information
- Application Number
- CN202411554523.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing network attack traffic detection system has a high missed rate due to insufficient rules quality, and the existing machine learning methods have high requirements for data quality and high false alarm rates, making it difficult to respond quickly to changes in the network environment, and the generated rules lack interpretation, making it difficult to trust.
Using a method based on large language model prompt learning, the original traffic data is reorganized and decoded, and the detection rules are generated and optimized, and the rule information is mapped with the security knowledge base, and the logical reasoning and knowledge reserve of LLMs are used to generate low false positives. Low missed detection ruleset.
It realizes efficient generation of attack traffic detection rules, reduces the redundancy of rule sets, improves the readability and credibility of detection, can quickly respond to changes in the network environment, reduces labor costs, and fully identify the patterns of attack traffic samples. Technology and vulnerabilities.
Smart Images

Figure CN119052006A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network attack traffic detection, and in particular to a method, system and medium for generating network attack traffic detection rules based on large language model prompt learning. Background Art
[0002] With the full arrival of the information age, network security has become increasingly important as one of the important strategic cornerstones of national security, while traffic-based network attack methods are also constantly developing and causing great damage to network security. Therefore, it is particularly important to detect and protect attack traffic. The detection of these attack traffic is mainly based on intrusion detection systems. According to the specific detection method, intrusion detection systems are mainly divided into two types: rule-based methods and anomaly detection-based methods. Since rule-based methods have the advantages of fast matching speed, strong interpretability, and low false alarm rate, intrusion detection systems deployed in existing real scenarios generally use rule-based methods to detect attack traffic. However, in the intrusion detection systems deployed in practice, alarm fatigue often occurs due to insufficient quality of rules and rule sets, resulting in a decrease in the protection effect caused by high false alarms, and even a large amount of attack traffic is falsely reported. At the same time, obtaining relevant security knowledge of attack traffic samples and comprehensively identifying patterns, technologies, and vulnerabilities related to attack traffic samples are also crucial to drawing a full picture of related attacks and improving the effect of network protection. Therefore, it is necessary to effectively generate corresponding detection rules for attack traffic and map the detection rules to the corresponding security knowledge base to fully understand the attack behavior in the sample in order to improve the network protection effect.
[0003] There are two main schemes for designing attack traffic detection rules: network security expert design and machine learning method extraction. Network security expert design relies on network security experts with rich network protection experience to manually check the attack mode and characteristics of attack traffic, identify corresponding vulnerabilities based on experience, and manually write detection rules to form a set of rules for attack traffic. This scheme can generate vulnerability information corresponding to attack traffic, but it requires high professional quality of the rule writers themselves, consumes a lot of manpower costs, and cannot process large-scale data. It requires multiple rounds of iterations based on the problems generated after actual deployment to generate a relatively complete set of rules, and it is difficult to respond quickly to changes in network environment and attack patterns. Machine learning method extraction uses various machine learning algorithms and models to analyze a large number of network traffic samples and automatically extract patterns and rules from them. This solution has a high degree of automation and can process large-scale data, but it has very high requirements on data quality. In addition to attack traffic, it often needs to use benign traffic for training. Moreover, its recognition effect often declines severely when facing variants of known attack traffic. Retraining will consume a lot of additional computing resources, and the overall false alarm rate is high, especially in network environments with large traffic fluctuations. The generated rules are not explanatory, and the decision-making process of machine learning is difficult to explain. For non-network security experts, the generated rules are often difficult to understand and therefore cannot be trusted. Summary of the invention
[0004] The main purpose of the present invention is to propose a method, system and medium for generating network attack traffic detection rules based on large language model prompt learning, aiming to more effectively generate detection rules for attack traffic and obtain corresponding security knowledge.
[0005] To achieve the above object, the present invention provides a method for generating network attack traffic detection rules based on large language model prompt learning, the method comprising the following steps: Step S10, reorganizing and decoding the original packet data to convert the original traffic session data into readable and understandable HTTP request message data; Step S20, completing the generation, refinement and optimization of network attack traffic detection rules based on the large language model prompt learning; Step S30, completing the mapping process of attack traffic samples, detection rule information and security knowledge base.
[0006] A further technical solution of the present invention is that step S20 comprises: Step S201, based on the idea of large language model prompt learning, input data into the large language model for analysis, generate and refine corresponding detection rules; Step S202, optimizing the rules, eliminating repeated rules to reduce the redundancy of the rule set.
[0007] A further technical solution of the present invention is that step S201 comprises: Step S2011, according to the basic principle of large language model prompt learning and the working logic of attack traffic detection rules, design corresponding targeted prompt texts to generate and refine rules and obtain corresponding vulnerability information.
[0008] A further technical solution of the present invention is that step S2011 comprises: Step S2012, setting a task for the large language model prompt learning, proposing a requirement to find abnormal information and attack behaviors in network traffic, and then the large language model prompt learning confirms the search target based on the understanding of the sample; Step S2013, when receiving the input related attack traffic HTTP request message as the attack traffic sample, the large language model prompts the learning to give the abnormal information in several samples according to the set requirements; Step S2014, using a large language model to prompt learning based on the abnormal information and its understanding of the attack traffic detection rule requirements, integrating various contents to automatically generate generation rules and write detection rules that are effective for attack traffic samples, and providing several alternative rules as required, and providing some description information for the rules; In step S2015, the large language model prompts learning to refine rules based on the effectiveness requirements of attacks of the same category, provide several optimization rules and provide corresponding vulnerability information exploited by the attack samples.
[0009] A further technical solution of the present invention is that after step S202, the following steps are further included: Step S2021, integrate and optimize the rules generated by each group of samples, exclude repeated rules to reduce the redundancy of the rule set, and complete the optimized rule set to meet the requirements of readability and actual deployment.
[0010] A further technical solution of the present invention is that step S30 comprises: Step S301, using a large language model to prompt learning to map attack traffic samples and detection rule information to specific vulnerability IDs and key information in a security knowledge base; Step S302, perform relationship retrieval, associate the specific vulnerability ID and key information to more security databases, and match them with entries in more security knowledge bases to identify all possible attack modes, techniques and vulnerabilities.
[0011] A further technical solution of the present invention is that the security database includes MITRE ATT&CK, CAPEC, CWE, CVE and CPE.
[0012] A further technical solution of the present invention is that step S10 comprises: First, the original data packet is fragmented and reassembled, and then the payload part is decoded to convert it from URL encoding form into HTTP request message.
[0013] To achieve the above-mentioned purpose, the present invention also proposes a network attack traffic detection rule generation system based on large language model prompt learning, characterized in that the system includes a memory, a processor, and a network attack traffic detection rule generation program based on large language model prompt learning stored on the processor, and the network attack traffic detection rule generation program based on large language model prompt learning executes the steps of the method described above when run by the processor.
[0014] To achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, which stores a network attack traffic detection rule generation program based on large language model prompt learning, and the network attack traffic detection rule generation program based on large language model prompt learning executes the steps of the method described above when executed by a processor.
[0015] The beneficial effects of the network attack traffic detection rule generation method, system and medium based on large language model prompt learning of the present invention are: 1. Generate attack traffic detection rules by interacting with the big model. Based on the idea of prompt learning, LLMs' powerful logical reasoning ability and knowledge reserve are used to communicate with it through a conversational user interface in a question-and-answer manner. Prompt text for setting goals and attack traffic data for analysis are input to obtain the corresponding detection rules and attack behavior descriptions in attack traffic samples.
[0016] 2. Combine LLMs to obtain relevant security knowledge of attack traffic samples. Utilize the information extraction and search integration capabilities of LLMs, combine the description information of the detection rules and the original attack sample payload to build the input, obtain relevant security knowledge about the attack traffic samples sorted out by LLMs, and use relationship retrieval to match the information with the entries in the security knowledge base to comprehensively identify the patterns, technologies, and vulnerabilities related to the attack traffic samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0018] Figure 1 It is an overall execution flow chart of the network attack traffic detection rule generation method based on large language model prompt learning of the present invention; Figure 2 It is a flow chart of a preferred embodiment of a method for generating network attack traffic detection rules based on large language model prompt learning of the present invention; Figure 3 It is a system architecture diagram of the network attack traffic detection rule generation system based on large language model prompt learning of the present invention.
[0019] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] In order to more effectively generate detection rules for attack traffic and obtain corresponding security knowledge base mapping, the present invention proposes a network attack traffic detection rule generation and security knowledge base mapping method based on large language model prompt learning. The present invention uses large language models (LLMs) for prompt learning, and uses LLMs' powerful text processing, content retrieval, reasoning analysis and the ability to directly communicate with humans to detect patterns and features in attack traffic, thereby designing corresponding attack traffic detection rules with good detection performance, and optimizing them to generate available detection rule sets with low false positives and low missed negatives, and at the same time gives corresponding security knowledge base mapping.
[0022] Specifically, the present invention proposes a method for generating network attack traffic detection rules based on large language model prompt learning, such as Figure 1 As shown, a preferred embodiment of the network attack traffic detection rule generation method based on large language model prompt learning of the present invention includes the following steps: Step S10, reorganize and decode the traffic plaintext of the original packet data, and convert the original traffic session data into readable and understandable HTTP request message data.
[0023] The system architecture involved in the network attack traffic detection rule generation method based on large language model prompt learning of the present invention is as follows Figure 2 As shown, it includes three parts: preprocessing component, rule generation component and knowledge base mapping component.
[0024] Step S10 is to complete the reassembly and decoding of the traffic plaintext in the traffic preprocessing component. In order to convert the original traffic session data into readable and understandable HTTP request message data, the original packet data is fragmented, reassembled and decoded, so that the data can be input to LLMs for analysis through the conversational user interface in the subsequent prompt learning process.
[0025] Step S20, completing the generation, refinement and optimization of network attack traffic detection rules based on the large language model prompt learning.
[0026] This step S20 is to complete the generation, refinement and optimization of attack traffic detection rules in the rule generation component, which mainly includes two steps: first, use LLMs to prompt learning to generate and refine rules, enter prompt text in the conversational user interface to specify the LLMs task, enter HTTP request message data, let the large model analyze, design corresponding detection rules and refine them, obtain a series of candidate rules, and give corresponding vulnerability information; then manually optimize the rules, exclude repeated rules to reduce the redundancy of the rule set.
[0027] Step S30, completing the mapping process of attack traffic samples, detection rule information and security knowledge base.
[0028] This step S30 is to complete the mapping process of attack traffic samples, detection rule information and security knowledge base in the knowledge base mapping component. It mainly includes two steps: first, use LLMs to map the payload of the attack traffic sample and the information of the detection rule to the specific vulnerability ID and key information in the security database; then perform relationship retrieval to match the ID and key information with more entries in the security knowledge base to identify all possible attack modes, technologies and vulnerabilities, so as to facilitate the subsequent retrieval and analysis of attack behaviors.
[0029] Furthermore, in this embodiment, step S20 specifically includes: Step S201, based on the idea of large language model prompt learning, input data into the large language model for analysis, and generate and refine corresponding detection rules.
[0030] Step S202, optimizing the rules, eliminating repeated rules to reduce the redundancy of the rule set.
[0031] Wherein, the step S201 specifically includes: Step S2011, according to the basic principle of large language model prompt learning and the working logic of attack traffic detection rules, design corresponding targeted prompt texts to generate and refine rules and obtain corresponding vulnerability information.
[0032] The step S2011 specifically includes: Step S2012, setting tasks for the large language model prompt learning, proposing the requirement of finding abnormal information and attack behaviors in network traffic, and then the large language model prompt learning confirms the search target based on the understanding of the samples.
[0033] Step S2013, when receiving the input related attack traffic HTTP request message as the attack traffic sample, the large language model prompts learning to give abnormal information in several samples according to the set requirements.
[0034] Step S2014, using a large language model to prompt learning based on the abnormal information and its understanding of the attack traffic detection rule requirements, integrating various contents to automatically generate generation rules and write detection rules that are effective for attack traffic samples, providing several alternative rules as required, and providing some descriptive information for the rules.
[0035] In step S2015, the large language model prompts learning to refine rules based on the effectiveness requirements of attacks of the same category, provide several optimization rules and provide corresponding vulnerability information exploited by the attack samples.
[0036] In this embodiment, after step S202, the following steps are further included: Step S2021, integrate and optimize the rules generated by each group of samples, exclude repeated rules to reduce the redundancy of the rule set, and complete the optimized rule set to meet the requirements of readability and actual deployment.
[0037] In this embodiment, step S30 includes: Step S301, using a large language model to prompt learning to map attack traffic samples and detection rule information into specific vulnerability IDs and key information in a security knowledge base.
[0038] Step S302, perform relationship retrieval, associate the specific vulnerability ID and key information to more security databases, and match them with entries in more security knowledge bases to identify all possible attack modes, techniques and vulnerabilities.
[0039] The security databases include MITRE ATT&CK, CAPEC, CWE, CVE, and CPE.
[0040] Further in this embodiment, the step S10 specifically includes: First, the original data packet is fragmented and reassembled, and then the payload part is decoded to convert it from URL encoding form into HTTP request message.
[0041] The following combination Figure 1 and Figure 2The generation of network attack traffic detection rules based on large language model prompt learning of the present invention is further elaborated in detail.
[0042] In order to more effectively generate detection rules for attack traffic and obtain the corresponding security knowledge base mapping, the present invention proposes an attack traffic detection rule generation and security knowledge base mapping scheme based on large language model prompt learning, which can be divided into five steps. The overall flow chart is as follows: Figure 1 and Figure 2 As shown. The first step is to reorganize and decode the original traffic session data to generate HTTP request message data for subsequent analysis; the second step is to input the data into LLMs for analysis based on the idea of prompt learning, generate and refine the corresponding detection rules; the third step is to manually optimize the rules, exclude repeated rules to reduce the redundancy of the rule set; the fourth step is to use LLMs to map the attack traffic samples and detection rule information to specific information in the security knowledge base; the fifth step is to perform relationship retrieval, associate the generated security information with more security databases, and identify all possible attack modes, technologies and vulnerabilities. The specific contents of these five steps of the present invention will be described in detail below.
[0043] The first step is sample preprocessing, which involves reassembling and decoding attack traffic samples. Session data collected directly from the network environment is difficult to read and understand, so the original data needs to be converted into readable and understandable HTTP request message data. First, the original packet data is fragmented and reassembled, and then the payload part is decoded to convert it from URL encoding to HTTP request message, which is convenient for data input and analysis in the subsequent prompt learning process.
[0044] The second step is the generation and refinement of attack traffic detection rules. Large language model prompt learning (LLMs PromptLearning) refers to a machine learning method that guides LLMs to output text for specified task targets by designing targeted input prompts. Different from traditional machine learning methods for rule generation, prompt learning uses the inherent knowledge in the pre-trained large language model to retrieve and generate results. It does not require the design of complex algorithms, parameter fine-tuning or additional data training, thereby reducing the use of computing resources, with flexibility and efficiency, and can greatly improve processing efficiency. At the same time, since the prompt learning process is actually a dialogue with LLMs with natural language understanding capabilities, the design of the prompt text can be adjusted at any time according to needs, and the logic and reasons behind the decision-making of LLMs can be obtained to a certain extent, and the vulnerability information corresponding to the rule is given to increase the credibility of the rule. According to the basic principles of prompt learning and the working logic of the attack traffic detection rule, the present invention designs corresponding targeted prompt texts to generate and refine detection rules and obtain corresponding vulnerability information. The prompt learning text designed in the present invention includes four steps. For each group of attack traffic for which detection rules are generated, it is first necessary to initialize the conversational user interface session of LLMs, and then perform the following four steps: The first step is to set the task. Set the task for LLMs and set it as a network security expert. Propose the requirement of finding abnormal information and attack behavior in network traffic. Then LLMs will automatically confirm the search target based on its understanding of the sample, such as possible abnormal request header information or cross-site scripting attack behavior, without the need to set specific requirements related to the content; The second step is to generate abnormal information for attack traffic. Enter a group of related attack traffic HTTP request messages as attack traffic samples (single samples can also be used). LLMs will According to the requirements set previously, several abnormal information in samples are given; the third step is the abnormal information generation rule, which requires LLMs to integrate various contents to automatically generate generation rules and write detection rules that are effective for attack traffic samples based on the abnormal information just generated and its understanding of the attack traffic detection rule requirements. LLMs will give several alternative rules according to the requirements (here you can add settings to generate different categories of rules), and give some description information for the rules; the fourth step is rule refinement, which emphasizes that the rules should be effective for attacks of the same category and requires LLMs to optimize the rules and give the vulnerabilities exploited by the attack samples. LLMs will give multiple optimization rules and corresponding vulnerability information. This prompt learning process is realized by interacting with LLMs in the conversational user interface of LLMs, that is, the operator and LLMs have a question-and-answer exchange.The design of the prompt text needs to emphasize to LLMs the need to generate complete and usable rules in the third and fourth steps. The generated detection rule results can be viewed in the answers to these two questions. Copying and saving them can complete the extraction of the generated results. You can also input additional question instructions to LLMs to let them directly summarize all generated detection rules for viewing.
[0045] The third step is to manually optimize the rule set. After completing the generation of prompt learning detection rules for each group of attack traffic samples, the rules generated for each group of samples need to be integrated and optimized for readability and actual deployment requirements. Since different attack traffic may exploit the same or similar security vulnerabilities, and LLMs will comprehensively check vulnerability information, redundant rules between groups can be manually merged to reduce the redundancy of the rule set. At the same time, all rules and vulnerability information need to be manually read to ensure the effectiveness and credibility of the rules. Unlike manually designed detection rules, this part of the work can be performed by non-network security experts, which greatly reduces the difficulty of the task. At the same time, it can cope with large-scale data sets, save a lot of manpower, and ensure the credibility of the rules. After completing the integration and processing of the rules, you can get a usable attack traffic detection rule set and vulnerability information for testing or deployment.
[0046] The fourth step is security information mapping. LLMs are used to map attack traffic samples and detection rule information to specific information in the security knowledge base. In addition to having strong logical reasoning capabilities, LLMs also have strong search and integration capabilities. In order to more structure the attack information in the sample and facilitate further understanding and processing, LLMs can be used to map attack traffic samples, detection rule information, and security knowledge bases. The input of the LLMs session is constructed by combining the original attack sample payload and the description information of the detection rule, and task definition and information analysis are performed. LLMs are required to output the specific key information and vulnerability IDs in the corresponding specified security database, such as the techniques and tactics in the MITRE ATT&CK framework and the vulnerability IDs of the CVE reference system, thereby converting descriptive text into structured security information.
[0047] The fifth step is to retrieve relations among multiple security databases to obtain full-view attack information. Currently, commonly used security databases include MITRE ATT&CK (MITRE Adversary Tactics, Techniques, and Common Knowledge Base), CAPEC (Common Attack Pattern Enumeration and Classification), CWE (Common Weakness Enumeration), CVE (Common Vulnerabilities and Exposures), CPE (Common Platform Enumeration), etc. There are often some associations between each database. Based on the previous step, you can further use structured security information for relationship retrieval, match key information and vulnerability IDs with entries in more security knowledge bases to identify all possible attack patterns, techniques, and vulnerabilities, deepen your understanding of the attack behavior in the sample, draw a full picture of the attack, and facilitate further retrieval and analysis of the attack behavior in the future, thereby improving the security protection effect.
[0048] The beneficial effects of the network attack traffic detection rule generation method based on large language model prompt learning of the present invention are: 1. Generate attack traffic detection rules by interacting with the big model. Based on the idea of prompt learning, LLMs' powerful logical reasoning ability and knowledge reserve are used to communicate with it through a conversational user interface in a question-and-answer manner. Prompt text for setting goals and attack traffic data for analysis are input to obtain the corresponding detection rules and attack behavior descriptions in attack traffic samples.
[0049] 2. Combine LLMs to obtain relevant security knowledge of attack traffic samples. Utilize the information extraction and search integration capabilities of LLMs, combine the description information of the detection rules and the original attack sample payload to build the input, obtain relevant security knowledge about the attack traffic samples sorted out by LLMs, and use relationship retrieval to match the information with the entries in the security knowledge base to comprehensively identify the patterns, technologies, and vulnerabilities related to the attack traffic samples.
[0050] To achieve the above purpose, the present invention also proposes a network attack traffic detection rule generation system based on large language model prompt learning, such as Figure 3As shown, the system includes a processor 1001, a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002, and a network attack traffic detection rule generation program based on large language model prompt learning stored on the processor, wherein the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art will understand that Figure 3 The system structure shown in the figure does not constitute a limitation of the system, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0052] like Figure 3 As shown, the memory 1005 as a computer storage medium may include an operating device, a network communication module, a user interface module, and a network attack traffic detection rule generation program based on large language model prompt learning.
[0053] exist Figure 3 In the system shown, the network interface 1004 is mainly used to connect to the network server and communicate data with the network server; the user interface 1003 is mainly used to interact with the user terminal and receive instructions input by the user; and the processor 1001 can be used to call the network attack traffic detection rule generation program based on large language model prompt learning stored in the memory 1005.
[0054] To achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, which stores a network attack traffic detection rule generation program based on large language model prompt learning. When the network attack traffic detection rule generation program based on large language model prompt learning is executed by a processor, the steps of the method described above are executed, which will not be repeated here.
[0055] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A method for generating network attack traffic detection rules based on large language model prompt learning, characterized in that: The method comprises the following steps: Step S10, reorganizing and decoding the original packet data to convert the original traffic session data into readable and understandable HTTP request message data; Step S20, completing the generation, refinement and optimization of network attack traffic detection rules based on the large language model prompt learning; Step S30, completing the mapping process of attack traffic samples, detection rule information and security knowledge base.
2. According to the method for generating network attack traffic detection rules based on large language model prompt learning in claim 1, it is characterized in that: The step S20 comprises: Step S201, based on the idea of large language model prompt learning, input data into the large language model for analysis, generate and refine corresponding detection rules; Step S202, optimizing the rules, eliminating repeated rules to reduce the redundancy of the rule set.
3. The method for generating network attack traffic detection rules based on large language model prompt learning according to claim 2 is characterized in that: The step S201 includes: Step S2011, according to the basic principle of large language model prompt learning and the working logic of attack traffic detection rules, design corresponding targeted prompt texts to generate and refine rules and obtain corresponding vulnerability information.
4. The method for generating network attack traffic detection rules based on large language model prompt learning according to claim 3 is characterized in that: The step S2011 includes: Step S2012, setting a task for the large language model prompt learning, proposing a requirement to find abnormal information and attack behaviors in network traffic, and then the large language model prompt learning confirms the search target based on the understanding of the sample; Step S2013, when receiving the input related attack traffic HTTP request message as the attack traffic sample, the large language model prompts the learning to give the abnormal information in several samples according to the set requirements; Step S2014, using a large language model to prompt learning based on the abnormal information and its understanding of the requirements of the attack traffic detection rules, integrating various contents to automatically generate rules and write detection rules that are effective for the attack traffic samples, and providing several alternative rules as required, and providing some description information for the rules; In step S2015, the large language model prompts learning to refine rules based on the effectiveness requirements of attacks of the same category, provide several optimization rules and provide corresponding vulnerability information exploited by the attack samples.
5. The method for generating network attack traffic detection rules based on large language model prompt learning according to claim 4 is characterized in that: After step S202, the following steps are further included: Step S2021, integrate and optimize the rules generated by each group of samples, exclude repeated rules to reduce the redundancy of the rule set, and complete the optimized rule set to meet the requirements of readability and actual deployment.
6. The method for generating network attack traffic detection rules based on large language model prompt learning according to claim 5 is characterized in that: The step S30 comprises: Step S301, using a large language model to prompt learning to map attack traffic samples and detection rule information to specific vulnerability IDs and key information in a security knowledge base; Step S302, perform relationship retrieval, associate the specific vulnerability ID and key information to more security databases, and match them with entries in more security knowledge bases to identify all possible attack modes, techniques and vulnerabilities.
7. The method for generating network attack traffic detection rules based on large language model prompt learning according to claim 6 is characterized in that: The security databases include MITRE ATT&CK, CAPEC, CWE, CVE, and CPE.
8. The method for generating network attack traffic detection rules based on large language model prompt learning according to claim 1 is characterized in that: The step S10 comprises: First, the original data packet is fragmented and reassembled, and then the payload part is decoded to convert it from URL encoding form into HTTP request message.
9. A network attack traffic detection rule generation system based on large language model prompt learning, characterized in that: The system includes a memory, a processor, and a network attack traffic detection rule generation program based on large language model prompt learning stored on the processor. When the network attack traffic detection rule generation program based on large language model prompt learning is executed by the processor, the steps of the method described in any one of claims 1 to 8 are executed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a network attack traffic detection rule generation program based on large language model prompt learning, and the network attack traffic detection rule generation program based on large language model prompt learning executes the steps of the method described in any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Network traffic control method, device and equipment and storage medium
CN117278278A
Automatic generation method of attack graph interaction rule for honey point deployment
CN118101346A
Large language model enhancement method based on APT knowledge graph associated data
CN118646607A
Advanced Rule Analyzer to Identify Similarities in Security Rules, Deduplicate Rules, and Generate New Rules
US20200272741A1
Cited By
Security threat detection method and device, equipment and medium
CN120567541A
Network attack traffic detection method and device, computer equipment and storage medium
CN120582813A
Network attack traffic detection method and apparatus, computer device, and storage medium
CN120582813B
Methods for optimizing a representation for detecting a pattern of a traffic flow and devices thereof
EP4794290A1
