POC script generation method and device, electronic equipment and storage medium

By obtaining and screening data packets during the vulnerability verification process, and generating POC scripts based on the result judgment conditions, the problem of low efficiency and insufficient accuracy in POC script generation in the existing technology is solved, and automatic generation and high-accuracy POC scripts are realized.

CN118585170APending Publication Date: 2024-09-03CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410796773.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The existing POC script generation method is inefficient and requires security testers to have high programming skills, which can easily cause the script to be inconsistent with the actual vulnerability verification behavior, affecting the verification effect.

Method used

By obtaining the original data packets during the vulnerability verification process, the target data packets containing characteristic identifiers are filtered out, and a POC script is generated based on these data packets and result judgment conditions. The POC script is automatically generated, lowering the writing threshold and improving accuracy.

Benefits of technology

It improves the efficiency and accuracy of POC script generation, avoids inconsistencies between scripts and actual vulnerability verification behaviors, and reduces repetitive work and programming requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585170A
    Figure CN118585170A
Patent Text Reader

Abstract

The invention relates to the technical field of network security, in particular to a POC script generation method and device, electronic equipment and a storage medium, and is used for improving POC script generation efficiency and accuracy. The method comprises the following steps: acquiring each original data packet in a vulnerability verification process of a target vulnerability; target data packets are screened out from the original data packets, each target data packet comprises a feature identifier, and each target data packet is a data packet necessary for completing vulnerability verification; and generating a POC script corresponding to the target vulnerability based on each target data packet and a result judgment condition of the target vulnerability. In this way, the POC script compiling threshold and requirement are reduced, meanwhile, repeated work is reduced, the POC script generation efficiency is improved, the situation that the POC script is inconsistent with an actual vulnerability verification behavior is avoided, and the POC script generation accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a POC script generation method, device, electronic device and storage medium. Background Art

[0002] With the development of network and computer technology, the number of people using the network has increased, and the network security environment has deteriorated. Among various network hazards, the global wide area network (WEB) vulnerability is the most harmful. The proof of concept (POC) script is a test code used to verify the vulnerability.

[0003] The existing POC script generation method requires security testers to first use security testing tools to repeatedly debug and analyze and reproduce the vulnerabilities. After completing a successful vulnerability verification, they can then manually write the POC script.

[0004] However, security testers write POC scripts to reproduce the vulnerability verification behavior completed by themselves through security testing tools, which is a repetitive operation, and the efficiency of POC script generation is low. In addition, manually writing POC scripts requires high programming skills of security testers, and there is a situation where the POC script is inconsistent with the actual vulnerability verification behavior, which may cause the POC effect to not meet expectations. Summary of the invention

[0005] Embodiments of the present application provide a POC script generation method, device, electronic device, and storage medium to improve the efficiency and accuracy of POC script generation.

[0006] The specific technical solutions provided by the embodiments of this application are as follows:

[0007] In a first aspect, a POC script generation method is provided, the method comprising:

[0008] Obtain each original data packet in the vulnerability verification process of the target vulnerability;

[0009] Filter out target data packets from original data packets, each target data packet contains a characteristic identifier, and each target data packet is a necessary data packet to complete vulnerability verification;

[0010] Based on the result judgment conditions of each target data packet and target vulnerability, a POC script corresponding to the target vulnerability is generated.

[0011] Optionally, before obtaining each original data packet in the vulnerability verification process of the target vulnerability, the following steps are also included:

[0012] Analyze the target vulnerability and obtain the result judgment conditions of the target vulnerability;

[0013] In the process of vulnerability verification of the target vulnerability, each original data packet is collected, and when an original data packet is determined to be a data packet necessary for vulnerability verification, a feature identifier is added to the original data packet;

[0014] After the vulnerability verification is completed, each original data packet is stored.

[0015] Through the above method, the necessary feature identifiers are added to the data packets during the vulnerability verification process, which can locate the core logic of the POC.

