Automated program component risk prediction and fuzz testing apparatus and method

By combining document understanding and risk prediction modules with a large language model, component descriptions and constraint relationships are obtained, and fuzz test configurations are generated. This solves the problem of low efficiency in detecting high-risk targets in large programs and achieves efficient vulnerability detection.

WO2026242115A1PCT designated stage Publication Date: 2026-11-26BEIJING ZHONGGUANCUN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/097554
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-21
Filing Date
2025-05-27
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing technologies lack the ability to identify high-risk targets in large programs, resulting in low vulnerability detection efficiency.

Method used

The document understanding module parses the help documentation of the target program, uses a pre-trained large language model to obtain component descriptions and constraints, combines the risk prediction module to predict the risk level of components and combinations, generates fuzz test configurations, and performs fuzz testing on high-risk targets.

Benefits of technology

It improves the efficiency of vulnerability detection in large programs, enables risk level prediction for single components and combinations of multiple components, and automates fuzz testing of high-risk targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025097554_26112026_PF_FP_ABST
    Figure CN2025097554_26112026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electric digital data processing, and specifically to an automated program component risk prediction and fuzz testing apparatus and method. The apparatus comprises: a document understanding module, configured to parse a help document of a target program, and use a pre-trained large language model to obtain description content of components in the target program; a relationship extraction module, configured to acquire a constraint relationship between the components; a risk prediction module, configured to obtain risk level prediction results of individual components and multi-component combinations in the target program; an instruction assembly module, configured to obtain at least one target to be tested for high-risk testing; and a fuzz testing module, configured to generate a fuzz testing configuration corresponding to said at least one target, and perform fuzz testing on all targets to be tested having high risk levels in the target program. In this way, the technical problem in the related art of low vulnerability detection efficiency of large programs due to the lack of ability to determine high-risk targets is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Automated Program Component Risk Prediction and Fuzzy Testing Apparatus and Method

[0001] Cross-references to related applications

[0002] This invention is based on and claims priority to Chinese Patent Application No. 202510654736.9, filed on May 21, 2025, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This invention relates to the field of electronic digital data processing technology, and in particular to an automated program component risk prediction and fuzzy testing device and method. Background Technology

[0004] As program architectures become increasingly complex, large programs often have numerous components to achieve their diverse functionalities. These components present significant challenges to vulnerability detection: on the one hand, each component is a potential detection target, and testing them all is time-consuming and labor-intensive; on the other hand, different components can be combined to achieve more complex functions, and these combinations form a series of unique detection targets, causing the workload of detection tasks to grow exponentially.

[0005] Related technologies can perform vulnerability detection on these components and combinations of components by traversing or randomly mutating them, thereby improving the security of program use. However, due to the lack of ability to identify high-risk targets, the vulnerability detection efficiency for large programs is low and needs to be improved. Summary of the Invention

[0006] This invention provides an automated program component risk prediction and fuzz testing device and method to solve the technical problem in related technologies where the lack of ability to judge high-risk targets leads to low vulnerability detection efficiency in large programs.

[0007] A first aspect of the present invention provides an automated program component risk prediction and fuzz testing apparatus, comprising: a document understanding module, configured to parse the help document of a target program to obtain key information of the target program, and input the key information into a pre-trained large language model to obtain a description of each component in the target program; a relationship extraction module, configured to obtain the constraint relationship between each component based on the description; a risk prediction module, configured to combine the description and the constraint relationship, and use the pre-trained large language model to predict the risk level of a single component and a combination of multiple components in the target program, respectively, to obtain a risk level prediction result; an instruction assembly module, configured to obtain at least one target to be tested with high risk based on the prediction result, and generate corresponding test parameter values ​​and input files for the at least one target to be tested, wherein the target to be tested includes a single target component and / or a combination of multiple target components; and a fuzz testing module, configured to generate a corresponding fuzz testing configuration for the at least one target to be tested using the test parameter values ​​and the input file, and to perform fuzz testing on all high-risk targets to be tested in the target program using the fuzz testing configuration.

