Fuzzy test seed sharing method, equipment and medium
By introducing mutant fuzzing and a shared seed pool into generative fuzzing, and combining it with template optimization using a large language model, the problems of insufficient testing efficiency and coverage in existing fuzzing are solved, achieving more efficient program coverage.
Patent Information
- Application Number
- CN202410499368.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-28
Smart Images

Figure CN120849260A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a fuzzy testing seed sharing method, device, and medium. Background Technology
[0002] Currently, fuzz testing, as a software testing technique, is based on the idea of inputting a large amount of automatically or semi-automatically generated random data into a program and monitoring program anomalies to discover possible program errors. Fuzz testing technology is widely used to detect security vulnerabilities in software or computer systems.
[0003] Currently, mainstream protocol fuzzing is divided into generative and mutation-based methods. Generative protocol fuzzing uses templates to generate a large number of test cases based on the protocol specification; mutation-based protocol fuzzing generates new test cases by mutating existing seeds, without requiring any protocol specification. However, neither of these methods, which rely solely on templates or message mutation to generate test cases, can achieve complete coverage of the target program while ensuring testing efficiency.
[0004] It is evident that there is an urgent need for a fuzz test seed sharing method that can improve testing efficiency and coverage. Summary of the Invention
[0005] In view of this, the present disclosure provides a fuzz test seed sharing method, which at least partially solves the problems of poor testing efficiency and coverage in the prior art.
[0006] This disclosure provides a method for sharing fuzz test seeds, including:
[0007] Step 1: For generative fuzzing, write a template that conforms to the specific format requirements of the fuzzer according to the protocol specification; for variant fuzzing, select some test cases from the existing test cases as initial seeds.
[0008] Step 2, run the generative fuzzer instance and the mutating fuzzer instance;
[0009] Step 3: For generative fuzzing, the fuzzer instance generates test cases based on the template. For mutative fuzzing, the fuzzer instance adds the initial seed to the seed queue and selects a seed from it to mutate, thus obtaining test cases.
[0010] Step 4: The fuzzer instance inputs test cases into the target program for testing;
[0011] Step 5: If the current test case covers a new path, a new branch, or triggers a new crash, add it to the shared seed pool.
[0012] Step 6: The generative fuzzer instance retrieves test cases from the shared seed pool and generates a template based on the retrieved test cases. The mutative fuzzer instance retrieves test cases from the shared seed pool as new seeds and adds them to the seed queue.
[0013] Step 7: Repeat steps 3 to 6 until no test cases cover the new path, new branch, or trigger a new crash for a set number of consecutive rounds.
[0014] Step 8: Evaluate the test results.
[0015] According to a specific implementation of an embodiment of this disclosure, step 5 specifically includes:
[0016] Step 5.1: Save the test cases discovered by each fuzzer instance that cover new paths, new branches, or trigger new crashes as seeds in a subfolder maintained by this fuzzer instance under the corresponding folder of the shared seed pool.
[0017] Step 5.2: Evaluate the weight of the current test case in the shared seed pool based on the number of paths p, the number of branches b, or the number of new crashes c triggered by the current test case.
[0018] According to a specific implementation of this disclosure, the expression for the weight is:
[0019] W case = p×l+b×m+c×n, where l+m+n=1.
[0020] According to a specific implementation of an embodiment of this disclosure, step 6 specifically includes:
[0021] Step 6.1: When the number of test cases generated by each fuzzer instance is less than the preset number, each fuzzer instance only tests the test cases it generates. As the test progresses, when the number of generated test cases reaches the preset number, each fuzzer instance begins to scan the subfolders maintained by other fuzzer instances under the shared seed pool folder.
[0022] Step 6.2: For a mutated fuzzer instance, if the scanned test cases are not in its own seed queue, they are assigned according to weight W. case Test cases are added in descending order of size. For generative fuzzer instances, if a scanned test case has not been tested before, its weight W is increased. case The largest test case is split according to fields, and the split fields are used to generate a template that conforms to the specific format requirements of the fuzzer;
[0023] Step 6.3: For the generative fuzzer instance, input the protocol specification document into the large language model, and then use the large language model to perform legality checks and refinement on the template.
[0024] Secondly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0025] At least one processor; and,
[0026] The memory is communicatively connected to the at least one processor; wherein,
[0027] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the fuzz test seed sharing method in the first aspect or any implementation thereof.
[0028] Thirdly, embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the fuzzy test seed sharing method in the first aspect or any implementation thereof.
[0029] Fourthly, embodiments of this disclosure also provide a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the fuzzy test seed sharing method in the first aspect or any implementation thereof.
[0030] The fuzzing seed sharing scheme in this embodiment includes: Step 1, for generative fuzzing, writing a template conforming to the specific format requirements of the fuzzer according to the protocol specification; for mutative fuzzing, selecting some test cases from existing test cases as initial seeds; Step 2, running generative fuzzer instances and mutative fuzzer instances; Step 3, for generative fuzzing, the fuzzer instance generates test cases according to the template; for mutative fuzzing, the fuzzer instance adds the initial seed to the seed queue and selects one seed to mutate to obtain a test case; Step 4, the fuzzer instance inputs the test cases to the target program for testing; Step 5, if the current test case covers a new path, a new branch, or triggers a new crash, it is added to the shared seed pool; Step 6, the generative fuzzer instance obtains test cases from the shared seed pool, generates a template according to the obtained test cases, and the mutative fuzzer instance obtains test cases from the shared seed pool as new seeds and adds them to the seed queue; Step 7, repeating steps 3 to 6 until no test cases cover a new path, a new branch, or trigger a new crash for a consecutive preset number of rounds; Step 8, evaluating the test results.
[0031] The beneficial effects of the embodiments of this disclosure are as follows: By introducing variant fuzzing on the basis of generative fuzzing generating test cases according to templates, the diversity of test cases is improved through the solution of this disclosure, thereby improving the coverage of the target program while ensuring testing efficiency. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 A flowchart illustrating a fuzz testing seed sharing method provided in this embodiment of the disclosure;
[0034] Figure 2 This is a schematic diagram illustrating a specific implementation process for fuzz test seed sharing provided in an embodiment of this disclosure;
[0035] Figure 3 A schematic diagram illustrating the test case generation process of different testing methods provided in the embodiments of this disclosure;
[0036] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0037] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0038] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0039] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0040] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0041] Additionally, in the following description, specific details are provided to provide a thorough understanding of the examples. However, one skilled in the art will appreciate that the aspects described may be practiced without these specific details.
[0042] This disclosure provides a fuzz test seed sharing method, which can be applied to software testing processes in Internet scenarios.
[0043] See Figure 1 This is a flowchart illustrating a fuzzy testing seed sharing method provided in an embodiment of this disclosure. Figure 1 and Figure 2 As shown, the method mainly includes the following steps:
[0044] Step 1: For generative fuzzing, write a template that conforms to the specific format requirements of the fuzzer according to the protocol specification; for variant fuzzing, select some test cases from the existing test cases as initial seeds.
[0045] like Figure 3 As shown, (a) represents the test case generation method for generative fuzzing, and (b) represents the test case generation method for mutation fuzzing. In generative fuzzing, a template is developed based on the protocol specification to generate test cases. First, based on the selected target protocol, the protocol specifications such as the Request for Comments (RFC) and official documentation are obtained. The protocol specifications are analyzed to extract information such as message structure, field types, and state transitions. Then, a test case template is developed based on the extracted information. Next, a generative fuzzer instance is run to generate test cases based on the template, and the test cases are input into the target program for testing. Finally, the test results are evaluated.
[0046] In the process of mutational fuzzing, test cases are generated through message mutation. First, a subset of test cases is selected from the existing test cases as the initial corpus. Then, a mutational fuzzer instance is run, selecting a seed from the corpus for mutation to obtain new test cases. These test cases are then input into the target program for testing. The corpus and mutation strategy are adjusted based on the coverage information of the current test cases, and the above process is repeated. Finally, the test results are evaluated.
[0047] Previous research has only considered improving the quality of test cases through relevant protocol specifications, thereby reducing the possibility of generated test cases being rejected by the protocol implementation; or it has only considered increasing the variety of test cases through mutation, so that the generated test cases can cover the target program as completely as possible. However, both of these methods either fail to achieve high coverage or result in unsatisfactory testing efficiency.
[0048] Generative fuzzing, due to its fixed template, results in a limited set of test cases that can be generated. Even with unlimited time, it cannot guarantee complete coverage of the target program. On the other hand, mutant fuzzing, lacking the protocol specifications defined in the template, may result in test cases being rejected prematurely by the protocol implementation, leading to low testing efficiency.
[0049] Therefore, the method disclosed herein considers improving testing effectiveness and efficiency at the test case level by introducing mutant fuzzing on the basis of generative fuzzing: a shared seed pool is constructed to store test cases generated by generative fuzzer instances and mutant fuzzer instances that can cover new paths, new branches, or trigger new crashes; at the same time, generative fuzzer instances and mutant fuzzer instances extract test cases from the shared seed pool for use in their own fuzzing tasks, thereby achieving as complete coverage of the target program as possible while ensuring the legality of test cases.
[0050] The key processes of this disclosure embodiment mainly include two stages: test case push and seed acquisition. First, initial test cases are prepared for each fuzzer instance for the first round of fuzz testing. Then, in the test case push stage, each fuzzer instance adds valuable test cases it discovers to a shared seed pool. In the seed acquisition stage, each fuzzer instance retrieves test cases from the shared seed pool. These two stages are executed cyclically. Finally, the test results are evaluated.
[0051] Specifically, for generative fuzzing, a template conforming to the specific format requirements of the fuzzer is written according to the protocol specification. This template is a structured description that defines the format, fields, data types, and possible value ranges of the protocol messages, guiding the testing tool to generate test cases. For mutation fuzzing, some test cases can be selected from existing test cases as initial seeds. The initial seeds are the initial input data used to generate test cases. By mutating the seeds, diverse test cases can be generated.
[0052] Step 2, run the generative fuzzer instance and the mutating fuzzer instance;
[0053] Step 3: For generative fuzzing, the fuzzer instance generates test cases based on the template. For mutative fuzzing, the fuzzer instance adds the initial seed to the seed queue and selects a seed from it to mutate, thus obtaining test cases.
[0054] Step 4: The fuzzer instance inputs test cases into the target program for testing;
[0055] Step 5: If the current test case covers a new path, a new branch, or triggers a new crash, add it to the shared seed pool.
[0056] Based on the above embodiments, step 5 specifically includes:
[0057] Step 5.1: Save the test cases discovered by each fuzzer instance that cover new paths, new branches, or trigger new crashes as seeds in a subfolder maintained by this fuzzer instance under the corresponding folder of the shared seed pool.
[0058] Step 5.2: Evaluate the weight of the current test case in the shared seed pool based on the number of paths p, the number of branches b, or the number of new crashes c triggered by the current test case.
[0059] Furthermore, the expression for the weight is as follows:
[0060] W case = p×l+b×m+c×n, where l+m+n=1.
[0061] In practice, test cases discovered by each fuzzer instance that cover new paths, new branches, or trigger new crashes can be stored as seeds in a subfolder maintained by the fuzzer instance within the shared seed pool folder. Then, the weight W of a test case in the shared seed pool can be evaluated based on the number of paths p, the number of branches b, or the number of new crashes c triggered by the test case. case = p×l+b×m+c×n, where l+m+n=1, so that in the subsequent processing flow, the order of processing test cases can be determined according to the weights.
[0062] Step 6: The generative fuzzer instance retrieves test cases from the shared seed pool and generates a template based on the retrieved test cases. The mutative fuzzer instance retrieves test cases from the shared seed pool as new seeds and adds them to the seed queue.
[0063] Based on the above embodiments, step 6 specifically includes:
[0064] Step 6.1: When the number of test cases generated by each fuzzer instance is less than the preset number, each fuzzer instance only tests the test cases it generates. As the test progresses, when the number of generated test cases reaches the preset number, each fuzzer instance begins to scan the subfolders maintained by other fuzzer instances under the shared seed pool folder.
[0065] Step 6.2: For a mutated fuzzer instance, if the scanned test cases are not in its own seed queue, they are assigned according to weight W. case Test cases are added in descending order of size. For generative fuzzer instances, if a scanned test case has not been tested before, its weight W is increased. case The largest test case is split according to fields, and the split fields are used to generate a template that conforms to the specific format requirements of the fuzzer;
[0066] Step 6.3: For the generative fuzzer instance, input the protocol specification document into the large language model, and then use the large language model to perform legality checks and refinement on the template.
[0067] In practice, in the early stages of testing, when the number of test cases generated by each fuzzer instance is small, each fuzzer instance only tests the test cases it generates. As the testing progresses, when the number of generated test cases reaches 1000, each fuzzer instance begins to scan the subfolders maintained by other fuzzer instances under the shared seed pool folder.
[0068] For a mutated fuzzer instance, if the scanned test cases are not in its own seed queue, they are processed according to weight W. case Test cases are added in descending order of size. For generative fuzzer instances, if a scanned test case has not been tested before, its weight W is increased. case The largest test case is split according to fields, and the split fields are used to generate a template that conforms to the specific format requirements of the fuzzer.
[0069] For a generative fuzzer instance, the protocol specification document is input into the large language model. The protocol specification is a detailed document or description that defines various aspects of protocol communication, including message format, field definition, data type, state transition, etc. Then, the large language model is used to perform legality checks and refinement on the template.
[0070] Step 7: Repeat steps 3 to 6 until no test cases cover the new path, new branch, or trigger a new crash for a set number of consecutive rounds.
[0071] Step 8: Evaluate the test results.
[0072] The method disclosed herein introduces mutant fuzzing on the basis of generative fuzzing that generates test cases based on templates. The combination of the two generates high-quality test cases, which overcomes the shortcomings of the original mutant fuzzing and reduces the possibility of test cases being rejected prematurely by the protocol implementation. It also overcomes the shortcomings of the original generative fuzzing and improves the diversity of test cases, enabling them to more comprehensively cover the target program.
[0073] This method draws on the seed-sharing mechanism of AFL-p and designs a template generation module on this basis to realize the transformation from test cases to templates. This enables generative fuzzing to utilize valuable test cases in the shared seed pool to improve its testing performance. Furthermore, it combines a large language model to further refine the generated templates.
[0074] The fuzzing seed-sharing method provided in this embodiment improves the test case generation approach by proposing a novel seed-sharing framework for protocol fuzzing. Specifically, it combines the advantages of generative fuzzing and mutant fuzzing in test case generation, and designs a shared seed pool to share test cases discovered by generative and mutant fuzzer instances that cover new paths, new branches, or trigger new crashes. This generates more legitimate and diverse test cases, improving the effectiveness and efficiency of protocol pattern testing.
[0075] See Figure 4 This disclosure also provides an electronic device 40, which includes at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed, enables the at least one processor to perform the fuzz test seed sharing method described in the foregoing method embodiments.
[0076] This disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the fuzzy test seed sharing method in the foregoing method embodiments.
[0077] This disclosure also provides a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the fuzz test seed sharing method in the foregoing method embodiments.
[0078] The following is for reference. Figure 4 The diagram illustrates a structural schematic of an electronic device 40 suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0079] like Figure 4As shown, electronic device 40 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of electronic device 40. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0080] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 40 to communicate wirelessly or wiredly with other devices to exchange data. Although electronic device 40 with various devices is shown in the figure, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0081] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.
[0082] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0083] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0084] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, enable the electronic device to perform the relevant steps of the above-described method embodiments.
[0085] Alternatively, the aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, enable the electronic device to perform the relevant steps of the above method embodiments.
[0086] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltank, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0087] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0088] The units described in the embodiments of this disclosure can be implemented in software or in hardware.
[0089] It should be understood that the various parts of this disclosure can be implemented in hardware, software, firmware, or a combination thereof.
[0090] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A fuzzy testing seed sharing method, characterized in that, include: Step 1: For generative fuzzing, write a template that conforms to the specific format requirements of the fuzzer according to the protocol specification; for variant fuzzing, select some test cases from the existing test cases as initial seeds. Step 2, run the generative fuzzer instance and the mutating fuzzer instance; Step 3: For generative fuzzing, the fuzzer instance generates test cases based on the template. For mutative fuzzing, the fuzzer instance adds the initial seed to the seed queue and selects a seed from it to mutate, thus obtaining test cases. Step 4: The fuzzer instance inputs test cases into the target program for testing; Step 5: If the current test case covers a new path, a new branch, or triggers a new crash, add it to the shared seed pool. Step 6: The generative fuzzer instance retrieves test cases from the shared seed pool and generates a template based on the retrieved test cases. The mutative fuzzer instance retrieves test cases from the shared seed pool as new seeds and adds them to the seed queue. Step 7: Repeat steps 3 to 6 until no test cases cover the new path, new branch, or trigger a new crash for a set number of consecutive rounds. Step 8: Evaluate the test results.
2. The method according to claim 1, characterized in that, Step 5 specifically includes: Step 5.1: Save the test cases discovered by each fuzzer instance that cover new paths, new branches, or trigger new crashes as seeds in a subfolder maintained by this fuzzer instance under the corresponding folder of the shared seed pool. Step 5.2: Evaluate the weight of the current test case in the shared seed pool based on the number of paths p, the number of branches b, or the number of new crashes c triggered by the current test case.
3. The method according to claim 2, characterized in that, The expression for the weight is W. case = p×l+b×m+c×n, where l+m+n=1.
4. The method according to claim 3, characterized in that, Step 6 specifically includes: Step 6.1: When the number of test cases generated by each fuzzer instance is less than the preset number, each fuzzer instance only tests the test cases it generates. As the test progresses, when the number of generated test cases reaches the preset number, each fuzzer instance begins to scan the subfolders maintained by other fuzzer instances under the shared seed pool folder. Step 6.2: For a mutated fuzzer instance, if the scanned test cases are not in its own seed queue, they are assigned according to weight W. case Test cases are added in descending order of size. For generative fuzzer instances, if a scanned test case has not been tested before, its weight W is increased. case The largest test case is split according to fields, and the split fields are used to generate a template that conforms to the specific format requirements of the fuzzer; Step 6.3: For the generative fuzzer instance, input the protocol specification document into the large language model, and then use the large language model to perform legality checks and refinement on the template.
5. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the fuzz test seed sharing method according to any one of claims 1-4.
6. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the fuzzy test seed sharing method according to any one of claims 1-4.