[0016] Optionally, based on the result judgment conditions of each target data packet and target vulnerability, a POC script corresponding to the target vulnerability is generated, including:

[0017] Parsing each target data packet to obtain content data of each target data packet;

[0018] Generate a POC script based on the content data and result judgment conditions.

[0019] Through the above method, the generated POC script restores the effective operation of vulnerability verification. The effective operation can restore the actual vulnerability verification behavior, avoid the inconsistency between the POC script and the actual vulnerability verification behavior, and improve the accuracy of POC script generation.

[0020] Optionally, the type of each target data packet is: a target request packet or a target response packet;

[0021] The target request packet includes: request parameters, request address, request method, and payload;

[0022] The target response packet includes: information that affects the next request packet, or information used to determine the verification result of the POC script.

[0023] Optionally, after generating a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, it also includes:

[0024] Execute the POC script and obtain the result response package;

[0025] Based on the result response package and the result judgment condition, the verification result of the POC script is determined.

[0026] By executing the generated POC script through the above method, accurate verification results of the POC script can be obtained.

[0027] Optionally, based on the result response package and the result judgment condition, the verification result of the POC script is determined, including:

[0028] If the result information of the result response package meets the result judgment condition, it is determined that the POC script verification is successful;

[0029] If the result information of the result response package does not meet the result judgment condition, it is determined that the POC script verification has failed.

[0030] Through the above method, the verification result of the accurate POC script can be determined.

[0031] In a second aspect, the present application provides a POC script generation device, the device comprising:

[0032] An acquisition module is used to acquire each original data packet in the vulnerability verification process of the target vulnerability;

[0033] A screening module is used to screen out target data packets from original data packets, each target data packet contains a characteristic identifier, and each target data packet is a necessary data packet for completing vulnerability verification;

[0034] The generation module is used to generate a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability.

[0035] Optionally, before obtaining each original data packet in the vulnerability verification process of the target vulnerability, the device further includes a collection module, and the collection module is used to:

[0036] Analyze the target vulnerability and obtain the result judgment conditions of the target vulnerability;

[0037] In the process of vulnerability verification of the target vulnerability, each original data packet is collected, and when an original data packet is determined to be a data packet necessary for vulnerability verification, a feature identifier is added to the original data packet;

[0038] After the vulnerability verification is completed, each original data packet is stored.

[0039] Optionally, when generating a POC script corresponding to a target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, the generation module is further used to:

[0040] Parsing each target data packet to obtain content data of each target data packet;

[0041] Generate a POC script based on the content data and result judgment conditions.

[0042] Optionally, the type of each target data packet is: a target request packet or a target response packet;

[0043] The target request packet includes: request parameters, request address, request method, and payload;

[0044] The target response packet includes: information that affects the next request packet, or information used to determine the verification result of the POC script.

[0045] Optionally, after generating a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, the device further includes a verification module, which is used to:

[0046] Execute the POC script and obtain the result response package;

[0047] Based on the result response package and the result judgment condition, the verification result of the POC script is determined.

[0048] Optionally, when determining the verification result of the POC script based on the result response package and the result judgment condition, the verification module is also used to:

[0049] If the result information of the result response package meets the result judgment condition, it is determined that the POC script verification is successful;

[0050] If the result information of the result response package does not meet the result judgment condition, it is determined that the POC script verification has failed.

[0051] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described in the first aspect are implemented.

[0052] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.

[0053] In a fifth aspect, the present application provides a computer program product, the computer program product comprising: a computer program code, when the computer program code is run on a computer, causes the computer to execute any one of the methods in the first aspect