[0008] Optionally, in one embodiment of the present invention, the document understanding module includes: a component extraction unit, used to extract relevant content of each component from the help document; and a description understanding unit, used to understand the relevant content to obtain the description content.

[0009] Optionally, in one embodiment of the present invention, the relationship extraction module includes: a constraint relationship identification and extraction unit, used to extract conflicting dependency constraint relationships between each component based on the description content; and a constraint relationship extraction and verification unit, used to verify the conflicting dependency constraint relationships, obtain verification results, and filter out erroneous relationships between each component based on the verification results to obtain the constraint relationships.

[0010] Optionally, in one embodiment of the present invention, the risk prediction module includes: a single-component risk prediction unit for predicting the risk level of a single component in the target program; and / or, a component combination risk prediction unit for predicting the risk level of a combination of multiple components in the target program.

[0011] Optionally, in one embodiment of the present invention, the instruction assembly module includes: a parameter value generation unit, used to generate the test parameter values ​​corresponding to the at least one target to be tested; and an input file generation unit, used to generate the input file corresponding to the at least one target to be tested.

[0012] Optionally, in one embodiment of the present invention, the fuzz testing module includes: a fuzz testing unit for testing a single target to be tested; and a target switching unit for automatically switching to the next target to be tested after the current single target to be tested has been tested, until all targets to be tested have been tested.

[0013] A second aspect of this invention provides an automated method for risk prediction and fuzz testing of program components, comprising the following steps: parsing the help document of a target program to obtain key information of the target program, and inputting the key information into a pre-trained large language model to obtain a description of each component in the target program; based on the description, obtaining the constraint relationship between each component; combining the description and the constraint relationship, using the pre-trained large language model to predict the risk level of a single component and a combination of multiple components in the target program, respectively, to obtain a risk level prediction result; based on the prediction result, obtaining at least one target to be tested with high risk, and generating corresponding test parameter values ​​and input files for the at least one target to be tested, wherein the target to be tested includes a single target component and / or a combination of multiple target components; using the test parameter values ​​and the input file to generate a corresponding fuzz test configuration for the at least one target to be tested, so as to perform fuzz testing on all high-risk targets to be tested in the target program using the fuzz test configuration.

[0014] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the automated program component risk prediction and fuzz testing method as described in the above embodiments.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing the computer to execute the automated program component risk prediction and fuzz testing method as described in the above embodiments.

[0016] A fifth aspect of the present invention provides a computer program product, including a computer program, which, when executed, is used to implement the above-described automated program component risk prediction and fuzz testing method.

[0017] The document understanding module of this invention can parse the help document of the target program and obtain the description of each component in the target program using a pre-trained large language model. The relationship extraction module obtains the constraint relationships between each component based on the description. The risk prediction module combines the description and constraint relationships to obtain the risk level prediction results for single components and combinations of multiple components in the target program. The instruction assembly module obtains at least one high-risk test target based on the prediction results, enabling the fuzzing module to generate fuzzing configurations corresponding to at least one test target. Fuzzing is then performed on all high-risk test targets in the target program. This leverages the powerful contextual understanding capabilities of the large language model to predict the risk level of single components and combinations of multiple components in the target program based on component description information, and automatically performs fuzzing on high-risk targets. This effectively completes the vulnerability detection work for large programs and improves the vulnerability detection efficiency of large programs. Therefore, it solves the technical problem in related technologies where the lack of ability to judge high-risk targets leads to low vulnerability detection efficiency in large programs.

[0018] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0019] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0020] Figure 1 is a schematic diagram of an automated program component risk prediction and fuzzy testing device provided according to an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of an automated program component risk prediction and fuzz testing device according to an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of the principle of an automated program component risk prediction and fuzz testing device according to another embodiment of the present invention;

[0023] Figure 4 is a flowchart of an automated program component risk prediction and fuzz testing method provided according to an embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention. Detailed Implementation

