Vulnerability identification and load matching method based on large pre-training language model
Processing vulnerability and payload information through a large pre-trained language model solves the lag and inefficiency problems of rule-based methods, achieves high-precision vulnerability identification and payload matching, and improves verification efficiency.
Patent Information
- Application Number
- CN202410530276.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-09-06
AI Technical Summary
Existing rule-based vulnerability identification and payload matching methods rely on expert experience and have problems with lag and low verification efficiency.
Using a vulnerability identification and payload matching method based on a large-scale pre-trained language model, by initializing the vulnerability library, payload library and natural language processing model, pre-training is performed and the target IP address is scanned to match the vulnerability CVE ID and the collection status information of the attack load. .
It reduces the dependence on expert experience, improves vulnerability verification efficiency, and can output highly accurate vulnerability numbers and payload information.
Smart Images

Figure CN118606950A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vulnerability identification, and in particular relates to a vulnerability identification and load matching method based on a large pre-trained language model. Background Art
[0002] Vulnerability identification based on scanned text and artificial intelligence models is an emerging security research field that aims to use natural language processing (NLP) technology to automatically identify security vulnerabilities in the target host. It is mainly divided into the following aspects:
[0003] Static analysis tools: These tools analyze source code or binary files to identify potential security vulnerabilities. For example, tools such as SonarQube, Checkmarx, and Fortify can detect common vulnerabilities in code, such as SQL injection, cross-site scripting (XSS), and buffer overflows.
[0004] Dynamic analysis tools: These tools detect and identify security vulnerabilities while the program is running. For example, tools such as Valgrind, AddressSanitizer, and Dr.Memory can detect problems such as memory leaks, use of uninitialized variables, and buffer overflows.
[0005] Fuzz testing tools: These tools test the robustness of software by generating random inputs to discover potential security vulnerabilities. For example, tools such as AFL (American Fuzzy Lop), Peach Fuzzer, and Boofuzz can automatically generate a large number of random inputs to detect abnormal behaviors and vulnerabilities in software.
[0006] Natural Language Processing (NLP) technologies: These technologies are used to analyze and understand human language and can be applied to the field of vulnerability identification. For example, NLP technologies can be used to extract information about vulnerabilities from sources such as vulnerability reports, documents, and social media to better understand and predict potential security threats.
[0007] Machine learning and deep learning methods: These methods can be used to automatically learn and identify security vulnerabilities. For example, machine learning algorithms such as support vector machines (SVM), decision trees, random forests, and convolutional neural networks (CNN) can be used to train models to identify security vulnerabilities in software. In addition, deep learning methods such as recurrent neural networks (RNN) and long short-term memory networks (LSTM) can be used to process sequence data such as code or log files to detect potential security vulnerabilities.
[0008] Vulnerability databases and knowledge bases: These resources contain information about known security vulnerabilities, which can help researchers understand different types of vulnerabilities and their characteristics. For example, resources such as the CVE (Common Vulnerabilities and Exposures) database, NVD (National Vulnerability Database), and OWASP (Open Web Application Security Project) provide a wealth of vulnerability information and solutions.
[0009] At present, vulnerability identification and payload matching are mainly implemented in a rule-based manner, that is, experts in the field of cyberspace security, based on their existing experience, associate known vulnerabilities and payloads with specific key information of a specific system, software version, etc. After scanning and obtaining the host information, the vulnerabilities existing in the current host are determined through rule search and matching.
[0010] Rule-based vulnerability identification and load matching are highly dependent on expert experience and have a lag. Rule-based vulnerability identification and load matching require experts to analyze the vulnerabilities and formulate corresponding vulnerability identification rules before vulnerability identification and load matching can be achieved based on the rules. Therefore, the formulation of rules needs to go through multiple stages such as expert analysis and verification, which has a certain lag.
[0011] The possible results provided by rule-based vulnerability identification and payload matching are equivalent, resulting in low verification efficiency. Rule-based vulnerability identification and payload matching give one or more matching vulnerabilities and corresponding payloads at a time based on the host scan results. The importance of these given results is equivalent and there is no order of priority. In the subsequent vulnerability verification process, the results need to be randomly verified with vulnerability verification code or vulnerability payload, without order of priority, resulting in low verification efficiency. Summary of the invention
[0012] In response to the above technical problems, the present invention proposes a vulnerability identification and load matching solution based on a large pre-trained language model.
[0013] The first aspect of the present invention provides a vulnerability identification and load matching method based on a large pre-trained language model. The method comprises:
[0014] Step S1, initializing vulnerability library, payload library, and natural language processing model;
[0015] wherein the natural language processing model is associated with the vulnerability library and the load library, and the natural language processing model is pre-trained;
[0016] Step S2, specifying a target IP and verifying the authenticity of the target IP;
[0017] If the authenticity verification fails, the target IP is re-assigned;
[0018] Step S3: for the object corresponding to the target IP address, select a pre-trained natural language processing model, the vulnerability library and the payload library for performing vulnerability identification and payload matching tasks;
[0019] Step S4: Scan the object corresponding to the target IP address, and input the vulnerability information obtained by the scan into the pre-trained natural language processing model, and the pre-trained natural language processing model matches the vulnerability information obtained by the scan with the pre-learned vulnerability knowledge of the vulnerability library to determine and output the matching vulnerability CVE ID;
[0020] Step S5: Match the matched vulnerability CVE ID with the number of the attack payload in the payload library to obtain the collection status information of the vulnerability attack payload;
[0021] Step S6: Feedback the scan text of the object corresponding to the target IP address, the vulnerability identification result, and the collection status information of the vulnerability attack payload.
[0022] According to the method of the first aspect of the present invention, the vulnerability library contains several vulnerabilities with CVE IDs; the payload library contains several vulnerability attack payloads used by Metasploit Framework; the initialization of step S1 includes associating the natural language processing model with the vulnerability library and the payload library, and pre-training the natural language processing model; wherein, during the pre-training process:
[0023] The vulnerability knowledge of the vulnerability library is input into the natural language processing model as a training set, and the natural language processing model learns the vulnerability knowledge, and matches the collected vulnerability information with the learned vulnerability knowledge, and determines and outputs the corresponding vulnerability CVE ID;
[0024] The vulnerability CVE ID is matched with the corresponding code of the attack payload in the payload library to obtain the vulnerability attack payload.
[0025] According to the method of the first aspect of the present invention, in step S3, the pre-trained natural language processing model is selected according to the task requirements of the vulnerability identification and payload matching tasks, and the vulnerability library and the payload library are selected according to the object type corresponding to the target IP address.
[0026] According to the method of the first aspect of the present invention, before step S4, the method further includes: verifying the target IP address, the pre-trained natural language processing model, the vulnerability library and the payload library respectively; wherein:
[0027] If the payload library fails the verification, reselecting the pre-trained natural language processing model, the vulnerability library, and the payload library;
[0028] If the target IP address is wrong, reassign the target IP address.
[0029] According to the method of the first aspect of the present invention, in step S4, if the vulnerability information obtained by the scan does not match the vulnerability knowledge of the pre-learned vulnerability library, the vulnerability identification result is that the vulnerability is not identified and there is no corresponding payload.
[0030] According to the method of the first aspect of the present invention, in step S5, if the matched vulnerability CVE ID matches the number of the attack payload in the payload library, the collection status information of the vulnerability attack payload is collected, otherwise it is not collected.
[0031] According to the method of the first aspect of the present invention, in step S6, the scanned text, the vulnerability identification result and the collection status information of the vulnerability attack payload are fed back; wherein, the vulnerability identification result includes a real vulnerability label and a predicted vulnerability label, and the collection status information of the vulnerability attack payload includes a matching load path.
[0032] A second aspect of the present invention provides a vulnerability identification and load matching system based on a large pre-trained language model. The system includes a processing unit, which is configured to execute:
[0033] Initializing a vulnerability library, a load library, and a natural language processing model; wherein the natural language processing model is associated with the vulnerability library and the load library, and the natural language processing model is pre-trained;
[0034] Specifying a target IP and verifying the authenticity of the target IP; wherein, if the authenticity verification fails, re-specifying the target IP;
[0035] For the object corresponding to the target IP address, select a pre-trained natural language processing model, the vulnerability library, and the payload library for performing vulnerability identification and payload matching tasks;
[0036] Scanning the object corresponding to the target IP address, and inputting the vulnerability information obtained by the scan into the pre-trained natural language processing model, the pre-trained natural language processing model matches the vulnerability information obtained by the scan with the pre-learned vulnerability knowledge of the vulnerability library to determine and output a matching vulnerability CVE ID;
[0037] Matching the matched vulnerability CVE ID with the number of the attack payload in the payload library to obtain the collection status information of the vulnerability attack payload;
[0038] Feedback is provided of the scanned text of the object corresponding to the target IP address, the vulnerability identification result and the collection status information of the vulnerability attack payload.
[0039] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, a vulnerability identification and load matching method based on a large pre-trained language model according to the first aspect of the present invention is implemented.
[0040] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a vulnerability identification and load matching method based on a large pre-trained language model according to the first aspect of the present invention is implemented.
[0041] In summary, the technical solution of the present invention processes the collected target information through a natural language processing model to obtain high-precision vulnerability numbers and load information. The present invention can reduce the dependence on expert experience and improve the efficiency of vulnerability verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 Schematic diagram of vulnerability text description information according to an embodiment of the present invention.
[0044] Figure 2 Schematic diagram of a flow chart of a vulnerability identification and payload matching method based on a large pre-trained language model according to an embodiment of the present invention.
[0045] Figure 3 Schematic diagram of a vulnerability library according to an embodiment of the present invention.
[0046] Figure 4 Schematic diagram of a load library according to an embodiment of the present invention.
[0047] Figure 5 2 is a schematic diagram of carrier feedback information according to an embodiment of the present invention.
[0048] Figure 6 Schematic diagram of online vulnerability assessment results according to an embodiment of the present invention.
[0049] Figure 7 This is a schematic diagram of a startup page for an offline vulnerability assessment algorithm program according to an embodiment of the present invention.
[0050] Figure 8 Schematic diagram of vulnerability identification and payload matching results obtained after offline input scanning data according to an embodiment of the present invention.
[0051] Fig. 9 The figure is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] 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 making creative work are within the scope of protection of the present invention.
[0053] Large-scale pretrained language model: Large-scale pretrained language model (LPLM) is a natural language processing technology based on deep learning. It learns rich language knowledge and semantic information through pre-training on a large amount of text data, so that it can achieve excellent performance in various natural language processing tasks.
[0054] Target machine: In the field of cyberspace security, "target machine" usually refers to a target computer system that is intentionally set up for security testing, vulnerability scanning or penetration testing. The target machine is set up to conduct security experiments in a controlled environment in order to detect potential vulnerabilities, weaknesses or security risks. This practice is very important for evaluating and improving the security of the system because it allows security professionals to simulate the actions that an attacker may take and take corresponding defensive measures.
[0055] Vulnerability identification: Vulnerability identification refers to the security assessment of the target based on the information collected from the target's system, application or network to find the security vulnerabilities. These vulnerabilities may be caused by design flaws, programming errors, configuration errors or other factors. Vulnerability identification can help organizations find and fix vulnerabilities in a timely manner, thereby improving the security of the system.
[0056] Payload matching: After the vulnerability is identified, the payload of the vulnerability needs to be analyzed in depth, mainly involving the study of the vulnerability's characteristics, scope of impact, potential attack payloads, and possible exploitation methods. This stage requires an in-depth understanding of the working principle of the vulnerability and the potential threats it may cause to the system. The vulnerability's features are extracted through pattern recognition, feature analysis, signature matching and other technologies, and matched with the known vulnerability feature library. Various matching algorithms and logics are used to determine the degree of match between the vulnerability and the known payload, thereby determining the payload applicable to the current vulnerability.
[0057] Vulnerability identification refers to the process of conducting security assessments on systems, applications, or networks to identify security vulnerabilities. These vulnerabilities may be caused by design flaws, programming errors, configuration errors, or other factors. Vulnerability identification can help organizations discover and fix vulnerabilities in a timely manner, thereby improving the security of the system.
[0058] Vulnerability identification typically involves the following steps:
[0059] Gather information: Collect information about the target system, application, or network, such as IP address, port, operating system, application version, etc.
[0060] Vulnerability scanning: Use vulnerability scanning tools to scan the target system, application, or network to detect vulnerabilities. Vulnerability scanning tools can automate vulnerability scanning to improve efficiency and accuracy.
[0061] Vulnerability analysis: Analyze the scan results to determine which vulnerabilities are real and which are false positives. Vulnerability analysis usually requires a combination of manual review and automated tools.
[0062] Vulnerability report: The vulnerability identification results are presented to the security team or system administrator in the form of a report. The vulnerability report should include information such as the type, level, impact scope, and repair suggestions of the vulnerability.
[0063] Vulnerability repair: timely repair vulnerabilities in the system according to the suggestions in the vulnerability report. Vulnerability repair may require code repair, configuration changes or system upgrades.
[0064] Vulnerability identification is one of the important steps to ensure system security. It can help organizations find and fix vulnerabilities in a timely manner, thereby reducing the risk of system attacks. However, vulnerability identification also has some challenges and limitations, such as limited accuracy of vulnerability scanning and high cost of vulnerability repair. Therefore, organizations need to consider a variety of security measures to improve the security of the system.
[0065] Large pre-trained language model (natural language processing model development, used for target scanning result analysis): Large pre-trained language model is a natural language processing model based on deep learning, which is pre-trained on a large amount of text data so that it can be fine-tuned on a specific task. These models are usually implemented using deep neural networks, such as Transformer and other models.
[0066] Pre-training models are usually divided into two stages: pre-training and fine-tuning. In the pre-training stage, the model is trained with a large amount of unlabeled data to learn the common features and patterns of language. Pre-training usually uses unsupervised learning methods, such as autoencoders, language models, etc. In the fine-tuning stage, the model is trained with a small amount of labeled data to adapt to the requirements of a specific task. Fine-tuning usually uses supervised learning methods, such as classification, named entity recognition, etc.
[0067] In some embodiments, vulnerability identification is a multi-classification task, and the vulnerability identification model based on natural language processing needs to identify and output the vulnerability identification number (CVE number) corresponding to the vulnerability based on the input vulnerability text description. The Natural Language Process (NLP) model is a type of computer algorithm and model designed to process and understand human language. Such models need to be trained with a large amount of data to achieve the desired recognition accuracy. Therefore, it is necessary to collect a large amount of vulnerability-related text description data.
[0068] In the data collection process, a large number of target machines need to be built and scanned one by one to obtain text description information when the host has vulnerabilities. Figure 1 As shown in the figure, the conventional live host scan information is a series of character descriptions, including key information such as the target host's port, service, operating system, etc. In order to further improve the accuracy of natural language model recognition, this project needs to further preprocess the scanned text, and then extract the relevant information such as the port, operating system, and service corresponding to the vulnerability in the scan feedback text.
[0069] In some embodiments, the currently disclosed natural language processing models are trained based on commonly used natural language corpora, and such models have good performance and application in commonly used natural language tasks. However, for a specific task in the field of cyberspace security such as vulnerability identification, the natural language model trained based on the commonly used corpus lacks relevant knowledge in the field of cyberspace security, so the current public natural language models cannot be directly used for vulnerability identification tasks. In addition, the current vulnerability identification task is a classification task, which requires customized modification based on the current model structure of the specific task team to build a corresponding network model.
[0070] The first aspect of the present invention provides a vulnerability identification and load matching method based on a large pre-trained language model. The method includes (e.g. Figure 2 shown):
[0071] Step S1, initializing vulnerability library, payload library, and natural language processing model;
[0072] wherein the natural language processing model is associated with the vulnerability library and the load library, and the natural language processing model is pre-trained;
[0073] Step S2, specifying a target IP and verifying the authenticity of the target IP;
[0074] If the authenticity verification fails, the target IP is re-assigned;
[0075] Step S3: for the object corresponding to the target IP address, select a pre-trained natural language processing model, the vulnerability library and the payload library for performing vulnerability identification and payload matching tasks;
[0076] Step S4: Scan the object corresponding to the target IP address, and input the vulnerability information obtained by the scan into the pre-trained natural language processing model, and the pre-trained natural language processing model matches the vulnerability information obtained by the scan with the pre-learned vulnerability knowledge of the vulnerability library to determine and output the matching vulnerability CVE ID;
[0077] Step S5: Match the matched vulnerability CVE ID with the number of the attack payload in the payload library to obtain the collection status information of the vulnerability attack payload;
[0078] Step S6: Feedback the scan text of the object corresponding to the target IP address, the vulnerability identification result, and the collection status information of the vulnerability attack payload.
[0079] It can be seen that the above method processes the collected target information through the natural language processing model to obtain high-precision vulnerability numbers and payload information.
[0080] According to the method of the first aspect of the present invention, the vulnerability library contains several vulnerabilities with CVE IDs; the payload library contains several vulnerability attack payloads used by Metasploit Framework; the initialization of step S1 includes associating the natural language processing model with the vulnerability library and the payload library, and pre-training the natural language processing model; wherein, during the pre-training process:
[0081] The vulnerability knowledge of the vulnerability library is input into the natural language processing model as a training set, and the natural language processing model learns the vulnerability knowledge, and matches the collected vulnerability information with the learned vulnerability knowledge, and determines and outputs the corresponding vulnerability CVE ID;
[0082] The vulnerability CVE ID is matched with the corresponding code of the attack payload in the payload library to obtain the vulnerability attack payload.
[0083] In some embodiments, the data source is described as follows:
[0084] Vulnerability library (such as Figure 3 : Contains 86 existing common vulnerabilities with CVE IDs.
[0085] Load library (such as Figure 4 : Contains more than 2,000 vulnerability attack payloads that can be exploited by Metasploit Framework.
[0086] In some embodiments, the vulnerability library, the load library, and the natural language processing model are initialized. To identify the target vulnerability based on the natural language processing model, it is necessary to associate the model with the vulnerability library and the load library for high-precision identification. The natural language processing model processing steps are as follows:
[0087] First, the natural language processing model needs to be pre-trained. In the present invention, the vulnerability library information is input into the natural language processing model as a training set to enable it to learn vulnerability knowledge. As a result of the training process, the natural language processing model will be able to match the information collected by the scanner with the knowledge it has learned from the vulnerability library and output the vulnerability CVE ID. Then, the CVE number is matched with the corresponding number attack payload in the payload library to obtain the vulnerability attack payload. The following figure shows some vulnerability libraries and payload libraries.
[0088] In some embodiments, in step S2, the target IP is specified and the authenticity of the IP address is verified. In a network environment, in order to distinguish different hosts, each host is assigned a unique address, through which each host in the same network environment can be accessed.
[0089] According to the method of the first aspect of the present invention, in step S3, the pre-trained natural language processing model is selected according to the task requirements of the vulnerability identification and payload matching tasks, and the vulnerability library and the payload library are selected according to the object type corresponding to the target IP address.
[0090] In some embodiments, a pre-trained model, vulnerability library, and payload library are selected. The natural language processing model, vulnerability library, and payload library used in this task are selected. A pre-trained model refers to a natural language processing model that has been pre-trained. Different models can be selected according to task requirements. For different types of targets, such as user terminal devices, network devices, and network security devices, their vulnerability libraries and payload libraries are different. In this process, the corresponding vulnerability library and payload library can be selected to match the scanning target.
[0091] According to the method of the first aspect of the present invention, before step S4, the method further includes: verifying the target IP address, the pre-trained natural language processing model, the vulnerability library and the payload library respectively; wherein:
[0092] If the payload library fails the verification, reselecting the pre-trained natural language processing model, the vulnerability library, and the payload library;
[0093] If the target IP address is wrong, reassign the target IP address.
[0094] According to the method of the first aspect of the present invention, in step S4, if the vulnerability information obtained by the scan does not match the vulnerability knowledge of the pre-learned vulnerability library, the vulnerability identification result is that the vulnerability is not identified and there is no corresponding payload.
[0095] In some embodiments, target scanning and vulnerability identification are performed. The specified target IP address object is scanned, the target information is obtained and passed as input to the pre-trained model, and the pre-trained model matches and outputs the CVE ID number according to the learned vulnerability library knowledge; conversely, if the pre-trained model has not learned the relevant vulnerability knowledge, the feedback is that the vulnerability is not identified and there is no corresponding payload.
[0096] According to the method of the first aspect of the present invention, in step S5, if the matched vulnerability CVE ID matches the number of the attack payload in the payload library, the collection status information of the vulnerability attack payload is collected, otherwise it is not collected.
[0097] In some embodiments, a payload matching module is run to match the payload library according to the CVE ID output by the above process, and if there is a corresponding numbered payload, the feedback payload has been included; otherwise, the feedback payload has not been included.
[0098] According to the method of the first aspect of the present invention, in step S6, the scanned text, the vulnerability identification result and the collection status information of the vulnerability attack payload are fed back; wherein, the vulnerability identification result includes a real vulnerability label and a predicted vulnerability label, and the collection status information of the vulnerability attack payload includes a matching load path.
[0099] In some embodiments, Figure 5 As shown, the target scan text, vulnerability identification results and payload matching are fed back. According to the results, the target vulnerability CVE ID and the attack payload corresponding to the payload library are displayed.
[0100] Example 1
[0101] Given the key information after scanning a single host, vulnerability identification and payload matching are performed.
[0102] Online vulnerability assessment (results such as Figure 6 As shown): Given the host IP address to be evaluated for vulnerability, start the program, the vulnerability will autonomously complete the host scanning, vulnerability identification and payload matching process, and will output the scanning information of the current target host, the best vulnerability matching result (the output vulnerability corresponding to the CVE-ID of the vulnerability included in the current framework) and the payload matching result (if the current payload library contains the payload corresponding to the vulnerability, the path of the payload is output; if the current payload library does not contain the payload of the vulnerability, the output payload is empty).
[0103] Example 2
[0104] Given the key information after scanning a single host, offline vulnerability identification and payload matching are performed.
[0105] Offline vulnerability assessment and payload matching (such as Figure 7-8 As shown in the figure): given the pre-processed host scan information (including the port, service, system, and web fingerprint information of the host scan information in one line, and different types of information are separated by tabs "\t"), input it into the algorithm program. The algorithm program will autonomously complete the vulnerability identification and payload matching process, and will output the scan information of the current target host, the best vulnerability matching result (the output vulnerability corresponding to the CVE-ID of the vulnerability included in the current framework) and the payload matching result (if the current payload library contains the payload corresponding to the vulnerability, the path of the payload is output, if the current payload library does not contain the payload of the vulnerability, the output payload is empty).
[0106] A second aspect of the present invention provides a vulnerability identification and load matching system based on a large pre-trained language model. The system includes a processing unit, which is configured to execute:
[0107] Initializing a vulnerability library, a load library, and a natural language processing model; wherein the natural language processing model is associated with the vulnerability library and the load library, and the natural language processing model is pre-trained;
[0108] Specifying a target IP and verifying the authenticity of the target IP; wherein, if the authenticity verification fails, re-specifying the target IP;
[0109] For the object corresponding to the target IP address, select a pre-trained natural language processing model, the vulnerability library, and the payload library for performing vulnerability identification and payload matching tasks;
[0110] Scanning the object corresponding to the target IP address, and inputting the vulnerability information obtained by the scan into the pre-trained natural language processing model, the pre-trained natural language processing model matches the vulnerability information obtained by the scan with the pre-learned vulnerability knowledge of the vulnerability library to determine and output a matching vulnerability CVE ID;
[0111] Matching the matched vulnerability CVE ID with the number of the attack payload in the payload library to obtain the collection status information of the vulnerability attack payload;
[0112] Feedback is provided of the scanned text of the object corresponding to the target IP address, the vulnerability identification result and the collection status information of the vulnerability attack payload.
[0113] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, a vulnerability identification and load matching method based on a large pre-trained language model according to the first aspect of the present invention is implemented.
[0114] Fig. 9 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Fig. 9As shown, the electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc.
[0115] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a structural diagram of the part related to the technical solution of the present disclosure, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0116] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a vulnerability identification and load matching method based on a large pre-trained language model according to the first aspect of the present invention is implemented.
[0117] In summary, the technical solution of the present invention processes the collected target information through a natural language processing model to obtain high-precision vulnerability numbers and load information. The present invention can reduce the dependence on expert experience and improve the efficiency of vulnerability verification.
[0118] Specifically, the rule-based vulnerability identification method is dependent on and lagging behind expert experience, and requires experts to analyze the vulnerability and formulate corresponding vulnerability identification rules before vulnerability identification can be achieved based on the rules. However, the vulnerability identification method based on the language processing model only needs to import the vulnerability and the corresponding scanning information into the model training database and perform training (this stage does not require strong expert experience) to obtain a natural language model that includes new vulnerability identification capabilities.
[0119] Specifically, the importance of the vulnerabilities in the possible vulnerability list given by rule-based vulnerability identification is equivalent, and there is no order of priority between the vulnerabilities. Vulnerability verification needs to be randomly verified with vulnerability verification code or vulnerability payload during the vulnerability verification process. However, the vulnerability identification method based on the language processing model can output vulnerability identification results with scores. During the vulnerability verification process, vulnerability verification can be carried out in order according to the vulnerability scores, which can effectively improve the efficiency of vulnerability verification.
[0120] Please note that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent in this application shall be based on the attached claims.
Claims
1. A vulnerability identification and load matching method based on a large pre-trained language model, characterized in that: The method comprises: Step S1, initializing vulnerability library, payload library, and natural language processing model; wherein the natural language processing model is associated with the vulnerability library and the load library, and the natural language processing model is pre-trained; Step S2, specifying a target IP and verifying the authenticity of the target IP; If the authenticity verification fails, the target IP is re-assigned; Step S3: for the object corresponding to the target IP address, select a pre-trained natural language processing model, the vulnerability library and the payload library for performing vulnerability identification and payload matching tasks; Step S4: Scan the object corresponding to the target IP address, and input the vulnerability information obtained by the scan into the pre-trained natural language processing model, and the pre-trained natural language processing model matches the vulnerability information obtained by the scan with the pre-learned vulnerability knowledge of the vulnerability library to determine and output the matching vulnerability CVE ID; Step S5: Match the matched vulnerability CVE ID with the number of the attack payload in the payload library to obtain the collection status information of the vulnerability attack payload; Step S6: Feedback the scan text of the object corresponding to the target IP address, the vulnerability identification result, and the collection status information of the vulnerability attack payload.
2. According to claim 1, a vulnerability identification and load matching method based on a large pre-trained language model is characterized in that: The vulnerability library contains several vulnerabilities with CVE IDs; the payload library contains several vulnerability attack payloads used by Metasploit Framework; the initialization of step S1 includes associating the natural language processing model with the vulnerability library and the payload library, and pre-training the natural language processing model; wherein, during the pre-training process: The vulnerability knowledge of the vulnerability library is input into the natural language processing model as a training set, and the natural language processing model learns the vulnerability knowledge, and matches the collected vulnerability information with the learned vulnerability knowledge, and determines and outputs the corresponding vulnerability CVE ID; The vulnerability CVE ID is matched with the corresponding code of the attack payload in the payload library to obtain the vulnerability attack payload.
3. According to claim 2, a vulnerability identification and load matching method based on a large pre-trained language model is characterized in that: In the step S3, the pre-trained natural language processing model is selected according to the task requirements of the vulnerability identification and payload matching tasks, and the vulnerability library and the payload library are selected according to the object type corresponding to the target IP address.
4. According to claim 3, a vulnerability identification and load matching method based on a large pre-trained language model is characterized in that: Before step S4, the method further includes: verifying the target IP address, the pre-trained natural language processing model, the vulnerability library and the load library respectively; wherein: If the payload library fails the verification, reselecting the pre-trained natural language processing model, the vulnerability library, and the payload library; If the target IP address is wrong, reassign the target IP address.
5. According to claim 4, a vulnerability identification and load matching method based on a large pre-trained language model is characterized in that: In the step S4, if the vulnerability information obtained by the scan does not match the vulnerability knowledge of the pre-learned vulnerability library, the vulnerability identification result is that the vulnerability is not identified and there is no corresponding payload.
6. According to claim 5, a vulnerability identification and load matching method based on a large pre-trained language model is characterized in that: In the step S5, if the matched vulnerability CVE ID matches the number of the attack payload in the payload library, the collection status information of the vulnerability attack payload is collected, otherwise it is not collected.
7. According to claim 6, a vulnerability identification and load matching method based on a large pre-trained language model is characterized in that: In the step S6, the scanned text, the vulnerability identification result and the collection status information of the vulnerability attack payload are fed back; wherein the vulnerability identification result includes a real vulnerability label and a predicted vulnerability label, and the collection status information of the vulnerability attack payload includes a matching payload path.
8. A vulnerability identification and load matching system based on a large pre-trained language model, characterized in that: The system comprises a processing unit configured to perform: Initializing a vulnerability library, a load library, and a natural language processing model; wherein the natural language processing model is associated with the vulnerability library and the load library, and the natural language processing model is pre-trained; Specifying a target IP and verifying the authenticity of the target IP; wherein, if the authenticity verification fails, re-specifying the target IP; For the object corresponding to the target IP address, select a pre-trained natural language processing model, the vulnerability library, and the payload library for performing vulnerability identification and payload matching tasks; Scanning the object corresponding to the target IP address, and inputting the vulnerability information obtained by the scan into the pre-trained natural language processing model, the pre-trained natural language processing model matches the vulnerability information obtained by the scan with the pre-learned vulnerability knowledge of the vulnerability library to determine and output a matching vulnerability CVE ID; Matching the matched vulnerability CVE ID with the number of the attack payload in the payload library to obtain the collection status information of the vulnerability attack payload; Feedback is provided of the scanned text of the object corresponding to the target IP address, the vulnerability identification result and the collection status information of the vulnerability attack payload.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the vulnerability identification and load matching method based on a large pre-trained language model as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the vulnerability identification and load matching method based on a large pre-trained language model described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Vulnerability information identification method and device based on large language model
CN119783116A
Original vulnerability data translation and compression method based on large language model and related equipment
CN120567458A
Original vulnerability data translation compression method based on large language model and related equipment
CN120567458B
Vulnerability number identification method and system
CN121711136A