[0054] In the embodiment of the present application, each original data packet in the vulnerability verification process of the target vulnerability is obtained, and then each target data packet is screened out from each original data packet, each target data packet contains a feature identifier, and each target data packet is a data packet necessary for completing the vulnerability verification. Finally, based on the result judgment conditions of each target data packet and the target vulnerability, a POC script corresponding to the target vulnerability is generated. In this way, after the vulnerability verification is completed, it is only necessary to obtain each target data packet in the vulnerability verification process, and based on the result judgment conditions of each target data packet and the target vulnerability, a POC script corresponding to the target vulnerability is automatically generated, so that the security tester can realize the generation of a POC script without having to master programming skills, reducing the threshold and requirements for POC script writing, while reducing repetitive work, and improving the efficiency of POC script generation. In addition, the POC script is generated for each target data packet necessary in the vulnerability verification process, and the effective operation of the vulnerability verification is restored. The effective operation can restore the actual vulnerability verification behavior, avoid the situation where the POC script is inconsistent with the actual vulnerability verification behavior, improve the accuracy of POC script generation, and filter out unnecessary data packets in the vulnerability verification process, and the script is streamlined.

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

[0056] Figure 1 A schematic diagram of the process of collecting each original data packet in an embodiment of the present application;

[0057] Figure 2 A schematic diagram of a process for generating a POC script in an embodiment of the present application;

[0058] Figure 3 Another flowchart of a POC script generation method in an embodiment of the present application;

[0059] Figure 4 This is a schematic diagram of the structure of a POC script generating device in an embodiment of the present application;

[0060] Figure 5 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0062] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:

[0063] Proof of concept (POC): In the security field, it usually refers to a simple piece of code or script that attempts to exploit a known vulnerability to prove that the vulnerability does exist and can be exploited by an attacker. POC is usually used to detect and verify the security of the system so that the vulnerability can be fixed in time to prevent attackers from using the vulnerability to attack the system.

[0064] Payload: refers to the part of the vulnerability detection code that implements the detection function.

[0065] The following is a brief introduction to the design concept of the embodiment of the present application:

[0066] At present, with the increasing development of network and computer technology, the number of people using the network has increased, and the network security environment has deteriorated. Among various network hazards, the harm of world wide web (WEB) vulnerabilities is very large. Specifically, WEB vulnerabilities refer to the security risks existing in WEB applications, WEB frameworks, WEB languages ​​and WEB servers. Common WEB vulnerabilities include structured query language (SQL) injection vulnerabilities, cross site scripting (XSS) vulnerabilities, file inclusion vulnerabilities, code execution vulnerabilities and file parsing vulnerabilities. Proof of concept (POC) scripts are becoming more and more important. POC scripts are test codes used to verify vulnerabilities. POC scripts are used in scenarios such as vulnerability reproduction, vulnerability repair, and security reinforcement.

[0067] In the prior art, two methods are usually used to generate POC scripts.

[0068] Method 1: Security testers need to use security testing tools to repeatedly debug and analyze and reproduce the vulnerability. After completing a successful vulnerability verification, they can manually write a POC script.

[0069] When using method 1, security testers write POC scripts to reproduce the vulnerability verification behavior completed by themselves through security testing tools, which is a repetitive operation and the efficiency of POC script generation is low. In addition, manually writing POC scripts requires high programming skills of security testers, and there is a situation where the POC script is inconsistent with the actual vulnerability verification behavior, which may cause the POC effect to not meet expectations.

[0070] Method 2: Security testers will create several POC writing templates and a template parsing processing framework, select similar POC templates according to the target vulnerability details, modify them and process them through the processing framework to complete the writing of the POC script.

[0071] When using method 2, security testers are required to have an accurate expectation and grasp of the entire vulnerability verification process and the content of the data package in advance, which requires high technical capabilities of the writer and may result in the POC effect not meeting expectations. In addition, when directly writing the POC script fails to achieve the expected effect, troubleshooting and iterative optimization require more time and manpower costs, which also affects the efficiency of writing usable POC scripts.