[0025] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0026] The following describes an automated program component risk prediction and fuzzing apparatus and method according to embodiments of the present invention with reference to the accompanying drawings. Addressing the technical problem mentioned in the background art, where the lack of ability to identify high-risk targets leads to low vulnerability detection efficiency in large programs, the present invention provides an automated program component risk prediction and fuzzing apparatus. In this apparatus, a document understanding module can parse the help documentation of the target program and obtain the description content of each component in the target program using a pre-trained large language model. A relationship extraction module obtains the constraint relationships between each component based on the description content. A risk prediction module combines the description content and constraint relationships to obtain the risk level prediction results for single components and combinations of multiple components in the target program. An instruction assembly module obtains at least one high-risk test target based on the prediction results, enabling the fuzzing module to generate a corresponding fuzzing configuration for at least one test target. Fuzzing is then performed on all high-risk test targets in the target program. This leverages the powerful contextual understanding capabilities of the large language model to predict the risk level of single components and combinations of multiple components in the target program based on the component description information, and automatically performs fuzzing on high-risk targets, thereby effectively completing the vulnerability detection work of large programs and improving the vulnerability detection efficiency of large programs. This solves the technical problem of low vulnerability detection efficiency in large programs due to the lack of ability to identify high-risk targets.

[0027] Specifically, Figure 1 is a schematic diagram of the structure of an automated program component risk prediction and fuzzy testing device provided in an embodiment of the present invention.

[0028] As shown in Figure 1, the automated program component risk prediction and fuzz testing device 10 includes: a document understanding module 100, a relationship extraction module 200, a risk prediction module 300, an instruction assembly module 400, and a fuzz testing module 500.

[0029] Specifically, the document understanding module 100 is used to parse the help document of the target program, obtain the key information of the target program, and input the key information into the pre-trained large language model to obtain the description of each component in the target program.

[0030] In actual execution, the document understanding module 100 can parse the help document of the target program and extract all the key information of the target program from it. Furthermore, in this embodiment of the invention, the extracted key information can also be input into a pre-trained large language model, thereby using the large language model to automatically extract each component from the document and understand the corresponding description content, that is, to generate a preliminary understanding of the function, usage and component information of the target program.

[0031] It should be noted that large language models can be pre-trained by those skilled in the art based on actual application scenarios, and no specific restrictions are imposed here.

[0032] Optionally, in one embodiment of the present invention, the document understanding module 100 includes: a component extraction unit and a description understanding unit.

[0033] The component extraction unit is used to extract relevant content for each component from the help documentation.

[0034] The description comprehension unit is used to understand relevant content in order to obtain the description content.

[0035] In some embodiments, the document understanding module 100 may include a component extraction unit and a description understanding unit.

[0036] The component extraction unit can extract relevant content for each component from the help document. For example, when the help document is written using Groff syntax, this embodiment of the invention can use keyword matching methods to accurately extract the function description, usage instructions and component description information of the target program.

[0037] The description understanding unit can use preset prompts to input the extracted key information into a pre-trained large language model to understand the relevant content extracted by the component extraction unit, thereby obtaining the description content of each component in the target program. For example, in this embodiment of the invention, the prompt "The following is the functional description, usage instructions, and description information of each component of the target program XX. Please understand the core function of the program based on the program name and functional description, and analyze the corresponding role of each component in the program based on the component description information" allows the large language model to understand the functional information of the tested program and all components, thus guiding the large language model to complete the description understanding task.

[0038] The preset prompts can be set by those skilled in the art according to different actual application scenarios, and no specific restrictions are imposed here.

[0039] The relationship extraction module 200 is used to obtain the constraint relationships between each component based on the description content.

[0040] As one possible approach, the relationship extraction module 200 can obtain the constraint relationships between each component in various ways, such as extracting constraint relationships based on heuristic rules through a machine learning model.

[0041] However, since machine learning models that extract constraint relationships based on heuristic rules are not universally applicable, embodiments of the present invention can automatically extract constraint relationships between components using pre-trained large language models.

[0042] Optionally, in one embodiment of the present invention, the relationship extraction module 200 includes: a constraint relationship identification and extraction unit and a constraint relationship extraction verification unit.

