Vulnerability verification method, device and equipment and computer readable storage medium
Through the combination of natural language processing and large language models, a vulnerability verification solution is generated, which solves the problem of vulnerability verification relying on professional knowledge and inflexibility in the existing technology, and achieves fast and accurate vulnerability verification, strong adaptability, and enhances software security .
Patent Information
- Application Number
- CN202411217211.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-15
AI Technical Summary
Existing vulnerability verification methods rely on complex setups and expertise, and are not flexible enough to adapt to changing cybersecurity threats.
By obtaining natural language descriptions and vulnerability scanning reports, using natural language processing technology to parse and combine pre-built vulnerability knowledge bases, search using large language models, generate target vulnerability verification solutions, and perform vulnerability verification.
It reduces the requirements of professional knowledge, improves the speed and efficiency of vulnerability verification, ensures the accuracy and flexibility of verification results, adapts to changing attack methods, and enhances software security.
Smart Images

Figure CN118965375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and in particular to a vulnerability verification method, device, equipment and computer-readable storage medium. Background Art
[0002] In modern network environments, quickly and accurately verifying software vulnerabilities is key to maintaining information security. Traditional vulnerability verification methods rely on static analysis or predefined rules, such as fuzz testing, machine learning, and formal verification. Although these existing technologies have made progress in vulnerability detection, they usually require complex settings and expertise to generate test cases or interpret model results, and because they rely on known vulnerability patterns or rules, this leads to technical deficiencies in adaptability and flexibility, especially in the face of ever-changing network security threats. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a vulnerability verification method, device, equipment and computer-readable storage medium, which solve the problems of high requirements and inflexibility of vulnerability verification in the prior art.
[0004] In order to solve the above technical problems, the present invention provides a vulnerability verification method, comprising:
[0005] Obtain natural language descriptions of the vulnerabilities to be verified and vulnerability scanning reports;
[0006] Analyze the vulnerability scanning report and the natural language description using natural language processing technology to obtain analysis results;
[0007] Based on the analysis results and the pre-built vulnerability knowledge base, a large language model is used for retrieval, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval results;
[0008] The vulnerability to be verified is verified using the target vulnerability verification scheme to obtain a vulnerability verification result.
[0009] Optionally, the vulnerability scanning report and the natural language description are parsed using natural language processing technology to obtain parsing results, including:
[0010] The vulnerability scanning report and the natural language description are parsed using natural language processing technology to obtain the parsing result including the host, port, vulnerability CVE information, vulnerability description, vulnerability version impact and vulnerability cause.
[0011] Optionally, based on the parsing result and a pre-built vulnerability knowledge base, a large language model is used for retrieval, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval result, including:
[0012] Based on the parsing result and the vulnerability knowledge base, a retrieval is performed using the RAG model of the large language model using fuzzy search technology, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval result.
[0013] Optionally, the process of building the vulnerability knowledge base includes:
[0014] Collect vulnerability data from various sources, including at least documents, databases, and logs;
[0015] The vulnerability data is cleaned, and the cleaned data is classified and labeled, and an index is established to obtain the vulnerability knowledge base.
[0016] Optionally, collect vulnerability data from various sources, including:
[0017] Vulnerability information, attack pattern information, security incident information and code snippet information are collected from various sources; the vulnerability information includes at least the description of known vulnerabilities, the scope of impact and repair methods, the attack pattern information includes at least common attack techniques and attack patterns, the security incident information includes historical security incidents and their handling methods, and the code snippet information includes code examples related to vulnerability exploitation.
[0018] Optionally, based on the parsing result and a pre-built vulnerability knowledge base, a large language model is used for retrieval, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval result, including:
[0019] Based on the parsing results and the pre-built vulnerability knowledge base, each RAG model in the large language model is searched using different search strategies to obtain search results of all the RAG models;
[0020] If the retrieval results of all the RAG models are consistent, generating the target vulnerability verification scheme according to the retrieval results;
[0021] If there is inconsistency in the retrieval results of all the RAG models, the correlation between the retrieval results is calculated, the target retrieval result is determined according to the correlation, and the target vulnerability verification scheme is generated according to the target vulnerability result.
[0022] The present invention also provides a vulnerability verification device, comprising:
[0023] An acquisition module is used to obtain a natural language description of the vulnerability to be verified and a vulnerability scanning report;
[0024] A parsing module, used to parse the vulnerability scanning report and the natural language description using natural language processing technology to obtain a parsing result;
[0025] A generation module, used to perform retrieval using a large language model based on the analysis result and a pre-built vulnerability knowledge base, and generate a target vulnerability verification scheme corresponding to the vulnerability to be verified according to the retrieval result;
[0026] The verification module is used to verify the vulnerability to be verified by using the target vulnerability verification scheme to obtain a vulnerability verification result.
[0027] Optionally, generate modules, including:
[0028] A retrieval unit, configured to retrieve each RAG model in the large language model using different retrieval strategies based on the parsing result and a pre-built vulnerability knowledge base, to obtain retrieval results of all the RAG models;
[0029] A first generating unit, configured to generate the target vulnerability verification scheme according to the retrieval results if the retrieval results of all the RAG models are consistent;
[0030] The second generating unit is used to calculate the correlation between the retrieval results if there is inconsistency among the retrieval results of all the RAG models, determine the target retrieval result according to the correlation, and generate the target vulnerability verification scheme according to the target vulnerability result.
[0031] The present invention also provides a vulnerability verification device, comprising:
[0032] Memory for storing computer programs;
[0033] A processor is used to implement the steps of the above-mentioned vulnerability verification method when executing the computer program.
[0034] The present invention also provides a storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the above-mentioned vulnerability verification method are implemented.
[0035] It can be seen that the present invention obtains the natural language description and vulnerability scanning report of the vulnerability to be verified; uses natural language processing technology to parse the vulnerability scanning report and natural language description to obtain the parsing result; based on the parsing result and the pre-built vulnerability knowledge base, uses the large language model to search and generate the target vulnerability verification scheme corresponding to the vulnerability to be verified; uses the target vulnerability verification scheme to verify the vulnerability to be verified and obtain the vulnerability verification result. The present invention utilizes the powerful learning and understanding ability of the large language model, that is, through the large language model to understand the natural language description and vulnerability scanning report, it can automatically generate the corresponding vulnerability verification scheme, verify the vulnerability, and finally return the verification result. This method reduces the requirements of professional knowledge, improves the verification speed and efficiency, while ensuring the accuracy of the verification results, and can adapt to the ever-changing attack methods, has better flexibility and adaptability, and provides a stronger guarantee for software security.
[0036] In addition, the present invention also provides a vulnerability verification device, equipment and storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Figure 1 A flowchart of a vulnerability verification method provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the structure of a vulnerability verification method and device provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a vulnerability verification method and device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0042] In modern network environments, quickly and accurately verifying software vulnerabilities is key to maintaining information security. Traditional vulnerability verification methods rely on static analysis or predefined rules, such as fuzz testing, machine learning, and formal verification. Fuzz testing is a method of testing a program by automatically generating a large amount of random data inputs in order to trigger unknown vulnerabilities. The direct technical effect of this method is that it can discover some unknown vulnerabilities. However, due to its randomness, fuzz testing may generate a large amount of irrelevant data, resulting in an inefficient verification process. The machine learning method is to identify potential vulnerability patterns by training models. Although this method can identify vulnerability patterns through training, it requires a large amount of labeled data and expertise to train the model. However, the training and maintenance costs of machine learning models are high, and retraining may be required when encountering new vulnerabilities, which is another technical disadvantage. Formal verification is a mathematical method that verifies the correctness of a program through logical proofs to ensure that the program behavior meets the expected specifications. Then, the formal verification method ensures that the program behavior meets the expected specifications through logical proofs, and its direct technical effect is to provide rigorous verification. However, formal verification is usually complex and difficult to apply to large or complex systems, which limits its practicality and is its technical disadvantage.
[0043] Therefore, in order to solve the above-mentioned problems of low efficiency, high cost and poor adaptability, the present invention realizes the automation and intelligence of the vulnerability verification process by utilizing the advanced technology of large language models, thereby effectively overcoming these shortcomings.
[0044] First, some nouns involved in this application are analyzed:
[0045] Large Language Model: Large Language Model (LLM) refers to an artificial intelligence model trained on a large amount of text data, designed to understand and generate human language. These models are usually based on deep learning architectures such as Transformer (a neural network model for sequence-to-sequence learning) and can perform a variety of tasks such as text summarization, translation, sentiment analysis, etc.
[0046] Vulnerability Validation: Vulnerability Validation refers to the process of confirming and testing that security vulnerabilities found in computer systems do exist. This usually involves using specific methods or tools to verify the impact and exploitability of the vulnerability.
[0047] Retrieval-Augmented Generation (RAG) combines the advantages of retrieval models and generative models to address some challenges and problems in text generation. In traditional generative models, such as those based on the Transformer architecture, the system learns to generate answers, text, or other types of outputs from training data. These generative models typically rely on a large number of parameters and computing resources, and may encounter problems such as exposure bias or mode collapse. The RAG method enhances these traditional generative models by introducing a retrieval component. Under the RAG framework, when the model generates output, it first retrieves relevant information or examples, and then generates based on the retrieved content.
[0048] Please refer to Figure 1 , Figure 1 A flowchart of a vulnerability verification method provided by an embodiment of the present invention. The method may include:
[0049] S101: Obtain a natural language description of the vulnerability to be verified and a vulnerability scanning report.
[0050] The executor of this embodiment is a terminal. This embodiment receives a vulnerability scan report containing vulnerability information and a natural language description of the vulnerability that needs to be verified, which is input by the user. The user's language description and scan report can be collected by a text box or voice recognition. The natural language description can refer to the following example. For this website or host, there may be a certain vulnerability. Please verify whether the vulnerability exists through the current information and generate a repair plan. The natural language description in this embodiment can be voice or text. When the natural language description is voice, the voice can be converted into text through voice recognition technology.
[0051] S102: Analyze the vulnerability scanning report and the natural language description using natural language processing technology to obtain analysis results.
[0052] This embodiment uses NLP (natural language processing technology) technology to parse vulnerability scan reports and related natural language descriptions, and extracts parsing results containing key information. This embodiment does not limit the specific natural language processing technology. For example, it can be BERT (Bidirectional Encoder Representations from Transformers) technology, or it can also be GPT (Generative Pre-trained Transformer) technology. The purpose of this step is to process natural language descriptions and vulnerability scan reports, identify and analyze the key features of the vulnerability.
[0053] Furthermore, the above-mentioned use of natural language processing technology to parse the vulnerability scanning report and the natural language description to obtain the parsing result may include the following steps:
[0054] Natural language processing technology is used to parse vulnerability scanning reports and natural language descriptions to obtain analysis results including host, port, vulnerability CVE information, vulnerability description, vulnerability version impact and vulnerability cause.
[0055] This embodiment parses the vulnerability scan report and natural language description, that is, performs semantic analysis to obtain CVE (Common Vulnerabilities and Exposures, a public dictionary that provides unique identifiers and standardized descriptions for known security vulnerabilities, referred to as common vulnerabilities and exposures) information including host, port, vulnerability, vulnerability description, vulnerability version impact and vulnerability cause information.
[0056] S103: Based on the parsing result and the pre-built vulnerability knowledge base, a large language model is used for retrieval to generate a target vulnerability verification solution corresponding to the vulnerability to be verified.
[0057] Based on the parsing result obtained in step S102, the pre-built vulnerability knowledge base is searched using a large language model to generate a corresponding vulnerability verification solution. The vulnerability verification solution includes a vulnerability verification method and a vulnerability verification step, which are verified by calling a verification agent. During the retrieval process, the RAG model can also repeatedly think about the cause of the vulnerability and provide an accurate vulnerability verification solution.
[0058] The process of building a vulnerability knowledge base may specifically include: collecting vulnerability data from various sources, which include at least documents, databases, and logs; cleaning the vulnerability data, and classifying and labeling the cleaned data, as well as establishing an index to obtain a vulnerability knowledge base.
[0059] Specifically, (1) Data collection: Collect data from various sources, including documents, databases, logs, web crawlers, etc. These data sources are wide and diverse, ensuring the comprehensiveness and richness of the knowledge base. (2) Data cleaning: Clean the collected data to remove noise and irrelevant information to ensure the quality of the data. This step is crucial to ensure the accuracy of subsequent analysis. (3) Data classification and labeling: Classify and label the data for subsequent retrieval and analysis. Classification and labeling make the data more orderly and easier to manage. (4) Index construction: Create an index for the data to make the retrieval process more efficient. The establishment of an index greatly improves the retrieval speed and accuracy.
[0060] Furthermore, the content in the above vulnerability database includes: vulnerability information, attack mode information, security event information and code snippet information collected from various sources.
[0061] Specifically, (1) Vulnerability information: detailed description of known vulnerabilities, scope of impact, repair methods, etc. This information helps identify and repair security vulnerabilities in the system. (2) Attack pattern information: common attack methods and patterns. These patterns help understand the attacker's behavior and strategy. (3) Security incident information: historical security incidents and their handling process. These incidents provide valuable lessons. (4) Code snippet information: code examples related to vulnerability exploitation. These code examples can be used directly to verify the vulnerability.
[0062] Furthermore, the above-mentioned retrieval based on the parsing results and the pre-built vulnerability knowledge base using the large language model, and generating a target vulnerability verification scheme corresponding to the vulnerability to be verified according to the retrieval results, may include the following steps:
[0063] Based on the parsing results and the vulnerability knowledge base, fuzzy search technology is used to perform retrieval through the RAG model of the large language model, and the target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval results.
[0064] In this embodiment, the parsed data is passed to the RAG model. The RAG model will first retrieve the data that may exist in the vulnerability knowledge base and return it, and generate the target vulnerability verification scheme based on the retrieved data. The retrieval technology may include: (1) Keyword matching: matching in the knowledge base based on the input keywords. This is the most basic retrieval method, usually using the inverted index algorithm. (2) Semantic search: using natural language processing technology to understand the semantics of the input and perform relevant retrieval. Commonly used algorithms include BERT and Word2Vec (generate word embedding model). (3) Fuzzy search: allowing a certain degree of error to find the result closest to the input. Levenshtein distance is a commonly used fuzzy matching algorithm. In order to ensure the effectiveness and efficiency of the retrieval, this embodiment can use fuzzy search technology for retrieval. The criteria for successful retrieval can be: (1) Relevance: the retrieval results are highly relevant to the input query. (2) Completeness: the retrieval results contain all the information required for the query. (3) Accuracy: the retrieval results are accurate and consistent with the actual situation.
[0065] Furthermore, the above-mentioned retrieval based on the parsing result and the pre-built vulnerability knowledge base using the large language model to generate the target vulnerability verification scheme corresponding to the vulnerability to be verified may include the following steps:
[0066] Step 21: Based on the parsing results and the pre-built vulnerability knowledge base, each RAG model in the large language model uses different retrieval strategies to retrieve and obtain the retrieval results of all RAG models; if the retrieval results of all RAG models are consistent, execute step 22, otherwise, execute step 23.
[0067] Step 22: Generate a target vulnerability verification solution based on the search results;
[0068] Step 23: Calculate the correlation between the various retrieval results, determine the target retrieval results based on the correlation, and generate a target vulnerability verification solution based on the target vulnerability results.
[0069] The above steps 21 to 23 can be applied if there is no relevant data in the vulnerability knowledge base, that is, the RAG model does not retrieve the target data from the vulnerability knowledge base, that is, the retrieval fails and the vulnerability verification solution cannot be generated, then the above steps are executed. Multiple RAG models will be repeatedly thought about and discussed together. The specific process is as follows:
[0070] (1) Multiple thinking: The RAG model will try different retrieval strategies and retrieval methods multiple times to find possible answers, that is, to use the possible answers as retrieval results. This multiple attempt increases the chance of finding the correct answer.
[0071] (2) Joint discussion: Multiple RAG models will share their respective search results and thinking processes and collaborate. This collaboration helps to integrate the insights and information of all parties.
[0072] (3) Decision-making rules:
[0073] (3.1) Consensus decision: If the results of multiple models are consistent, the result is considered credible. This method relies on the consistency between models.
[0074] (3.2) Voting mechanism: If the results are inconsistent, the most likely answer is selected by voting. The voting mechanism can vote based on the confidence score of the agent's results and select the answer with the highest confidence in the agent's discussion. The confidence score is derived from the relevance of the search results based on probability distribution, distance measurement, entropy and other data.
[0075] S104: Verify the vulnerability to be verified using the target vulnerability verification solution to obtain a vulnerability verification result.
[0076] This embodiment uses the target vulnerability verification scheme to verify the vulnerability to be verified, obtains the vulnerability verification result, and can also output the vulnerability verification result to the user. Of course, the vulnerability verification result can be output in the form of a report, and the verification reason can also be output.
[0077] The vulnerability verification method provided by the embodiment of the present invention is applied, by obtaining the natural language description and vulnerability scanning report of the vulnerability to be verified; parsing the vulnerability scanning report and natural language description using natural language processing technology to obtain the parsing result; based on the parsing result and the pre-built vulnerability knowledge base, the large language model is used for retrieval to generate the target vulnerability verification scheme corresponding to the vulnerability to be verified; the target vulnerability verification scheme is used to verify the vulnerability to be verified to obtain the vulnerability verification result. The present invention utilizes the powerful learning and understanding ability of the large language model, that is, the natural language description and the vulnerability scanning report are understood by the large language model, and the corresponding vulnerability verification scheme can be automatically generated, and the vulnerability is verified, and finally the verification result is returned. This method does not require professionals to write complex test cases or rules, thereby reducing the dependence on professional knowledge; because the present invention can automatically generate a verification scheme and execute the verification process, it reduces manual participation and improves the verification speed. Then, because the method of the present invention does not rely on predefined rules or patterns, it can adapt to the ever-changing attack methods and vulnerability types, improve the accuracy of vulnerability verification and the security of the system, provide more powerful security protection for enterprises and organizations, and reduce potential security risks and economic losses. In addition, the powerful learning ability of the large language model ensures the accurate identification of vulnerability features, thereby improving the reliability of the verification results. At the same time, because the vulnerability database and multiple RAG models can be combined for simultaneous analysis and thinking, the understanding ability is greatly enhanced compared to the question and answer situation of a single large language model.
[0078] For a better understanding of the present invention, reference may be made to the following specific embodiments:
[0079] Assume that the scan report shows that there is a web application vulnerability - SQL injection. The user can enter a natural language description similar to "detect possible SQL injection vulnerabilities in the login function". Process the natural language description, identify keywords such as "SQL injection" and "login function", and process the scan report to obtain scan data. Enter the keywords and scan data into the RAG model of the large language model, and then search with the preset vulnerability database to generate a series of verification scripts for SQL injection. Run these verification scripts in a safe sandbox environment to simulate the actions that an attacker may take to check whether there is a vulnerability. Finally, provide a detailed report describing the verification process, whether a vulnerability is found, and the recommended remediation measures.
[0080] The following is an introduction to a vulnerability verification device provided by an embodiment of the present invention. The vulnerability verification device described below and the vulnerability verification method described above can be referenced to each other.
[0081] Please refer to Figure 2 , Figure 2 A schematic diagram of a vulnerability verification device provided by an embodiment of the present invention may include:
[0082] An acquisition module 100 is used to acquire a natural language description of the vulnerability to be verified and a vulnerability scanning report;
[0083] The parsing module 200 is used to parse the vulnerability scanning report and the natural language description using natural language processing technology to obtain a parsing result;
[0084] A generating module 300 is used to perform retrieval using a large language model based on the parsing result and a pre-built vulnerability knowledge base, and generate a target vulnerability verification scheme corresponding to the vulnerability to be verified according to the retrieval result;
[0085] The verification module 400 is used to verify the vulnerability to be verified by using the target vulnerability verification scheme to obtain a vulnerability verification result.
[0086] Based on the above embodiment, the parsing module 200 may include:
[0087] The parsing unit is used to parse the vulnerability scanning report and the natural language description using natural language processing technology to obtain the parsing result including the host, port, vulnerability CVE information, vulnerability description, vulnerability version impact and vulnerability cause.
[0088] Based on the above embodiment, the generating module 300 may include:
[0089] A data acquisition unit, configured to collect vulnerability data from various sources, wherein the sources include at least documents, databases, and logs;
[0090] The vulnerability knowledge base construction unit is used to clean the vulnerability data, classify and annotate the cleaned data, and establish an index to obtain the vulnerability knowledge base.
[0091] Based on the above embodiment, the data acquisition unit may include:
[0092] An information acquisition subunit is used to collect vulnerability information, attack pattern information, security event information and code snippet information from various sources; the vulnerability information at least includes the description of known vulnerabilities, the scope of impact and repair methods, the attack pattern information at least includes common attack techniques and attack patterns, the security event information includes historical security events and their processing methods, and the code snippet information includes code examples related to vulnerability exploitation.
[0093] Based on the above embodiment, the generating module 300 may include:
[0094] The retrieval and generation unit is used to perform retrieval based on the parsing result and the vulnerability knowledge base through the RAG model of the large language model using fuzzy search technology, and generate a target vulnerability verification solution corresponding to the vulnerability to be verified according to the retrieval result.
[0095] Based on any of the above embodiments, the generating module 300 may include:
[0096] A retrieval unit, configured to retrieve each RAG model in the large language model using different retrieval strategies based on the parsing result and a pre-built vulnerability knowledge base, to obtain retrieval results of all the RAG models;
[0097] A first generating unit, configured to generate the target vulnerability verification scheme according to the retrieval results if the retrieval results of all the RAG models are consistent;
[0098] The second generating unit is used to calculate the correlation between the retrieval results if there is inconsistency among the retrieval results of all the RAG models, determine the target retrieval result according to the correlation, and generate the target vulnerability verification scheme according to the target vulnerability result.
[0099] It should be noted that the order of the modules and units in the above-mentioned vulnerability verification device can be changed without affecting the logic.
[0100] The vulnerability verification device provided by the embodiment of the present invention is used to obtain the natural language description and vulnerability scanning report of the vulnerability to be verified through the acquisition module 100; the parsing module 200 is used to parse the vulnerability scanning report and the natural language description using natural language processing technology to obtain the parsing result; the generation module 300 is used to search using the large language model based on the parsing result and the pre-built vulnerability knowledge base, and generate the target vulnerability verification scheme corresponding to the vulnerability to be verified according to the retrieval result; the verification module 400 is used to verify the vulnerability to be verified using the target vulnerability verification scheme to obtain the vulnerability verification result. This device uses the powerful learning and understanding ability of the large language model, that is, through the large language model to understand the natural language description and the vulnerability scanning report, it can automatically generate the corresponding vulnerability verification scheme, verify the vulnerability, and finally return the verification result. The device does not require professionals to write complex test cases or rules, thereby reducing the dependence on professional knowledge; because the present invention can automatically generate the verification scheme and execute the verification process, it reduces manual participation and improves the verification speed. Then, because the method of the present invention does not rely on predefined rules or patterns, it can adapt to the ever-changing attack methods and vulnerability types, improve the accuracy of vulnerability verification and the security of the system, provide stronger security protection for enterprises and organizations, and reduce potential security risks and economic losses. In addition, the powerful learning ability of the large language model ensures the accurate identification of vulnerability features, thereby improving the reliability of the verification results. At the same time, because the vulnerability database and multiple RAG models can be combined for simultaneous analysis and thinking, the understanding ability is greatly enhanced compared to the single large language model question and answer situation.
[0101] The following is an introduction to a vulnerability verification device provided in an embodiment of the present invention. The vulnerability verification device described below and the vulnerability verification method described above can be referenced to each other.
[0102] Please refer to Figure 3 , Figure 3 A schematic diagram of a vulnerability verification device provided by an embodiment of the present invention may include:
[0103] A memory 10, used for storing computer programs;
[0104] The processor 20 is used to execute a computer program to implement the above-mentioned vulnerability verification method.
[0105] The memory 10 , the processor 20 , and the communication interface 31 all communicate with each other via the communication bus 32 .
[0106] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
[0107] Obtain natural language descriptions of the vulnerabilities to be verified and vulnerability scanning reports;
[0108] Use natural language processing technology to parse vulnerability scanning reports and natural language descriptions to obtain parsing results;
[0109] Based on the parsing results and the pre-built vulnerability knowledge base, a large language model is used for retrieval to generate a target vulnerability verification solution corresponding to the vulnerability to be verified;
[0110] The target vulnerability verification scheme is used to verify the vulnerability to be verified and obtain the vulnerability verification result.
[0111] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0112] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0113] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0114] The communication interface 31 may be an interface of a communication module, and is used to connect to other devices or systems.
[0115] Of course, it should be noted that Figure 3 The structure shown does not constitute a limitation on the vulnerability verification device in the embodiment of the present invention. In actual applications, the vulnerability verification device may include Figure 3 More or fewer components than shown, or combinations of certain components.
[0116] The computer-readable storage medium provided in an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the vulnerability verification method described above can be referenced to each other.
[0117] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned vulnerability verification method are implemented.
[0118] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0119] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0120] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0121] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0122] The vulnerability verification method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A vulnerability verification method, characterized in that: include: Obtain natural language descriptions of the vulnerabilities to be verified and vulnerability scanning reports; Analyze the vulnerability scanning report and the natural language description using natural language processing technology to obtain analysis results; Based on the analysis results and the pre-built vulnerability knowledge base, a large language model is used for retrieval, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval results; The vulnerability to be verified is verified using the target vulnerability verification scheme to obtain a vulnerability verification result.
2. The vulnerability verification method according to claim 1, characterized in that: The vulnerability scanning report and the natural language description are parsed using natural language processing technology to obtain parsing results, including: The vulnerability scanning report and the natural language description are parsed using natural language processing technology to obtain the parsing result including the host, port, vulnerability CVE information, vulnerability description, vulnerability version impact and vulnerability cause.
3. The vulnerability verification method according to claim 1, characterized in that: Based on the analysis results and the pre-built vulnerability knowledge base, a large language model is used for retrieval, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval results, including: Based on the parsing result and the vulnerability knowledge base, a retrieval is performed using the RAG model of the large language model using fuzzy search technology, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval result.
4. The vulnerability verification method according to claim 1, characterized in that: The process of building the vulnerability knowledge base includes: Collect vulnerability data from various sources, including at least documents, databases, and logs; The vulnerability data is cleaned, and the cleaned data is classified and labeled, and an index is established to obtain the vulnerability knowledge base.
5. The vulnerability verification method according to claim 4, characterized in that: Vulnerability data is collected from a variety of sources, including: Vulnerability information, attack pattern information, security incident information and code snippet information are collected from various sources; the vulnerability information includes at least the description of known vulnerabilities, the scope of impact and repair methods, the attack pattern information includes at least common attack techniques and attack patterns, the security incident information includes historical security incidents and their handling methods, and the code snippet information includes code examples related to vulnerability exploitation.
6. The vulnerability verification method according to any one of claims 1 to 5, characterized in that: Based on the analysis results and the pre-built vulnerability knowledge base, a large language model is used for retrieval, and a target vulnerability verification scheme corresponding to the vulnerability to be verified is generated according to the retrieval results, including: Based on the parsing result and the pre-built vulnerability knowledge base, each RAG model in the large language model is searched using different search strategies to obtain search results of all the RAG models; If the retrieval results of all the RAG models are consistent, generating the target vulnerability verification scheme according to the retrieval results; If there is inconsistency in the retrieval results of all the RAG models, the correlation between the retrieval results is calculated, the target retrieval result is determined according to the correlation, and the target vulnerability verification scheme is generated according to the target vulnerability result.
7. A vulnerability verification device, characterized in that: include: An acquisition module is used to obtain a natural language description of the vulnerability to be verified and a vulnerability scanning report; A parsing module, used to parse the vulnerability scanning report and the natural language description using natural language processing technology to obtain a parsing result; A generation module, used to perform retrieval using a large language model based on the analysis result and a pre-built vulnerability knowledge base, and generate a target vulnerability verification scheme corresponding to the vulnerability to be verified according to the retrieval result; The verification module is used to verify the vulnerability to be verified by using the target vulnerability verification scheme to obtain a vulnerability verification result.
8. The vulnerability verification device according to claim 7, characterized in that: Generate modules, including: A retrieval unit, configured to retrieve each RAG model in the large language model using different retrieval strategies based on the parsing result and a pre-built vulnerability knowledge base, to obtain retrieval results of all the RAG models; A first generating unit, configured to generate the target vulnerability verification scheme according to the retrieval results if the retrieval results of all the RAG models are consistent; The second generating unit is used to calculate the correlation between the retrieval results if there is inconsistency among the retrieval results of all the RAG models, determine the target retrieval result according to the correlation, and generate the target vulnerability verification scheme according to the target vulnerability result.
9. A vulnerability verification device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the vulnerability verification method according to any one of claims 1 to 6 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the vulnerability verification method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Intelligent vulnerability feature recommendation method based on Transform model
CN120180449A
Vulnerability number identification method and system
CN121711136A
Information management device, information management method, and information management program
WO2026120822A1