[0072] In view of this, in the embodiment of the present application, a POC script generation method, device, electronic device and storage medium are provided to obtain each original data packet in the vulnerability verification process of the target vulnerability, and then each target data packet is screened out from each original data packet, each target data packet contains a feature identifier, and each target data packet is a data packet necessary to complete the vulnerability verification. Finally, based on the result judgment conditions of each target data packet and the target vulnerability, a POC script corresponding to the target vulnerability is generated. In this way, after the vulnerability verification is completed, it is only necessary to obtain each target data packet in the vulnerability verification process, and based on the result judgment conditions of each target data packet and the target vulnerability, a POC script corresponding to the target vulnerability is automatically generated, so that security testers can realize the generation of a POC script without having to master programming skills, reducing the threshold and requirements for POC script writing, while reducing repetitive work and improving the efficiency of POC script generation. In addition, the POC script is generated for each target data packet necessary in the vulnerability verification process, and the effective operation of the vulnerability verification is restored. The effective operation can restore the actual vulnerability verification behavior, avoid the situation where the POC script is inconsistent with the actual vulnerability verification behavior, improve the accuracy of POC script generation, and filter out unnecessary data packets in the vulnerability verification process, and the script is streamlined.

[0073] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0074] See also Figure 1 As shown, it is a schematic diagram of the process of collecting each original data packet in an embodiment of the present application, which specifically includes:

[0075] Step 10: Analyze the target vulnerability and obtain the result judgment condition of the target vulnerability.

[0076] Among them, the target vulnerability can be a SQL injection vulnerability, an XSS vulnerability, a file inclusion vulnerability, a code execution vulnerability, and a file parsing vulnerability, etc., which is not limited in the embodiment of the present application. The result judgment condition is a rule condition determined according to the details of the target vulnerability.

[0077] For example, the result judgment condition is: if the value of "user" in the response body of the last response packet in the vulnerability verification process is equal to "admin", the vulnerability verification is successful.

[0078] Step 11: During the vulnerability verification process of the target vulnerability, each original data packet is collected, and when an original data packet is determined to be a data packet necessary for vulnerability verification, a feature identifier is added to the original data packet.

[0079] Among them, each original data packet represents: historical operation behavior during the vulnerability verification process, each original data packet is: a data packet generated by the interaction between the browser and the server during the vulnerability verification process, the type of each original data packet is: original request packet or original response packet, the original data packet can be a pcap packet, which is not limited in the embodiments of the present application.

[0080] In an embodiment of the present application, a security testing tool is called to perform vulnerability verification on a target vulnerability. During the vulnerability verification process, a data packet collection tool is called to collect each original data packet, and when an original data packet is determined to be a data packet necessary for vulnerability verification, a feature identifier is added to the original data packet.

[0081] Among them, the security testing tool can be BurpSuite, etc., and the data packet acquisition tool can be network packet analysis software (Wireshark), etc., which is not limited in the embodiments of the present application.

[0082] Optionally, in an embodiment of the present application, manual assistance can be used to determine whether an original data packet is a data packet necessary for vulnerability verification, or based on the content data of the original data packet, it can be determined whether an original data packet is a data packet necessary for vulnerability verification. Specifically, when an original data packet type is an original request packet, and the content data of the original data packet contains a payload, the original data packet is determined to be a data packet necessary for vulnerability verification. When an original data packet type is an original response packet, and the content data of the original response packet contains information that affects the next request packet, or information used to determine the verification result of the POC script, the target response packet is determined to be a data packet necessary for vulnerability verification. This is not limited in the embodiments of the present application.

[0083] For example, when the original response packet 2 corresponding to the original request packet 2 needs to generate the original request packet 3 based on the original response packet 2, it is determined that the original response packet 2 is a data packet necessary for vulnerability verification.

[0084] Optionally, in an embodiment of the present application, a feature identifier may be added to the entity data of the original data packet, or the feature identifier may be used as a header data of the original data packet to implement adding a feature identifier to an original data packet, and this is not limited in the embodiment of the present application.