[0043] The constraint relationship identification and extraction unit is used to extract conflict dependency constraints between each component based on the description content.

[0044] The constraint relationship extraction and verification unit is used to verify conflicting dependency constraints, obtain verification results, and filter out erroneous relationships between each component based on the verification results to obtain the constraint relationships.

[0045] In other embodiments, the relationship extraction module 200 may include a constraint relationship identification and extraction unit and a constraint relationship extraction and verification unit.

[0046] The constraint relationship identification and extraction unit can leverage a pre-trained large language model's understanding of components. Pre-set prompts allow the model to initially identify and extract the constraint relationships, i.e., conflict and dependency relationships, between each component. Combinations of multiple components that do not satisfy constraints are meaningless and do not require detection. For example, with the prompt "The following are all the components of the XX program and their functional descriptions. Please find all components that are mutually exclusive or logically conflicting when used together, and find all components that are dependent on other components," the large language model will be able to identify and extract the constraint relationships between each component.

[0047] Since the model output is uncertain, the model cannot output all potential constraints in a single request. In this embodiment of the invention, the potential constraints can be preserved as much as possible by identifying and taking the union of multiple sets.

[0048] For the preliminary extraction results described above, the constraint relationship extraction and verification unit of this embodiment of the invention can adopt a self-checking method, allowing the pre-trained large language model to reconsider whether each previous extraction result is correct and remove erroneous extraction results. Similarly, considering the uncertainty of the model, this embodiment of the invention can repeat the verification of each constraint relationship multiple times and use the majority rule to determine the final result.

[0049] The risk prediction module 300 is used to combine the description content and constraint relationship, and use a pre-trained large language model to predict the risk level of a single component and a combination of multiple components in the target program, respectively, and obtain the risk level prediction result.

[0050] The risk prediction module 300 can combine description content and constraint relationships to predict the risk level of a single component and a combination of multiple components in the target program using a pre-trained large language model, so as to achieve automatic preset of vulnerability risk level. It is more efficient than relying on the number of historical vulnerabilities and vulnerability code feature detection to predict the vulnerability risk level of program components.

[0051] Optionally, in one embodiment of the present invention, the risk prediction module 300 includes: a single component risk prediction unit and / or a component combination risk prediction unit.

[0052] Among them, the single-component risk prediction unit is used to predict the risk level of a single component in the target program.

[0053] The component portfolio risk prediction unit is used to predict the risk level of a combination of multiple components in the target program.

[0054] The risk prediction module 300 may include a single-component risk prediction unit and / or a component combination risk prediction unit.

[0055] On the one hand, the single-component risk prediction unit can use the pre-trained large language model to describe each component and use preset prompts (such as "Please explore and analyze all possible component combinations based on the component function description, focusing on component combinations that may have high risk and vulnerabilities.") to enable the large language model to associate the vulnerability risk level from the component description based on its contextual knowledge and output a list of single components with high risk. That is to say, the pre-trained large language model in this embodiment of the invention can spontaneously find the association between the description content and the vulnerability through prompts and perform vulnerability risk prediction.

[0056] On the other hand, the component combination risk prediction unit can add the constraint relationship output by the relationship extraction module 200 to the prompt, so that the pre-trained large language model can predict the component combination most likely to have a high vulnerability risk level among all component combinations without breaking the constraint relationship.

[0057] Since the number of high-risk targets predicted by the pre-trained large language model is limited each time, in order to cover high-risk targets as comprehensively as possible, the embodiments of the present invention can use the method of multiple predictions and taking the union of the results to obtain the final result.

[0058] The instruction assembly module 400 is used to obtain at least one target to be tested for high-risk testing based on the prediction results, and to generate test parameter values ​​and input files corresponding to at least one target to be tested, wherein the target to be tested includes a single target component and / or a combination of multiple target components.

[0059] Understandably, after obtaining a high-risk test target, it is necessary to assemble the single component and / or multiple components of the target into an actually executable command to perform fuzz testing.

