Data processing method, device and equipment
By mutating the structure and instruction of the fuzzy test data of the virtual machine and generating target test data, the problem of low fuzzy testing in the existing technology is solved, and more in-depth security vulnerability detection and virtual machine security improvement are achieved.
Patent Information
- Application Number
- CN202411997973.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-31
AI Technical Summary
It is difficult for the prior art to effectively discover potential security vulnerabilities of virtual machines through fuzz testing, especially because the virtual machine structure is complex and the randomly generated input data is inefficient and ineffective.
By receiving the fuzzy test request from the virtual machine, obtaining test data, and performing structural mutation processing for the node connection relationship of the data node, then performing structural repair and instruction mutation processing, generating target test data, and finally performing fuzz testing on the virtual machine.
It improves the efficiency and effectiveness of virtual machine fuzz testing, and can further explore potential security vulnerabilities of virtual machines, thereby improving the security of virtual machines.
Smart Images

Figure CN119848874A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a data processing method, device and equipment. Background Art
[0002] With the rapid development of Internet technology, virtual machines, as a new code runtime environment, have been widely used in browsers. With the popularization of virtual machines on browsers, it has become crucial to ensure the security of virtual machine operation and protect the security of user privacy data.
[0003] For example, a large amount of random or semi-random input data can be generated to perform fuzz testing on the program to test whether the virtual machine has abnormal behavior. However, when testing the virtual machine, due to the complex structure of the virtual machine, the test efficiency and test effect of fuzz testing with randomly generated input data are low, and it is difficult to effectively discover potential security vulnerabilities of the virtual machine. To this end, the embodiments of this specification provide a better technical solution for security testing of virtual machines. Summary of the invention
[0004] The purpose of the embodiments of this specification is to provide a better technical solution for performing security testing on virtual machines.
[0005] In order to implement the above technical solution, the embodiments of this specification are implemented as follows: A data processing method provided by an embodiment of the present specification includes: receiving a fuzzy test request for a virtual machine; in response to the fuzzy test request, obtaining test data carried in the fuzzy test request; performing structural mutation processing on the test data for the node connection relationship of each data node in the test data to obtain first test data; performing structural repair processing on the first test data to obtain second test data that meets the operating requirements of the virtual machine; performing instruction mutation processing on the second test data for the instruction nodes in the second test data to obtain target test data; and performing fuzzy testing on the virtual machine according to the target test data.
[0006] A data processing device provided in an embodiment of the present specification includes: a request receiving module, used to receive a fuzzy test request for a virtual machine; a data acquisition module, used to respond to the fuzzy test request and obtain the test data carried in the fuzzy test request; a first processing module, used to perform structural variation processing on the test data with respect to the node connection relationship of each data node in the test data to obtain first test data; a structural repair module, used to perform structural repair processing on the first test data to obtain second test data that meets the running requirements of the virtual machine; a second processing module, used to perform instruction variation processing on the second test data with respect to the instruction nodes in the second test data to obtain target test data; and a testing module, used to perform fuzzy testing on the virtual machine according to the target test data.
[0007] A data processing device is provided in an embodiment of the present specification, and the data processing device includes: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: receive a fuzzy test request for a virtual machine; in response to the fuzzy test request, obtain test data carried in the fuzzy test request; perform structural mutation processing on the test data for a node connection relationship of each data node in the test data to obtain first test data; perform structural repair processing on the first test data to obtain second test data that meets the running requirements of the virtual machine; perform instruction mutation processing on the second test data for an instruction node in the second test data to obtain target test data; and perform fuzzy testing on the virtual machine according to the target test data.
[0008] An embodiment of the present specification also provides a storage medium, which is used to store computer executable instructions. When the executable instructions are executed by a processor, they implement the following process: receiving a fuzzy test request for a virtual machine; in response to the fuzzy test request, obtaining test data carried in the fuzzy test request; performing structural mutation processing on the test data for the node connection relationship of each data node in the test data to obtain first test data; performing structural repair processing on the first test data to obtain second test data that meets the operating requirements of the virtual machine; performing instruction mutation processing on the second test data for the instruction nodes in the second test data to obtain target test data; and performing fuzzy testing on the virtual machine according to the target test data.
[0009] The embodiments of the present specification also provide a computer program product, including a computer program, which implements the following process when executed by a processor: receiving a fuzzy test request for a virtual machine; in response to the fuzzy test request, obtaining test data carried in the fuzzy test request; performing structural mutation processing on the test data for the node connection relationship of each data node in the test data to obtain first test data; performing structural repair processing on the first test data to obtain second test data that meets the operating requirements of the virtual machine; performing instruction mutation processing on the second test data for the instruction nodes in the second test data to obtain target test data; and performing fuzzy testing on the virtual machine according to the target test data. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor. Figure 1 This is an embodiment of a data processing method of this specification; Figure 2 This is another data processing method embodiment of the present specification; Figure 3 A schematic diagram of a data processing process of this specification; Figure 4 This is an embodiment of a data processing device of the present specification; Figure 5 This is an embodiment of a data processing device in this specification. DETAILED DESCRIPTION
[0011] The embodiments of this specification provide a data processing method, device and equipment.
[0012] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0013] The embodiments of this specification provide a better testing mechanism for security testing of virtual machines. With the rapid development of Internet technology, virtual machines, as a new code runtime environment, have been widely used in browsers. With the popularization of virtual machines on browsers, how to ensure the security of virtual machine operation to protect the security of user privacy data has become crucial. For example, a large amount of random or semi-random input data can be generated to perform fuzz testing on the program to test whether the virtual machine has abnormal behavior. However, when testing the virtual machine, due to the complex structure of the virtual machine, the test efficiency and test effect of fuzz testing using randomly generated input data are low, and it is difficult to effectively discover potential security vulnerabilities in the virtual machine. To this end, the embodiments of this specification provide a better technical solution for security testing of virtual machines. In this scheme, by receiving a fuzz test request for a virtual machine, responding to the fuzz test request, obtaining the test data carried in the fuzz test request, and performing structural mutation processing on the test data for the node connection relationship of each data node in the test data to obtain the first test data, then the first test data can be structurally repaired to obtain the second test data that meets the virtual machine operation requirements, and the second test data can be instruction-mutated for the instruction nodes in the second test data to obtain the target test data, and finally, the virtual machine can be fuzz tested according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be structurally mutated for the node connection relationship of each data node in the test data, and on the other hand, by being able to repair the file structure that may be damaged during the structural domain mutation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural mutation processing is ensured, and the efficiency of fuzz testing is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair process, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzzy testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine. For specific processing, please refer to the specific content in the following embodiment.
[0014] like Figure 1 As shown, the embodiment of this specification provides a data processing method, and the execution subject of the method can be a server, wherein the server can be an independent server, or a server cluster composed of multiple servers, etc. In this embodiment, the execution subject is taken as an example to be described in detail, and the method can specifically include the following steps: In step S102, a fuzzy test request for a virtual machine is received.
[0015] Among them, the virtual machine can be any virtual machine that can run in a browser, for example, the virtual machine can be a WebAssembly virtual machine (WebAssembly Virtual Machine, WASM VM), the WebAssembly virtual machine can be a component for executing WebAssembly code, which can be integrated in a Web browser and server-side environment, and can provide performance close to that of local code. WASM VM can be used to load, verify and execute WASM (a binary instruction format for stack-based virtual machines) modules, and ensure that the code runs in a safe environment. It allows developers to compile code written in high-level languages (such as C, C++, Rust, etc.) into WASM format and run it in a Web environment with near-native performance. Fuzz testing is an automated software testing technology that can test programs by generating a large amount of random or semi-random input data to discover errors, vulnerabilities or abnormal behaviors in the program. The fuzz testing tool (fuzzer) can continuously provide these test data to the program to be tested to detect whether there are abnormal conditions such as crashes, illegal memory access, data corruption, etc. in the program to be tested based on the response of the program to be tested. Fuzz testing can be used to improve the security and stability of software.
[0016] In implementation, the server may trigger a fuzzy test request for the virtual machine according to a preset detection period, or the server may also receive a fuzzy test request for the virtual machine triggered by a user.
[0017] In step S104, in response to the fuzzy test request, the test data carried in the fuzzy test request is obtained.
[0018] The test data may be random or semi-random test data generated by a preset fuzz testing tool (such as a fuzzer) and used to test the virtual machine.
[0019] In step S106, a structural variation process is performed on the test data according to the node connection relationship of each data node in the test data to obtain first test data.
[0020] In implementation, the server can perform file structure parsing on the test data. For example, the server can decompose the test data into a header file and other partial files, and then further analyze each part to extract control information and related data. The file structure parsing process can utilize the control mechanism inherent in the WASM format, so that the fuzz test can accurately map the basic structure of the test data.
[0021] Then, the server can obtain the node connection relationship between data nodes in the test data based on the file structure information of the test data obtained by file structure analysis, and then perform structural variation processing on the test data based on the node connection relationship of each data node in the test data.
[0022] Among them, the structural variation processing can be to add or delete the node association relationship between the node and its parent node (or child node). For example, assuming that the test data contains data node 1, data node 2 and data node 3, wherein data node 1 is the parent node of data node 2, the server can perform structural variation processing on the test data according to the node connection relationship. Specifically, the server can delete the node connection relationship between data node 1 and data node 2, or the server can also add the node connection relationship between data node 1 and data node 3 (such as data node 3 can be used as the child node (or parent node) of data node 1), etc., to obtain the first test data.
[0023] In addition, the above-mentioned structural variation processing method is an optional and feasible processing method. In actual application scenarios, there may be a variety of different processing methods. Different processing methods can be selected according to different actual application scenarios. The embodiments of this specification do not make specific limitations on this.
[0024] In step S108, a structural repair process is performed on the first test data to obtain second test data that meets the virtual machine operation requirements.
[0025] In practice, since the test data obtained by structural variation processing may not be correctly parsed and executed during the test process, in order to improve the test efficiency, the first test data may be structurally repaired to obtain second test data that meets the virtual machine operation requirements.
[0026] Among them, there can be a variety of structural repair processing methods. For example, the server can perform structural repair processing on the first test data according to a preset repair model to obtain second test data that meets the virtual machine operation requirements. The repair model can be a model built based on a preset machine learning algorithm. In addition, there can be a variety of different structural repair processing methods. Different structural repair processing methods can be selected according to different actual application scenarios. The embodiments of this specification do not specifically limit this.
[0027] The structural repair mechanism can automatically repair the file structure that may be damaged during the mutation process, ensure the executableness of the mutated file, and improve the efficiency of fuzz testing. In step S110, instruction mutation processing is performed on the second test data with respect to instruction nodes in the second test data to obtain target test data.
[0028] During implementation, the server may perform instruction mutation processing on the second test data for instruction nodes in the second test data according to a preset instruction mutation model to obtain target test data, wherein the preset instruction mutation model may be a model constructed according to a preset machine learning algorithm.
[0029] Alternatively, the server may also perform instruction mutation processing on the second test data according to a preset instruction correspondence relationship for the instruction nodes in the second test data to obtain target test data. For example, the server may obtain the instruction type to which the instruction of each instruction node belongs, and then obtain the mutation type corresponding to the instruction type to which the instruction of each instruction node belongs according to the preset instruction correspondence relationship as shown in Table 1 below, and then perform instruction mutation processing on the instruction of each instruction node according to the mutation type.
[0030] Table 1
[0031] Specifically, assuming that the instruction type corresponding to instruction node 1 is an insert instruction, then according to the instruction correspondence shown in Table 1 above, it can be determined that the mutation type corresponding to the instruction node is a deletion instruction, and the server can perform instruction mutation processing on the instruction corresponding to instruction node 1 (i.e., mutate the instruction corresponding to instruction node 1 into a deletion instruction).
[0032] In addition, the above-mentioned instruction variation processing method is an optional and feasible variation processing method. In actual application scenarios, there may be a variety of different instruction variation processing methods. Different methods can be selected according to different actual application scenarios. The embodiments of this specification do not make specific limitations on this.
[0033] In step S112, fuzzy testing is performed on the virtual machine according to the target test data.
[0034] In implementation, the server can perform fuzz testing on the virtual machine according to the target test data, monitor the runtime behavior, record and analyze the behavior that may cause crashes or abnormalities to identify potential security vulnerabilities. Then, the server can generate a security assessment result for the virtual machine based on the fuzz testing results, wherein the server can input the fuzz testing results into a preset large language model to utilize the semantic extraction capability of the large language model to generate a security assessment result for the virtual machine.
[0035] In this way, when the server determines that the virtual machine does not meet the security requirements based on the fuzzy test results, it can generate a security repair strategy for the virtual machine based on the security assessment results, and repair the vulnerabilities and other abnormal situations discovered through the fuzzy test according to the security repair strategy, so that the repaired virtual machine can meet the security requirements.
[0036] The embodiment of this specification provides a data processing method, which receives a fuzzy test request for a virtual machine, responds to the fuzzy test request, obtains the test data carried in the fuzzy test request, performs structural variation processing on the test data for the node connection relationship of each data node in the test data, and obtains the first test data, and then performs structural repair processing on the first test data to obtain the second test data that meets the virtual machine operation requirements, performs instruction variation processing on the second test data for the instruction nodes in the second test data, and obtains the target test data, and finally, performs fuzzy testing on the virtual machine according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be subjected to structural variation processing for the node connection relationship of each data node in the test data, and on the other hand, by being able to repair the file structure that may be damaged during the structural domain variation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural variation processing is ensured, and the efficiency of the fuzzy test is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair processing, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzz testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine.
[0037] In practical applications, in step S106, the test data is subjected to structural variation processing according to the node connection relationship of each data node in the test data to obtain the first test data. There are many specific processing methods. An optional processing method is provided below, such as Figure 2 As shown, the processing may specifically include the following step S1062.
[0038] In step S1062, according to the character field of each data node in the test data and the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain first test data.
[0039] The character field may include a field for representing a byte set (BytesField) and / or a field for representing multiple repetitions (RepeatField).
[0040] In implementation, by further subdividing different parts of the test data into nodes, a more detailed understanding and control of the binary file (i.e., the test data) can be achieved, which can lay the foundation for precise byte mutation processing (i.e., byte-level structural mutation processing).
[0041] The fields corresponding to the data nodes in the test data may include: BytesField, RepeatField, UnsignedLeb128Field, SignedLeb128Field and UIntNField. Among them, BytesField can be used to represent a field of a byte sequence (or byte array, byte set), which can be used to store binary data, such as images, audio files or other binary format data. RepeatField can be used for a field that can be repeated multiple times, which can be used to store a variable number of data items, such as lists or arrays. UnsignedLeb128Field can be used to represent a field encoded using unsigned LEB128 (Little Endian Base 128), which can be used for variable length encoding schemes for encoding integers, and is particularly suitable for scenarios that require efficient encoding of a large range of integers. SignedLeb128Field: can be used to represent a field encoded using signed LEB128. The purpose of SignedLeb128Field is similar to that of unsigned LEB128, but supports negative numbers. UIntNField can be used to represent a fixed-length unsigned integer field, where N represents the number of bits (such as UInt8Field represents an 8-bit unsigned integer), which can be used to store fixed-size integers such as counters, status codes, or flags.
[0042] The server may perform structural variation processing on the test data according to BytesField and / or RepeatField for the node connection relationship of each data node in the test data to obtain first test data, so as to achieve variation at the structural level and maintain the integrity of the overall structure while adjusting the child nodes to introduce changes.
[0043] For example, the server may add or delete the node connection relationship of the data nodes according to the BytesField, or the server may flip the node connection relationship of the data nodes according to the RepeatField.
[0044] In practical applications, the specific processing methods for performing structural repair processing on the first test data in step S108 to obtain the second test data that meets the virtual machine operation requirements can be various. The virtual machine operation requirements include format specification requirements and logic specification requirements. Accordingly, an optional processing method is provided below, such as Figure 2 As shown, the processing may specifically include the following step S1082.
[0045] In step S1082, the length field of the data node in the first test data is adjusted, and the dependency relationship and data flow between the data nodes in the first test data are corrected to obtain the second test data that meets the format specification requirements and the logic specification requirements.
[0046] In implementation, the structural repair phase aims to repair the file after structural mutation processing (i.e., the first test data) to a file that is structurally reasonable and executable in the WASM runtime environment without reducing the effectiveness of the introduced mutation. This phase includes two main tasks: 1. Length adjustment, 2. Dependency and data flow correction.
[0047] Among them, length adjustment involves recalculating and adjusting the length attributes of each part and node in the WASM file. Since structural mutation processing may change the byte size of a part or element, the length field needs to be adjusted to ensure that the file obtained by structural repair meets the WASM format specification requirements so that it can be correctly parsed and executed at runtime.
[0048] The dependency and data flow correction phase can check the relationship between different parts and elements based on UnsignedLeb128Field, SignedLeb128Field and UIntNField, repair broken links, and ensure the logical consistency of data flow and dependencies.
[0049] In practical applications, in the above step S110, the second test data is subjected to instruction mutation processing for the instruction nodes in the second test data, and the specific processing methods for obtaining the target test data can be various, and the instruction mutation can include byte-level mutation. Accordingly, an optional processing method is provided below, such as Figure 2 As shown, the process may specifically include the following step S1102.
[0050] In step S1102, instruction mutation processing is performed on the second test data according to the character field of the instruction node in the second test data to obtain a first instruction node without preset instruction semantics, and target test data is determined according to the first instruction node.
[0051] In implementation, during the instruction mutation processing stage, the server can perform instruction mutation processing based on the analysis results of different fields in the WASM file structure. For example, when encountering the BytesField in the instruction node, the server can determine whether to perform instruction mutation processing on the instruction node through the byte mutator or the instruction mutator.
[0052] Among them, since fuzz testing can execute mutations that are unrelated to specific instruction semantics, therefore, without considering the instruction semantics, the second test data can be mutated by a byte mutator according to the character field of the instruction node in the second test data to obtain a first instruction node that does not have the preset instruction semantics, so as to test the virtual machine's ability to run instructions that do not have the preset semantics through the first instruction node that does not have the preset instruction semantics.
[0053] In practical applications, in the above step S110, for the instruction nodes in the second test data, the second test data is subjected to instruction variation processing, and the specific processing methods for obtaining the target test data can be various, and the instruction variation can include instruction-level variation. Accordingly, an optional processing method is provided below, such as Figure 2 As shown, the process may specifically include the following step S1104.
[0054] In step S1104, the second test data is subjected to instruction mutation processing by using a preset mutation function for instruction nodes in the second test data to obtain second instruction nodes with preset instruction semantics, and target test data is determined according to the second instruction nodes.
[0055] Among them, mutation functions can include instruction addition functions (such as insertInstruction) and instruction removal functions (such as eraseInstruction). The insertInstruction function can randomly insert instructions into the data of related child nodes, allowing new behaviors or functions to be dynamically added to the code structure. The eraseInstruction function is the opposite. The eraseInstruction function can remove existing instructions from child nodes. By randomly erasing instructions, the impact on the robustness and behavior of the program can be evaluated.
[0056] In implementation, the server can prompt the fuzz tester to respond to mutations that are sensitive to instruction semantics through the instruction mutator, and process data at a more fine-grained instruction-aware level. For example, the server can perform instruction mutation processing on the second test data for the instruction nodes in the second test data through two mutation functions, an instruction adding function (such as insertInstruction) and an instruction removing function (such as eraseInstruction), to obtain a second instruction node with preset instruction semantics.
[0057] The robustness of the WASM virtual machine running on the browser can be explored by introducing or removing instructions, thereby simulating potential failure points or vulnerabilities.
[0058] In practical applications, in the above step S110, for the instruction nodes in the second test data, the second test data is subjected to instruction variation processing to obtain the target test data. There are many specific processing methods. An optional processing method is provided below, such as Figure 2 As shown, the processing may specifically include the following steps S1106 to S1108.
[0059] In step S1106, with respect to the instruction nodes in the second test data, instruction mutation processing is performed on the second test data to obtain third test data.
[0060] In step S1108, a preset large language model is used to perform mutation processing on instruction nodes in the third test data based on a preset mutation strategy to obtain target test data.
[0061] Among them, the preset mutation strategy may include an insertion strategy, an injection strategy and a modification strategy.
[0062] In implementation, a preset large language model (LLM) can be integrated into the fuzz testing process of WebAssembly. Specifically, the WASM instructions in the third test data can be converted into the WebAssembly text format (WAT) and then input into the LLM to utilize the LLM's complex understanding and generation capabilities of the code to enhance the complexity and potential vulnerability exposure in the application.
[0063] The process of large language model mutating instruction nodes in test data can be controlled by preset mutation strategies. Each mutation strategy can be used to introduce or amplify specific aspects of code behavior (or structure). Specifically, under the insertion strategy, the task of LLM can be to insert new WAT instructions into the third test data. This method aims to increase the overall complexity of the application and discover hidden vulnerabilities by complicating the execution path.
[0064] The modification strategy involves modifying existing portions of the third test data WAT code using LLM, with the goal of increasing the complexity of the code while ensuring minimal changes to the control flow.
[0065] The injection strategy focuses on adding potentially vulnerable code snippets to the current third test data WAT code. This strategy is designed to simulate real-world attack vectors and test the resilience of the application.
[0066] Among them, WAT (WebAssembly Text Format) is the textual representation of WebAssembly, which is a human-readable format for writing and editing WebAssembly code. The WAT file contains a series of instructions and declarations that can be converted into binary format by the WASM compiler for execution in the WASM virtual machine. The WAT format is similar to the source code format of other programming languages, but it is designed for WebAssembly-specific instruction sets and semantics. With WAT, developers can more easily understand and debug WASM programs, or manually write or modify WASM code.
[0067] Integrating large language models into the fuzz testing process can leverage their advanced semantic understanding capabilities to guide mutation strategies and enhance the complexity and coverage of test cases.
[0068] In practical applications, in the above step S1108, a preset large language model is used to perform mutation processing on the instruction nodes in the third test data based on a preset mutation strategy. The specific processing method for obtaining the target test data can be varied. An optional processing method is provided below, which can specifically include the processing of the following steps A1~A2.
[0069] In step A1, the code coverage corresponding to the target test data is determined according to the target test data and a preset code database.
[0070] In step A2, when the code coverage is less than a preset coverage threshold, a preset large language model is used to perform mutation processing on instruction nodes in the third test data based on a preset mutation strategy to obtain target test data.
[0071] In implementation, in addition, since calling a large language model consumes a lot of processing power both in terms of computing resources and time, resulting in increased operating costs, in order to optimize the efficiency of the system and effectively manage resources, the frequency of LLM calls can be reduced according to code coverage.
[0072] Alternatively, the large language model (LLM) can be called only after no new paths are found in a preset detection period (such as 5 minutes, 10 minutes, etc.), which can ensure the effective utilization of LLMs to focus their powerful capabilities on scenarios where traditional methods reach a bottleneck in effectiveness.
[0073] In this way, a balance can be struck between leveraging the advanced capabilities of LLM and controlling related costs, with the following advantages: 1. Cost efficiency, significantly reducing the costs associated with frequent LLM calls; 2. Resource optimization, more efficient use of computing resources, ensuring that they are allocated where they can have the greatest impact; 3. Performance improvement, by calling LLM only when necessary, high performance can be maintained without the overhead of continuous LLM processing.
[0074] Furthermore, this incremental application of LLM not only maximizes the utilization of existing resources but also reserves more computing power for critical problems, achieving more accurate and efficient solutions.
[0075] In practical applications, the specific processing methods for performing fuzzy testing on the virtual machine according to the target test data in the above step S112 can be various. An optional processing method is provided below, such as Figure 2 As shown, the processing may specifically include the following step S1122.
[0076] In step S1122, semantic checking is performed on the target test data, and fuzzy testing is performed on the virtual machine based on the target test data that passes the semantic checking.
[0077] In implementation, Figure 3 As shown in Figure 2, after the LLM-assisted mutation phase, it is critical to perform semantic checking to verify the correctness of the mutated WAT code (i.e., target test data). The semantic checking process ensures that despite the introduced changes, the mutated code is still valid, executable, and reflects its intended functionality.
[0078] The semantic checking process can involve analyzing the mutated code to confirm whether the compiled code has syntax errors, whether the logical structure is preserved, and whether the program's behavior has unexpected changes. This step can maintain a balance between exploring the security boundaries of the application and ensuring the relevance and applicability of the fuzz testing process.
[0079] The above-mentioned structure-aware browser WebAssembly (WASM) virtual machine fuzz testing method can improve the security and stability of the browser WASM virtual machine. Traditional fuzz testing methods lack a deep understanding of the WASM file structure, so it is difficult to effectively detect potential security vulnerabilities in the WASM runtime. By deeply understanding the internal structure and execution logic of the WASM file, test inputs that are more likely to trigger hidden vulnerabilities in the deep state space can be generated. At the same time, the instruction part of the WASM file can be mutated with the help of LLM, and finally the mutated instruction part can be integrated to generate complex fuzz test inputs (i.e., target test data) to improve the effectiveness and depth of the browser WASM virtual machine fuzz testing.
[0080] Through the above implementation, browser WASM files can be effectively fuzz tested, potential security vulnerabilities can be revealed, and developers can work together to promote the patching of vulnerabilities. This structure-aware fuzz testing method can provide a strong guarantee for the security of WASM virtual machines and set a new standard for WebAssembly security testing.
[0081] The embodiment of this specification provides a data processing method, which receives a fuzzy test request for a virtual machine, responds to the fuzzy test request, obtains the test data carried in the fuzzy test request, performs structural variation processing on the test data for the node connection relationship of each data node in the test data, and obtains the first test data, and then performs structural repair processing on the first test data to obtain the second test data that meets the virtual machine operation requirements, performs instruction variation processing on the second test data for the instruction nodes in the second test data, and obtains the target test data, and finally, performs fuzzy testing on the virtual machine according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be subjected to structural variation processing for the node connection relationship of each data node in the test data, and on the other hand, by being able to repair the file structure that may be damaged during the structural domain variation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural variation processing is ensured, and the efficiency of the fuzzy test is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair processing, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzz testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine.
[0082] The above is a data processing method provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data processing device, such as Figure 4 shown.
[0083] The data processing device comprises: a request receiving module 401, a data acquiring module 402, a first processing module 403, a structure repairing module 404, a second processing module 405 and a testing module 406, wherein: A request receiving module 401 is used to receive a fuzzy test request for a virtual machine; A data acquisition module 402 is used to respond to the fuzzy test request and acquire the test data carried in the fuzzy test request; A first processing module 403 is used to perform structural variation processing on the test data according to the node connection relationship of each data node in the test data to obtain first test data; A structure repair module 404 is used to perform structure repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; A second processing module 405 is used to perform instruction variation processing on the second test data for instruction nodes in the second test data to obtain target test data; The testing module 406 is used to perform fuzzy testing on the virtual machine according to the target test data.
[0084] In the embodiment of this specification, the first processing module 403 is used to: According to the character field of each data node in the test data and the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain the first test data, wherein the character field includes a field for representing a byte set and / or a field for representing multiple repetitions.
[0085] In the embodiment of this specification, the virtual machine operation requirements include format specification requirements and logic specification requirements, and the structure repair module 404 is used to: The length fields of the data nodes in the first test data are adjusted, and the dependencies and data flows between the data nodes in the first test data are corrected to obtain the second test data that meets the format specification requirements and the logic specification requirements.
[0086] In the embodiment of this specification, the instruction variation includes byte-level variation, and the second processing module 405 is used to: According to the character field of the instruction node in the second test data, the second test data is subjected to instruction variation processing to obtain a first instruction node without preset instruction semantics, and according to the first instruction node, the target test data is determined.
[0087] In the embodiment of this specification, the instruction variation includes instruction-level variation, and the second processing module 405 is used to: By means of a preset mutation function, instruction mutation processing is performed on the instruction nodes in the second test data to obtain a second instruction node with preset instruction semantics, and the target test data is determined based on the second instruction node, wherein the mutation function includes an instruction addition function and an instruction removal function.
[0088] In the embodiment of this specification, the second processing module 405 is used to: For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain third test data; Using a preset large language model and based on a preset mutation strategy, mutation processing is performed on the instruction nodes in the third test data to obtain the target test data, wherein the preset mutation strategy includes an insertion strategy, an injection strategy and a modification strategy.
[0089] In the embodiment of this specification, the second processing module 405 is used to: Determining the code coverage corresponding to the target test data according to the target test data and a preset code database; When the code coverage is less than a preset coverage threshold, the preset large language model is used to perform mutation processing on the instruction nodes in the third test data based on the preset mutation strategy to obtain the target test data.
[0090] In the embodiment of this specification, the test module 406 is used to: A semantic check process is performed on the target test data, and a fuzzy test process is performed on the virtual machine based on the target test data that passes the semantic check.
[0091] The embodiment of this specification provides a data processing device, which receives a fuzzy test request for a virtual machine, responds to the fuzzy test request, obtains the test data carried in the fuzzy test request, performs structural variation processing on the test data for the node connection relationship of each data node in the test data, and obtains the first test data. Then, the first test data can be structurally repaired to obtain the second test data that meets the virtual machine operation requirements, and the second test data can be instruction-mutated for the instruction nodes in the second test data to obtain the target test data. Finally, the virtual machine can be fuzzy tested according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be structurally varied for the node connection relationship of each data node in the test data. On the other hand, by being able to repair the file structure that may be damaged during the structural domain variation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural variation processing is ensured, and the efficiency of the fuzzy test is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair processing, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzz testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine.
[0092] The above is a data processing device provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a data processing device, such as Figure 5 shown.
[0093] The data processing device may provide a terminal device or a server, etc. for the above-mentioned embodiments.
[0094] The data processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and memory 502, and the memory 502 may store one or more storage applications or data. Among them, the memory 502 may be a short-term storage or a persistent storage. The application stored in the memory 502 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the data processing device. Furthermore, the processor 501 may be configured to communicate with the memory 502 and execute a series of computer executable instructions in the memory 502 on the data processing device. The data processing device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input and output interfaces 505, and one or more keyboards 506.
[0095] Specifically in this embodiment, the data processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the data processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following: receiving a fuzz testing request for the virtual machine; In response to the fuzzy test request, obtaining test data carried in the fuzzy test request; According to the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain first test data; Performing structural repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain target test data; The virtual machine is subjected to fuzzy testing according to the target test data.
[0096] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the data processing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0097] The embodiment of this specification provides a data processing device, which receives a fuzzy test request for a virtual machine, responds to the fuzzy test request, obtains the test data carried in the fuzzy test request, performs structural variation processing on the test data for the node connection relationship of each data node in the test data, and obtains the first test data, and then performs structural repair processing on the first test data to obtain the second test data that meets the virtual machine operation requirements, performs instruction variation processing on the second test data for the instruction nodes in the second test data, and obtains the target test data, and finally, performs fuzzy testing on the virtual machine according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be subjected to structural variation processing for the node connection relationship of each data node in the test data, and on the other hand, by being able to repair the file structure that may be damaged during the structural domain variation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural variation processing is ensured, and the efficiency of the fuzzy test is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair processing, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzz testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine.
[0098] Furthermore, based on the above Figures 1 to 3 In one embodiment, the present specification further provides a storage medium for storing computer executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instruction information stored in the storage medium is executed by the processor, the following process can be implemented: receiving a fuzz testing request for the virtual machine; In response to the fuzzy test request, obtaining test data carried in the fuzzy test request; According to the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain first test data; Performing structural repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain target test data; The virtual machine is subjected to fuzzy testing according to the target test data.
[0099] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0100] The embodiment of this specification provides a storage medium, which receives a fuzzy test request for a virtual machine, responds to the fuzzy test request, obtains the test data carried in the fuzzy test request, performs structural variation processing on the test data for the node connection relationship of each data node in the test data, and obtains the first test data, and then performs structural repair processing on the first test data to obtain the second test data that meets the virtual machine operation requirements, performs instruction variation processing on the second test data for the instruction nodes in the second test data, and obtains the target test data, and finally, performs fuzzy testing on the virtual machine according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be subjected to structural variation processing for the node connection relationship of each data node in the test data, and on the other hand, by being able to repair the file structure that may be damaged during the structural domain variation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural variation processing is ensured, and the efficiency of fuzzy testing is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair processing, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzz testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine.
[0101] Furthermore, based on the above Figures 1 to 3 In one or more embodiments of the present specification, a computer program product is provided, including a computer program. When the computer program in the computer program product is executed by a processor, the following process can be implemented: receiving a fuzz testing request for the virtual machine; In response to the fuzzy test request, obtaining test data carried in the fuzzy test request; According to the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain first test data; Performing structural repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain target test data; The virtual machine is subjected to fuzzy testing according to the target test data.
[0102] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned computer program product embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0103] The embodiment of this specification provides a computer program product, which receives a fuzzy test request for a virtual machine, responds to the fuzzy test request, obtains the test data carried in the fuzzy test request, performs structural variation processing on the test data for the node connection relationship of each data node in the test data, and obtains the first test data, and then performs structural repair processing on the first test data to obtain the second test data that meets the virtual machine operation requirements, performs instruction variation processing on the second test data for the instruction nodes in the second test data, and obtains the target test data, and finally, performs fuzzy testing on the virtual machine according to the target test data. In this way, firstly, on the one hand, by deeply understanding the data structure of the test data, the test data can be subjected to structural variation processing for the node connection relationship of each data node in the test data, and on the other hand, by being able to repair the file structure that may be damaged during the structural domain variation process through an efficient structural repair mechanism, the executableness of the first test data obtained by the structural variation processing is ensured, and the efficiency of fuzzy testing is improved. Then, by performing instruction mutation processing on the second test data obtained by the structural repair processing, more complex target test data can be obtained. By performing fuzzy testing on the virtual machine through the target test data, potential security vulnerabilities of the virtual machine can be discovered, the effectiveness and depth of the virtual machine fuzz testing can be improved, and the patching of security vulnerabilities can be promoted to improve the security of the virtual machine.
[0104] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0105] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0106] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0107] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0108] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0109] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0110] The embodiments of this specification are described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of 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 fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the processes in the process. 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.
[0111] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including 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.
[0112] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide 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.
[0113] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0114] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0115] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0116] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0117] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Furthermore, one or more embodiments of this specification may be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0118] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0119] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0120] The above description is only an embodiment of this specification and is not intended to limit this document. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this specification.
Claims
1. A data processing method, comprising: receiving a fuzz testing request for the virtual machine; In response to the fuzzy test request, obtaining test data carried in the fuzzy test request; According to the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain first test data; Performing structural repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain target test data; The virtual machine is subjected to fuzzy testing according to the target test data.
2. The method according to claim 1, wherein the step of performing structural variation processing on the test data according to the node connection relationship of each data node in the test data to obtain the first test data comprises: According to the character field of each data node in the test data and the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain the first test data, wherein the character field includes a field for representing a byte set and / or a field for representing multiple repetitions.
3. The method according to claim 2, wherein the virtual machine operation requirements include format specification requirements and logic specification requirements, and the performing structural repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements includes: The length fields of the data nodes in the first test data are adjusted, and the dependencies and data flows between the data nodes in the first test data are corrected to obtain the second test data that meets the format specification requirements and the logic specification requirements.
4. The method according to claim 1, wherein the instruction variation comprises a byte-level variation, and the step of performing instruction variation processing on the second test data for the instruction nodes in the second test data to obtain target test data comprises: According to the character field of the instruction node in the second test data, the second test data is subjected to instruction variation processing to obtain a first instruction node without preset instruction semantics, and the target test data is determined according to the first instruction node.
5. The method according to claim 1, wherein the instruction variation comprises instruction-level variation, and the step of performing instruction variation processing on the second test data for the instruction nodes in the second test data to obtain target test data comprises: By means of a preset mutation function, instruction mutation processing is performed on the instruction nodes in the second test data to obtain a second instruction node with preset instruction semantics, and the target test data is determined based on the second instruction node, wherein the mutation function includes an instruction addition function and an instruction removal function.
6. The method according to claim 1, wherein for instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain target test data comprises: For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain third test data; Using a preset large language model and based on a preset mutation strategy, mutation processing is performed on the instruction nodes in the third test data to obtain the target test data, wherein the preset mutation strategy includes an insertion strategy, an injection strategy and a modification strategy.
7. The method according to claim 6, wherein the step of using a preset large language model and performing mutation processing on instruction nodes in the third test data based on a preset mutation strategy to obtain the target test data comprises: Determining the code coverage corresponding to the target test data according to the target test data and a preset code database; When the code coverage is less than a preset coverage threshold, the preset large language model is used to perform mutation processing on the instruction nodes in the third test data based on the preset mutation strategy to obtain the target test data.
8. The method according to claim 6, wherein the performing fuzzy testing on the virtual machine according to the target test data comprises: A semantic check process is performed on the target test data, and a fuzzy test process is performed on the virtual machine based on the target test data that passes the semantic check.
9. A data processing device, comprising: A request receiving module, used for receiving a fuzz testing request for a virtual machine; A data acquisition module, used for acquiring the test data carried in the fuzzy test request in response to the fuzzy test request; A first processing module, configured to perform structural variation processing on the test data according to the node connection relationship of each data node in the test data to obtain first test data; A structure repair module, used for performing structure repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; A second processing module, configured to perform instruction variation processing on the second test data with respect to instruction nodes in the second test data to obtain target test data; A testing module is used to perform fuzzy testing on the virtual machine according to the target test data.
10. A data processing device, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: receiving a fuzz testing request for the virtual machine; In response to the fuzzy test request, obtaining test data carried in the fuzzy test request; According to the node connection relationship of each data node in the test data, the test data is subjected to structural variation processing to obtain first test data; Performing structural repair processing on the first test data to obtain second test data that meets the virtual machine operation requirements; For the instruction nodes in the second test data, performing instruction mutation processing on the second test data to obtain target test data; The virtual machine is subjected to fuzzy testing according to the target test data.
Citation Information
Patent Citations
Virtual machine escape vulnerability mining method, device, equipment and medium
CN110764870A
Vulnerability scanning method and system and electronic equipment
CN118898073A
Resources usage for fuzz testing applications
US20200210326A1
Machine learning techniques for automated software testing configuration management
US20230251960A1
Code test method and apparatus, and test case generation method and apparatus
WO2023217118A1
Cited By
Web application server side vulnerability test method and device
CN121000426A