[0085] In an embodiment of the present application, if the type of the original data packet is an original request packet, a characteristic identifier is added to the request body of the original request packet, or the characteristic identifier is used as a request header of the original request packet; if the type of the original data packet is an original response packet, a characteristic identifier is added to the response body of the original response packet, or the characteristic identifier is used as a response header of the original response packet.

[0086] For example, add the feature identifier effective to the request body of the original request packet 1.

[0087] In this way, since there will be many invalid operations in the vulnerability verification process, adding feature identifiers to the necessary data packets during the vulnerability verification process can locate the POC core logic.

[0088] Step 12: After the vulnerability verification is completed, each original data packet is stored.

[0089] In the embodiment of the present application, after the vulnerability verification is completed, the collection of each original data packet is completed, and each original data packet is stored in a database.

[0090] See also Figure 2 As shown, it is a schematic diagram of a process of generating a POC script in an embodiment of the present application, which specifically includes:

[0091] Step 20: Obtain each original data packet in the vulnerability verification process of the target vulnerability.

[0092] In the embodiment of the present application, each original data packet in the vulnerability verification process of the target vulnerability is obtained from the database.

[0093] For example, the original data packets obtained during the vulnerability verification process of the target vulnerability include: 100 original request packets and 100 original response packets.

[0094] Step 21: Filter out target data packets from original data packets.

[0095] Among them, each target data packet contains a characteristic identifier, and each target data packet is a necessary data packet to complete vulnerability verification.

[0096] In the embodiment of the present application, each original data packet is parsed, and the following operations are performed for each original data packet: when it is determined that an original data packet contains a characteristic identifier, the original data packet is used as a target data packet.

[0097] For example, assuming that the original data packet 1 includes the feature identifier effective, the original data packet 1 is determined to be a target data packet.

[0098] In addition, it is worth noting that in the embodiment of the present application, the type of each target data packet is: a target request packet or a target response packet; the target request packet includes: request parameters, request address, request method, and payload, wherein the payload may be in the request parameters, request header or request body, which is not limited in the embodiment of the present application; the target response packet includes: information that affects the next request packet, or information used to determine the verification result of the POC script.

[0099] Step 22: Based on the result judgment conditions of each target data packet and target vulnerability, generate a POC script corresponding to the target vulnerability.

[0100] In the embodiment of the present application, each target data packet and result judgment condition is parsed and processed, the data packet interaction process of vulnerability verification is restored, and a PoC script is generated.

[0101] Optionally, in the embodiment of the present application, a possible implementation method is provided to generate a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, and the specific steps are as follows:

[0102] Step 220: Parse each target data packet to obtain content data of each target data packet.

[0103] For example, the target data packet A is parsed to obtain content data of the target data packet A including: request urlA, request method methodA, request parameter paramA, request header headerA, and request body bodyA.

[0104] Step 221: Generate a POC script based on the content data and result judgment conditions.

[0105] In an embodiment of the present application, in the POC script, new target data packets are constructed based on the content data, and based on the result judgment condition, the result judgment in the POC script is constructed to obtain the POC script.

[0106] For example, assuming that the content data of the target data packet A includes: request urlA, request method methodA, request parameter paramA, request header headerA, and request body bodyA, then in the POC script, construct a new target data packet A, set the new request url to newurlA=urlA, call the corresponding request method according to the value of the request method methodA, set the new request parameter newparamA=paramA, the new request header newheaderA=headerA, and the new request body newbodyA=bodyA.

[0107] For example, assuming that the result judgment condition is: if the value of "user" in the response body of the last response packet in the vulnerability verification process is equal to "admin", the vulnerability verification is successful, and the result judgment in the POC script is constructed as follows: extract the value "value" of "user" in the response body of the response packet, use "value" as the input for judgment, and judge whether the value of "value" is equal to "admin". If the value of "value" is equal to "admin", the vulnerability verification is successful. If the value of "value" is not equal to "admin", the vulnerability verification fails.