[0060] Therefore, embodiments of the present invention can use a pre-trained large language model to generate appropriate parameter values ​​and input files for single components and / or combinations of multiple components of targets predicted to be high-risk, based on the corresponding description content, so as to automatically complete the fuzz test configuration work for high-risk targets.

[0061] Optionally, in one embodiment of the present invention, the instruction assembly module 400 includes: a parameter value generation unit and an input file generation unit.

[0062] The parameter value generation unit is used to generate test parameter values ​​for at least one target to be tested.

[0063] The input file generation unit is used to generate an input file corresponding to at least one target to be tested.

[0064] The instruction assembly module 400 may include a parameter value generation unit and an input file generation unit.

[0065] In this embodiment of the invention, the parameter value generation unit can select appropriate parameter values ​​for the component based on the knowledge of the pre-trained large language model itself. For example, when the document mentions that the use of the component requires the configuration of parameters such as hostname and port number, this embodiment of the invention can select the most commonly used (i.e., the highest prediction probability) value for the component based on the prediction probability of the large language model.

[0066] This invention can also generate valid input files for the aforementioned executable commands through an input file generation unit. For example, if a document mentions that a component requires HTML format input, this invention can allow a large language model to directly generate an input file that meets the HTML format requirement.

[0067] The fuzzing module 500 is used to generate a fuzzing configuration for at least one target under test using test parameter values ​​and input files, so as to perform fuzzing tests on all high-risk targets under test in the target program using the fuzzing configuration.

[0068] As one possible approach, the fuzzing module 500 can generate at least one fuzzing configuration for the target under test using test parameter values ​​and input files. This allows for fuzzing of all high-risk targets in the target program without the need for manual selection of parameter values ​​and input files or simple copying and imitation from examples. This effectively completes the vulnerability detection work for large programs and improves the efficiency of vulnerability detection for large programs.

[0069] Optionally, in one embodiment of the present invention, the fuzz testing module 500 includes: a fuzz testing unit and a target switching unit.

[0070] The fuzz test unit is used to test a single target.

[0071] The target switching unit is used to automatically switch to the next target after the current single target has been tested during fuzz testing, until all targets have been tested.

[0072] The fuzzing module 500 may include a fuzzing unit and a target switching unit.

[0073] The fuzz testing unit of this invention can automatically perform fuzz testing tasks on all high-risk targets of the target program using fuzz testing tools.

[0074] To flexibly switch test targets in a single fuzz test, the target switching unit of this embodiment of the invention can record the corresponding command number in each generated test case and ensure that only the corresponding command is used to execute the specific test case, thereby adding the used commands to the fuzz test feedback mechanism, so that the fuzz test tool can switch test targets at runtime.

[0075] Referring to Figures 2 and 3, the working principle of the automated program component risk prediction and fuzzy testing device 10 of the present invention will be described in detail using an embodiment.

[0076] As shown in Figure 2, the automated program component risk prediction and fuzz testing device 10 of this embodiment may include: a document understanding module 100, a component extraction unit 101, a description understanding unit 102, a relationship extraction module 200, a constraint relationship identification and extraction unit 201, a constraint relationship extraction and verification unit 202, a risk prediction module 300, a single component risk prediction unit 301, a component combination risk prediction unit 302, an instruction assembly module 400, a parameter value generation unit 401, an input file generation unit 402, a fuzz testing module 500, a fuzz testing unit 501, and a target switching unit 502.

[0077] Based on the above structure, as shown in Figure 3, the automated program component risk prediction and fuzz testing device 10 of this embodiment of the invention may include the following steps during actual execution:

[0078] Step S301: Using the help document of the target program as input, the pre-trained large language model is used to automatically extract each component from the help document and understand the corresponding description content. In this embodiment of the invention, the component extraction unit 101 can extract the relevant content of each component from the help document, and the description understanding unit 102 can input the extracted key information into the pre-trained large language model through preset prompts to understand the relevant content extracted by the component extraction unit 101, thereby obtaining the description content of each component in the target program.