[0108] In this way, the generated POC script restores the effective operation of vulnerability verification. The effective operation can restore the actual vulnerability verification behavior, avoid the inconsistency between the POC script and the actual vulnerability verification behavior, and improve the accuracy of POC script generation.

[0109] Further, in the embodiment of the present application, after the POC script is generated, the POC script can be executed to obtain the POC script verification result. In the embodiment of the present application, a possible embodiment is provided to obtain the POC script verification result. The specific process is as follows:

[0110] Step 23: Execute the POC script and obtain the result response package.

[0111] In the embodiment of the present application, the POC script is executed, the POC script sends a verification request packet, and receives the last result response packet.

[0112] For example, assuming that the generated POC script is poc.py, and a verification request package A is constructed in poc.py, then when poc.py is executed, the verification request package A will be sent and the result response package B will be received.

[0113] Step 24: Based on the result response package and the result judgment condition, determine the verification result of the POC script.

[0114] In the embodiment of the present application, if the result information of the result response package meets the result judgment condition, it is determined that the POC script verification is successful; if the result information of the result response package does not meet the result judgment condition, it is determined that the POC script verification fails.

[0115] For example, assume that the result judgment condition is: if the value of "user" in the response body of the last response package in the vulnerability verification process is equal to "admin", then the vulnerability verification is successful; if the value of "user" in the result information of the result response package B is equal to "admin", then it is determined that the POC script verification is successful, and the verification result is output: POC script verification is successful; if the value of "user" in the result information of the result response package B is equal to "executor", then it is determined that the POC script verification has failed, and the verification result is output: POC script verification has failed.

[0116] Based on the above embodiments, see Figure 3 FIG. 1 is another flow chart of a method for generating a POC script in an embodiment of the present application, which specifically includes:

[0117] Step 30: Analyze the target vulnerability and obtain the result judgment condition of the target vulnerability.

[0118] Step 31: During the vulnerability verification process of the target vulnerability, each target data packet is collected.

[0119] Among them, each target data packet is a necessary data packet to complete the vulnerability verification.

[0120] Step 32: Based on each target data packet and result judgment condition, generate a POC script corresponding to the target vulnerability.

[0121] Step 33: Execute the POC script to obtain the verification result of the POC script.

[0122] Based on the same inventive concept, the present application embodiment provides a POC script generation device, please refer to Figure 4 , the device comprises:

[0123] The acquisition module 401 is used to acquire each original data packet in the vulnerability verification process of the target vulnerability;

[0124] The screening module 402 is used to screen out target data packets from the original data packets, each target data packet contains a characteristic identifier, and each target data packet is a data packet necessary for completing vulnerability verification;

[0125] The generation module 403 is used to generate a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability.

[0126] Optionally, before obtaining each original data packet in the vulnerability verification process of the target vulnerability, the device further includes a collection module 404, and the collection module 404 is used to:

[0127] Analyze the target vulnerability and obtain the result judgment conditions of the target vulnerability;

[0128] In the process of vulnerability verification of the target vulnerability, each original data packet is collected, and when an original data packet is determined to be a data packet necessary for vulnerability verification, a feature identifier is added to the original data packet;

[0129] After the vulnerability verification is completed, each original data packet is stored.

[0130] Optionally, when generating a POC script corresponding to a target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, the generating module 403 is further used to:

[0131] Parsing each target data packet to obtain content data of each target data packet;

[0132] Generate a POC script based on the content data and result judgment conditions.

[0133] Optionally, the type of each target data packet is: a target request packet or a target response packet;

[0134] The target request packet includes: request parameters, request address, request method, and payload;

[0135] The target response packet includes: information that affects the next request packet, or information used to determine the verification result of the POC script.

[0136] Optionally, after generating a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, the device further includes a verification module 405, which is used to:

[0137] Execute the POC script and obtain the result response package;

[0138] Based on the result response package and the result judgment condition, the verification result of the POC script is determined.

[0139] Optionally, when determining the verification result of the POC script based on the result response package and the result judgment condition, the verification module 405 is further used to:

[0140] If the result information of the result response package meets the result judgment condition, it is determined that the POC script verification is successful;

[0141] If the result information of the result response package does not meet the result judgment condition, it is determined that the POC script verification has failed.

[0142] Based on the above embodiments, see Figure 5 Shown is a schematic diagram of the structure of an electronic device in an embodiment of the present application.

[0143] An embodiment of the present application provides an electronic device, which may include a processor 510 (Center Processing Unit, CPU), a memory 520, an input device 530 and an output device 540, etc. The input device 530 may include a keyboard, a mouse, a touch screen, etc., and the output device 540 may include a display device, such as a liquid crystal display (Liquid Crystal Display, LCD), a cathode ray tube (Cathode Ray Tube, CRT), etc.

[0144] The memory 520 may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor 510 with program instructions and data stored in the memory 520. In the embodiment of the present application, the memory 520 may be used to store the program of any POC script generation method in the embodiment of the present application.

[0145] The processor 510 calls the program instructions stored in the memory 520, and the processor 510 is used to execute any one of the POC script generation methods in the embodiments of the present application according to the obtained program instructions.

[0146] Based on the above embodiments, in an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the POC script generation method in any of the above method embodiments is implemented.

[0147] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0149] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0151] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A POC script generation method, characterized in that: include: Obtain each original data packet in the vulnerability verification process of the target vulnerability; Filtering out target data packets from the original data packets, wherein the target data packets contain characteristic identifiers and are necessary data packets for completing the vulnerability verification; Based on the result judgment conditions of each target data packet and the target vulnerability, a POC script corresponding to the target vulnerability is generated.

2. The method according to claim 1, characterized in that Before obtaining each original data packet in the vulnerability verification process of the target vulnerability, the following steps are also included: Analyze the target vulnerability to obtain a result judgment condition of the target vulnerability; In the vulnerability verification process of the target vulnerability, the original data packets are collected, and when an original data packet is determined to be a data packet necessary for the vulnerability verification, a feature identifier is added to the original data packet; After the vulnerability verification is completed, the original data packets are stored.

3. The method according to claim 1, characterized in that The generating a POC script corresponding to the target vulnerability based on the result judgment condition of each target data packet and the target vulnerability includes: Parsing each target data packet to obtain content data of each target data packet; Based on the content data and the result judgment condition, the POC script is generated.

4. The method according to claim 1, characterized in that The type of each target data packet is: a target request packet or a target response packet; The target request packet includes: request parameters, request address, request method, and payload; The target response packet includes: information affecting the next request packet, or information used to determine the verification result of the POC script.

5. The method according to claim 1, characterized in that After generating a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability, the method further includes: Execute the POC script to obtain a result response package; Based on the result response packet and the result judgment condition, a verification result of the POC script is determined.

6. The method according to claim 5, characterized in that The step of determining the verification result of the POC script based on the result response packet and the result judgment condition includes: If the result information of the result response package meets the result judgment condition, it is determined that the POC script verification is successful; If the result information of the result response package does not meet the result judgment condition, it is determined that the POC script verification has failed.

7. A POC script generation device, characterized in that: include: An acquisition module is used to acquire each original data packet in the vulnerability verification process of the target vulnerability; A screening module, used for screening out target data packets from the original data packets, wherein the target data packets contain characteristic identifiers and are necessary data packets for completing the vulnerability verification; A generation module is used to generate a POC script corresponding to the target vulnerability based on the result judgment conditions of each target data packet and the target vulnerability.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Method and system for reproducing one or more BUGS identified by a wireless fuzzer on a target device

    WO2026122019A1