[0079] Step S302: Based on the understanding of the description, extract the conflict dependency constraints between each component using a pre-trained large language model, and self-verify the extraction results. This embodiment of the invention utilizes the constraint recognition and extraction unit 201 to understand the components based on a pre-trained large language model, and uses preset prompts to preliminarily identify and extract the constraint relationships between each component.

[0080] For the above preliminary extraction results, the embodiment of the present invention can use the constraint relationship extraction verification unit 202 to adopt a self-checking method, so that the pre-trained large language model can rethink whether each previous extraction result is correct and remove the erroneous extraction results.

[0081] Step S303: Combining the description content and constraint relationships, a pre-trained large language model is used to predict the risk level of a single component and a combination of multiple components in the target program. On one hand, the single component risk prediction unit 301 of this embodiment can, based on the description content of each component by the pre-trained large language model, use preset prompts to instruct the large language model to associate the vulnerability risk level from the component description based on its contextual knowledge, and output a list of single components with high risk;

[0082] On the other hand, the component combination risk prediction unit 302 of this embodiment can add the constraint relationship output by the relationship extraction module 200 to the prompt, so that the pre-trained large language model can predict the component combination most likely to have a high vulnerability risk level among all component combinations without breaking the constraint relationship.

[0083] Step S304: Single components and multi-component combinations predicted to be high-risk are generated with appropriate parameter values ​​and input files by the pre-trained large language model based on the description content, and then sent to the fuzz testing module 500 for testing. In this embodiment, the parameter value generation unit 401 can select appropriate parameter values ​​for the components based on the knowledge of the pre-trained large language model itself; this embodiment can also generate valid input files for the aforementioned actually executable commands through the input file generation unit 402.

[0084] Furthermore, embodiments of the present invention can also use the fuzzing module 500 to generate at least one fuzzing configuration corresponding to the target under test using test parameter values ​​and input files, thereby performing fuzzing tests on all high-risk targets under test in the target program. This eliminates the need for manual selection of parameter values ​​and input files, or simple copying and imitation from examples, effectively completing vulnerability detection work for large programs and improving the efficiency of vulnerability detection for large programs. Specifically, the fuzzing unit 501 of this embodiment can automatically perform fuzzing tests on all high-risk targets under test in the target program using fuzzing tools.

[0085] To flexibly switch test targets in a single fuzz test, the target switching unit 502 of this embodiment can record the corresponding command number in each generated test case and ensure that only the corresponding command is used to execute the specific test case, thereby adding the used commands to the fuzz test feedback mechanism, so that the fuzz test tool can switch test targets at runtime.

[0086] Taking the video processing program FFMPEG as an example, this embodiment of the invention can provide its program documentation. The documentation understanding module 100 first extracts and understands the functional descriptions, usage instructions, and component descriptions in the documentation (S301). Based on the understanding of the program components, the relationship extraction module 200 predicts the constraint relationships between components (such as H.264 and H.265 codec conflicts, audio filter and video stream conflicts), and verifies the extracted constraint relationships through the constraint relationship extraction verification unit (S302). Based on the extracted constraint relationships, the risk prediction module 300 attempts to predict individual components (such as the HEVC encoder) and component combinations (such as combinations of scale, rotate, crop, and overlay filters) in FFMPEG that have a high vulnerability risk (S303). To test these high-risk targets, the instruction assembly module generates executable commands (such as ffmpeg -i crafted_input.mp4 -c:v libx265 output.mp4 and ffmpeg -iinput.mp4 -i watermark.png -filter_complex "[0:v]scale=1280:720,rotate=90*PI / 180,crop=640:360:0:0[rotated];[rotated][1:v]overlay=Ww-10:Hh-10" -c:a copy output.mp4) based on the document understanding and target description, and generates actual input files (such as input.mp4) for these executable commands. Finally, the generated executable commands and input files are input into the fuzzing module 500 to complete the fuzzing process of FFMPEG (S304).

[0087] The automated program component risk prediction and fuzzing device proposed in this embodiment of the invention includes a document understanding module that parses the help documentation of the target program and uses a pre-trained large language model to obtain the description of each component in the target program. A relationship extraction module obtains the constraint relationships between each component based on the description. A risk prediction module combines the description and constraint relationships to obtain the risk level prediction results for single components and combinations of multiple components in the target program. An instruction assembly module uses the prediction results to obtain at least one high-risk test target. This allows the fuzzing module to generate a corresponding fuzzing configuration for at least one test target and perform fuzzing on all high-risk test targets in the target program. By leveraging the powerful contextual understanding capabilities of the large language model, the device predicts the risk level of single components and combinations of multiple components in the target program based on the component description information and automatically performs fuzzing on high-risk targets, thereby effectively completing the vulnerability detection work of large programs and improving the vulnerability detection efficiency of large programs. This solves the technical problem in related technologies where the lack of ability to judge high-risk targets leads to low vulnerability detection efficiency in large programs.

[0088] Next, with reference to the accompanying drawings, the method for risk prediction and fuzz testing of automated program components according to embodiments of the present invention is described.

[0089] Figure 4 is a flowchart of the automated program component risk prediction and fuzz testing method according to an embodiment of the present invention.

[0090] As shown in Figure 4, the automated program component risk prediction and fuzz testing method includes the following steps:

[0091] In step S401, the help document of the target program is parsed to obtain the key information of the target program, and the key information is input into the pre-trained large language model to obtain the description of each component in the target program.

[0092] In step S402, the constraint relationships between each component are obtained based on the description content.

[0093] In step S403, combining the description content and constraint relationships, a pre-trained large language model is used to predict the risk level of a single component and a combination of multiple components in the target program, respectively, to obtain the risk level prediction results.

[0094] In step S404, at least one target to be tested for high-risk testing is obtained based on the prediction results, and test parameter values ​​and input files corresponding to at least one target to be tested are generated, wherein the target to be tested includes a single target component and / or a combination of multiple target components.

[0095] In step S405, at least one fuzzing configuration corresponding to the target under test is generated using the test parameter values ​​and the input file. This fuzzing configuration is then used to perform fuzzing tests on all high-risk targets in the target program. It should be noted that the foregoing explanation of the automated program component risk prediction and fuzzing device embodiment also applies to the automated program component risk prediction and fuzzing method of this embodiment, and will not be repeated here.

[0096] The automated program component risk prediction and fuzzing method proposed in this embodiment of the invention includes a document understanding module that parses the help documentation of the target program and uses a pre-trained large language model to obtain the description of each component in the target program. A relationship extraction module obtains the constraint relationships between each component based on the description. A risk prediction module combines the description and constraint relationships to obtain the risk level prediction results for single components and combinations of multiple components in the target program. An instruction assembly module uses the prediction results to obtain at least one high-risk test target. This allows the fuzzing module to generate fuzzing configurations corresponding to at least one test target and perform fuzzing on all high-risk test targets in the target program. By leveraging the powerful contextual understanding capabilities of the large language model, the method predicts the risk level of single components and combinations of multiple components in the target program based on the component description information and automatically performs fuzzing on high-risk targets, thereby effectively completing the vulnerability detection work of large programs and improving the vulnerability detection efficiency of large programs. This solves the technical problem in related technologies where the lack of ability to judge high-risk targets leads to low vulnerability detection efficiency in large programs.

[0097] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device may include:

[0098] The memory 501A, the processor 502A, and the computer program stored on the memory 501A and capable of running on the processor 502A.

[0099] When the processor 502A executes the program, it implements the automated program component risk prediction and fuzz testing method provided in the above embodiments.

[0100] Furthermore, electronic devices also include:

[0101] Communication interface 503A is used for communication between memory 501A and processor 502A.

[0102] Memory 501A is used to store computer programs that can run on processor 502A.

[0103] The memory 501A may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0104] If the memory 501A, processor 502A, and communication interface 503A are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in Figure 5, but this does not indicate that there is only one bus or one type of bus.

[0105] Optionally, in a specific implementation, if the memory 501A, processor 502A, and communication interface 503A are integrated on a single chip, then the memory 501A, processor 502A, and communication interface 503A can communicate with each other through their internal interfaces.

[0106] The processor 502A may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.

[0107] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described automated program component risk prediction and fuzz testing method.

[0108] This invention also provides a computer program product, including a computer program that, when executed, is used to implement the automated program component risk prediction and fuzz testing method provided in this invention.

[0109] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0110] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0111] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0112] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0113] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0114] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0115] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0116] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. An automated program component risk prediction and fuzzing apparatus, comprising: include: The document understanding module is used to parse the help document of the target program, obtain the key information of the target program, and input the key information into a pre-trained large language model to obtain the description of each component in the target program. The relationship extraction module is used to obtain the constraint relationships between each component based on the description content; The risk prediction module is used to combine the description content and the constraint relationship, and use the pre-trained large language model to predict the risk level of a single component and a combination of multiple components in the target program, respectively, to obtain the risk level prediction result. The instruction assembly module is used to obtain at least one target to be tested for high-risk testing based on the prediction results, and to generate corresponding test parameter values ​​and input files for the at least one target to be tested, wherein the target to be tested includes a single target component and / or a combination of multiple target components; The fuzzing module is used to generate a fuzzing configuration corresponding to the at least one target under test using the test parameter values ​​and the input file, so as to perform fuzzing tests on all high-risk targets under test in the target program using the fuzzing configuration.

2. The automated program component risk prediction and fuzzing device of claim 1, wherein, The document understanding module includes: The component extraction unit is used to extract relevant content for each component from the help document; The description understanding unit is used to understand the relevant content in order to obtain the description content.

3. The automated program component risk prediction and fuzzing device of claim 1, wherein, The relationship extraction module includes: The constraint relationship identification and extraction unit is used to extract the conflict dependency constraint relationships between each component based on the description content; The constraint relationship extraction and verification unit is used to verify the conflicting dependency constraint relationships, obtain the verification results, and filter the erroneous relationships between each component based on the verification results to obtain the constraint relationships.

4. The automated program component risk prediction and fuzzing device of claim 1, wherein, The risk prediction module includes: A single-component risk prediction unit is used to predict the risk level of a single component in the target program. And / or, a component combination risk prediction unit, used to predict the risk level of a combination of multiple components in the target program.

5. The automated program component risk prediction and fuzzing device of claim 1, wherein, The instruction assembly module includes: A parameter value generation unit is used to generate the test parameter values ​​corresponding to the at least one target to be tested. An input file generation unit is used to generate the input file corresponding to the at least one target to be tested.

6. The automated program component risk prediction and fuzzing device of claim 1, wherein, The fuzz testing module includes: A fuzzy testing unit is used to test a single target. The target switching unit is used to automatically switch to the next target after the current single target has been tested during fuzz testing, until all targets have been tested.

7. An automated program component risk prediction and fuzzing method, comprising: The method of using the automated program component risk prediction and fuzz testing apparatus as described in any one of claims 1-6 includes the following steps: The help documentation of the target program is parsed to obtain the key information of the target program, and the key information is input into a pre-trained large language model to obtain the description of each component in the target program; Based on the description, obtain the constraint relationships between each component; Combining the described content and the constraint relationship, the pre-trained large language model is used to predict the risk level of a single component and a combination of multiple components in the target program, respectively, to obtain the risk level prediction results; Based on the prediction results, at least one target to be tested for high-risk testing is obtained, and corresponding test parameter values ​​and input files are generated for the at least one target to be tested, wherein the target to be tested includes a single target component and / or a combination of multiple target components; The test parameter values ​​and the input file are used to generate a fuzz test configuration corresponding to the at least one target to be tested, so as to perform fuzz testing on all high-risk targets to be tested in the target program using the fuzz test configuration.

8. An electronic device, comprising: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the automated program component risk prediction and fuzz testing method as described in claim 7.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the automated program component risk prediction and fuzz testing method as described in claim 7.

10. A computer program product, characterised in that, It includes a computer program, which, when executed, is used to implement the automated program component risk prediction and fuzz testing method as described in claim 7.