Vulnerability scanning method and system and electronic equipment
By preprocessing and fuzzing multi-source data to generate variant data, the running status of the target program can be monitored in real time. This solves the problem that existing technologies cannot effectively detect unknown vulnerabilities in complex systems, and achieves efficient vulnerability identification and report generation.
Patent Information
- Application Number
- CN202410983275.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-05
AI Technical Summary
Existing vulnerability scanning technologies are insufficient to effectively detect unknown vulnerabilities in complex systems, especially in terms of the depth and breadth of processing multi-source data and mutation strategies, resulting in inadequate vulnerability detection.
By collecting multi-source data (text, binary, image, audio, video), preprocessing it, and converting it into a format that meets the requirements for fuzzing, and using text data fuzzing generator, HTTP protocol fuzzing generator, binary fuzzing generator, multimedia data fuzzing generator, and custom fuzzing generator to generate mutated data, the running status of the target program is monitored in real time, abnormal behavior and crash information are captured, and vulnerabilities are analyzed and identified.
It improves the accuracy and efficiency of vulnerability detection, enabling rapid identification of potential vulnerabilities in complex systems, reducing the testing burden, and improving the efficiency and repeatability of automated testing.
Smart Images

Figure CN118898073A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a vulnerability scanning method, system and electronic device. Background Art
[0002] With the continuous development of computer technology and network applications, systems and applications are becoming more and more complex, and the number of their vulnerabilities is also increasing. Existing vulnerability scanning technologies mainly rely on known vulnerability libraries to detect system security by matching known vulnerability features.
[0003] In related technologies, one way is to detect the system by matching known vulnerability features. This method has limited effect on detecting new unknown vulnerabilities and is easily overlooked. Another way is fuzz testing, which provides a large amount of randomly generated data that exceeds the normal expected range as input to the target system and monitors the abnormal results caused by these inputs to discover vulnerabilities in the software. However, traditional fuzz testing has limitations in processing multi-source data and the depth and breadth of mutation strategies, making it difficult to fully cover and detect all potential vulnerabilities in complex systems. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present application discloses a vulnerability scanning method, system and electronic device, which are used to overcome the problem of limited real-time monitoring and anomaly detection capabilities in vulnerability scanning.
[0005] The first aspect of the present application discloses a vulnerability scanning method, comprising: collecting test data, wherein the test data is multi-source data, and the multi-source data includes at least one of text, binary, image, audio and video; preprocessing the test data and converting it into target test data in a preset format, wherein the preset format is a format that satisfies fuzzy processing; fuzzy processing is performed on the target test data to determine a variant file containing multiple variant data, so that the variant file is input into a target program to simulate various input scenarios; real-time monitoring of the running status of the target program simulating various input scenarios to obtain abnormal behavior and crash information of the variant file; analyzing the abnormal behavior and the crash information, identifying vulnerabilities and generating a vulnerability report.
[0006] In certain embodiments of the first aspect of the present application, the target test data is fuzzy processed to determine a plurality of variant data, including: calling a matching fuzzy strategy to perform fuzzy processing according to the data format of the target test data, converting each type of the target test data into a type of variant data, and aggregating each type of the variant data to obtain a plurality of the variant data; wherein the fuzzy strategy includes at least one of a text data fuzzy generator, an HTTP protocol fuzzy generator, a binary fuzzy generator, a multimedia data fuzzy generator, and a custom fuzzy generator.
[0007] In certain embodiments of the first aspect of the present application, the text data fuzzy generator is used to perform character replacement, character insertion or character deletion on a JSON file or an XML file to mutate the structure of any file; the multimedia data fuzzy generator is used to perform format mutation and content mutation on a JPEG file and an MP4 file to change the frame rate or color depth of a video file; the custom fuzzy generator is used to perform mutation processing on preset fields in preset files; the binary fuzzy generator is used to perform bit flipping on JPEG files and MP4 files to flip the binary bytes of any file to complete the bit flipping and generate a new test case, or to change the binary bytes of any file by byte insertion or byte deletion to generate a new test case, or to mutate the format elements of the file format of JPEG files and MP4 files to generate a new test case; the HTTP protocol fuzzy generator is used to perform fuzzy mutation on the request line, request header or request body of the HTTP protocol to generate a mutated HTTP protocol, and the fuzzy mutation includes at least one of character insertion, character deletion or character replacement.
[0008] In certain embodiments of the first aspect of the present application, the request line includes HTTP method variation, URL variation, HTTP version variation, and From-data variation for fuzzy variation; the request header includes header field name, header field value, header field insertion, and header field deletion for fuzzy variation; the request body fuzzy variation includes character replacement, character insertion, character deletion, and format variation for fuzzy variation.
[0009] In certain embodiments of the first aspect of the present application, real-time monitoring of the running state of the target program simulating various input scenarios to obtain abnormal behavior and crash information of the variant data includes:
[0010] Real-time monitoring of the CPU, memory and network usage of the terminal running the target program, and detection of potential performance bottlenecks and resource exhaustion of the terminal;
[0011] Capturing a log file of the target program processing the mutated file, and detecting abnormal behavior of the mutated file according to the log file, the performance bottleneck, and the resource exhaustion, wherein the abnormal behavior includes a crash, an error response, and data leakage of the program;
[0012] If it is detected that the abnormal behavior includes a program crash, the crash stack, error code and crash time are recorded and determined as crash information.
[0013] In certain embodiments of the first aspect of the present application, the abnormal behavior and the crash information are analyzed to identify vulnerabilities and generate a vulnerability report, including: pattern matching the abnormal behavior and the crash information to determine the vulnerability type, the vulnerability type including buffer overflow, SQL injection or cross-site scripting attack; backtracing analysis of the crash stack in the crash information to locate the source of the vulnerability in the source code; using a code auditing tool to audit the source code to find potential security vulnerabilities; generating a vulnerability report for the vulnerability type, the vulnerability source and the security vulnerability, the vulnerability report including a vulnerability description, impact analysis and repair suggestions.
[0014] In certain embodiments of the first aspect of the present application, it also includes: saving and backing up the test data; comparing the backed-up test data one by one according to the vulnerability report, determining and outputting the comparison results, and storing them persistently.
[0015] In certain embodiments of the first aspect of the present application, the test data is preprocessed and converted into target test data in a preset format, including: preprocessing the test data, the preprocessing including data cleaning, normalization and format conversion, converting the multiple test data in different formats into target test data in a preset format.
[0016] The second aspect of the present application discloses a vulnerability scanning system, including: a data collection module, used to collect test data, the test data is multi-source data, and the multi-source data includes at least one of text, binary, image, audio and video; a preprocessing module, used to preprocess the test data and convert it into target test data in a preset format, and the preset format is a format that satisfies fuzzy processing; a fuzzy processing module, used to fuzzy the target test data, determine a variant file containing multiple variant data, so that the variant file is input into a target program to simulate various input scenarios; an anomaly detection module, used to monitor the running status of the target program simulating various input scenarios in real time, and obtain abnormal behavior and crash information of the variant file; a vulnerability analysis module, used to analyze the abnormal behavior and the crash information, identify vulnerabilities and generate a vulnerability report.
[0017] The third aspect of the present application discloses an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.
[0018] The beneficial effects of the present application are as follows: first, by collecting test data, the test data is multi-source data, so that the target program can receive various test data, which is helpful to discover vulnerabilities that are sensitive to specific types of inputs; second, the test data is preprocessed and converted into target test data in a preset format, which improves the efficiency of automated testing and makes the testing process faster and more repeatable; third, the target test data is fuzzy processed to determine a variant file containing a variety of variant data, so that the variant file is input into the target program to simulate various input scenarios, and a variety of fuzzy generation strategies are used to trigger abnormal paths and boundary conditions in the target program that are not easily covered by conventional tests, thereby enhancing the ability to detect potential vulnerabilities; finally, the running status of the target program simulating various input scenarios is monitored in real time to obtain abnormal behavior and crash information of the variant file; the abnormal behavior and the crash information are analyzed, vulnerabilities are identified and vulnerability reports are generated, so that testers can quickly locate problems and quickly respond to and handle potential vulnerabilities, which not only reduces the burden of testing, but also improves the accuracy and efficiency of vulnerability identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is an application environment diagram for implementing a vulnerability scanning system in an embodiment of the present application;
[0020] Figure 2 It is a flowchart of a vulnerability scanning method in an embodiment of the present application;
[0021] Figure 3 It is a framework flow chart of a vulnerability scanning method in an embodiment of the present application;
[0022] Figure 4 It is a GUI interface view in a vulnerability scanning method in an embodiment of the present application;
[0023] Figure 5 It is an interface view of a binary fuzzy test in a vulnerability scanning method in an embodiment of the present application;
[0024] Figure 6 In the embodiment of this application Figure 4 and Figure 5 The interface view of another part of the interface;
[0025] Figure 7 It is a test data and result diagram in a vulnerability scanning method in an embodiment of the present application;
[0026] Figure 8 This is a partial interface view of a binary fuzzy test in an embodiment of the present application;
[0027] Fig. 9 This is an architectural design diagram of a vulnerability scanning system in an embodiment of the present application;
[0028] Fig.10 It is a structural diagram of a vulnerability scanning system in an embodiment of the present application;
[0029] Fig.11 It is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.
[0031] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0032] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0033] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0034] Unless otherwise stated, the term "plurality" means two or more.
[0035] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0036] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0037] Combination Figure 1 As shown, an embodiment of the present disclosure provides a system architecture diagram for implementing a vulnerability scanning system, including a user end and a server end, wherein the user end and the server end are connected to a network and communicate with each other. In this application, the user end is the front end and the server end is the back end, which will not be repeated.
[0038] The embodiment of the present application provides a vulnerability scanning system, which can be applied to a terminal, a server, or software running in a terminal or a server. In some embodiments, the terminal can be at least one of a computer device, a desktop device, a smart phone, and a tablet device; the server can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms; the software can be an application for vulnerability scanning, etc., but is not limited to the above forms.
[0039] For example, see Figure 1 , is an implementation environment diagram of a vulnerability scanning system provided by the present application. The vulnerability scanning system in the present application is exemplarily as follows: Figure 1 As shown, the execution body of the system provided in the embodiment of the present application is mainly arranged on the user side, and the user side responds to the vulnerability scanning system.
[0040] Combination Figure 2 As shown, the embodiment of the present disclosure provides a vulnerability scanning method flow chart, including:
[0041] Step S201, collecting test data, wherein the test data is multi-source data, and the multi-source data includes at least one of text, binary, image, audio and video;
[0042] Specifically, diverse test data is collected and used as input for fuzz testing. The test data includes multiple formats, such as text, binary, image, audio, and video, as the data type processed by the target program. In this way, the test data helps to increase the discovery of different types of vulnerabilities.
[0043] For example, use the file system scanner to scan uploaded files on the server and collect JSON, XML, JPEG and MP4 files; use the network traffic capturer to capture the network traffic of user uploaded files and extract the uploaded file data; use the API interface to obtain sample file data by calling the API interface of the Web application.
[0044] Step S202, pre-processing the test data to convert it into target test data in a preset format, where the preset format is a format that satisfies fuzzy processing;
[0045] Specifically, the test data is preprocessed, and the preprocessing includes data cleaning, normalization processing and format conversion, and the multiple test data in different formats are converted into target test data in a preset format.
[0046] For example, data cleaning and normalization ensure data format consistency by removing unnecessary metadata and redundant information. Format converters convert files of different formats into an internal unified representation that the framework can handle.
[0047] Step S203, fuzzy processing is performed on the target test data to determine a variant file containing a variety of variant data, so that the variant file is input into the target program to simulate various input scenarios;
[0048] Specifically, a large number of variant files are generated by modifying, deforming or randomizing the target test data. Fuzzy processing includes bit flipping, byte insertion / deletion, block replacement, structural destruction and other techniques. The generated variant files will be used to simulate various possible input scenarios to trigger exceptions or crashes in the target program.
[0049] Optionally, in some embodiments, the target test data is fuzzy processed to determine a variety of variant data, including:
[0050] According to the data format of the target test data, a matching fuzzy strategy is called to perform fuzzy processing, each type of the target test data is converted into a variant data, and each type of the variant data is aggregated to obtain a plurality of the variant data; wherein the fuzzy strategy includes at least one of a text data fuzzy generator, an HTTP protocol fuzzy generator, a binary fuzzy generator, a multimedia data fuzzy generator, and a custom fuzzy generator.
[0051] For example, the text data fuzzy generator is suitable for processing test data in text formats, such as JSON, XML, HTML, etc. It generates mutant text by modifying the text structure (such as adding / deleting tags, changing attributes), replacing characters (such as special characters, Unicode characters), changing encoding, etc.
[0052] For example, the HTTP protocol fuzzy generator is suitable for processing test data related to the HTTP protocol, such as HTTP requests, responses, etc., modifying the HTTP request method, URL, header information, request body, etc., or sending HTTP requests that do not comply with the specifications (such as overlong request lines, invalid request headers, etc.) to trigger the error handling logic in the target program.
[0053] For example, a binary fuzzy generator is suitable for processing test data in binary format, such as executable files, pictures, videos, etc. It modifies binary data by bit flipping, byte insertion / deletion, block replacement, etc. to destroy the integrity or structure of the data, thereby triggering exception handling in the target program.
[0054] For example, the multimedia data fuzzy generator is suitable for processing test data in multimedia formats such as audio and video, modifying the metadata, encoding parameters, frame structure, etc. of multimedia files to test the robustness of the target program when parsing these mutated multimedia files.
[0055] For example, a custom fuzzy generator is suitable for designing a custom fuzzy strategy for a specific type of data or a specific target program, and performing special deformation or processing on the data as needed to meet specific testing purposes.
[0056] Identify the data format. First, identify the data format of the target test data, for example, through file extensions, content features, etc. Call the fuzzy strategy and call the corresponding fuzzy generator according to the data format for fuzzy processing; if the data format is complex or contains multiple types of data, multiple fuzzy generators need to be used in combination; generate variant data and apply the fuzzy strategy to each target test data to generate corresponding variant data; each type of data will be converted into one or more variant data, and the variant data will be aggregated. All types of variant data will be aggregated to form a collection of multiple variant data. These variant data will be used in the subsequent testing process.
[0057] In this embodiment, different fuzzy strategies are called according to different types of data, which can more accurately simulate potential attack scenarios. Through the automated fuzzy processing process, a large amount of mutant data can be quickly generated to improve test efficiency. It supports custom fuzzy generators and can flexibly adjust fuzzy strategies as needed to meet specific testing requirements.
[0058] Step S204, monitoring the running status of the target program simulating various input scenarios in real time, and obtaining abnormal behavior and crash information of the mutated file;
[0059] Specifically, when the target program processes the mutated file, its running status is monitored in real time, including program output, system logs, memory usage, CPU occupancy, etc., and abnormal behaviors (such as error output, program stalling) and crash information (such as crash logs, stack traces) caused by the mutated file are recorded.
[0060] It should be understood that the CPU, memory and network usage of the terminal running the target program are monitored in real time to detect potential performance bottlenecks and resource exhaustion of the terminal; the log file of the target program processing the variant file is captured, and the abnormal behavior of the variant file is detected based on the log file, the performance bottleneck and the resource exhaustion, and the abnormal behavior includes the crash of the program, error response and data leakage; if the abnormal behavior is detected to include a program crash, it is recorded according to the crash stack, error code and crash time, and determined as crash information.
[0061] For example, through system monitoring tools (such as top and htop under Linux, Task Manager under Windows, etc.), real-time collection of CPU usage, core load and other data can be carried out to analyze the changing trend of CPU usage and identify whether there are abnormal CPU usage peaks, indicating performance bottlenecks or malicious behavior in the target program.
[0062] Monitor indicators such as memory usage, swap space usage, and memory leaks, analyze memory usage patterns, identify whether there is abnormal memory growth or frequent memory allocation / release, and whether there are performance bottlenecks or potential resource exhaustion.
[0063] Network usage, for example, monitoring network traffic, number of connections, data transfer rates, etc. Analyze unusual patterns in network activity, such as unexpectedly large amounts of data transfer, unusual network connection requests, etc., which indicate potential security or performance issues.
[0064] Log file capture: Configure the target program to generate detailed log files to record all key operations, error messages, and exceptions when processing mutated files. Use log collection tools (such as Logstash, Fluentd, etc.) to capture these log files in real time. Abnormal behavior detection: Analyze error messages, exception stack traces, etc. in log files to identify entries that do not match the expected behavior of the target program. Combined with performance bottlenecks and resource exhaustion, comprehensively determine whether the mutated file has caused abnormal behavior, such as program crashes, error responses (such as internal server errors), data leaks (such as sensitive information being recorded in logs), etc.
[0065] Crash information recording, once a program crash is detected, key information such as crash stack, error code, and crash time are immediately recorded. This information is crucial for subsequent problem diagnosis, reproduction, and repair. Use debugging tools (such as GDB, Visual Studio's debugger, etc.) to conduct in-depth analysis of the crash stack to determine the root cause of the crash. Analyze the error code to understand the state and context of the program at the time of the crash. Combined with the crash time, analyze whether the crash is related to a specific operation, resource usage pattern, or external event.
[0066] Reporting and response: The monitored performance bottlenecks, resource exhaustion, and abnormal behaviors (including crash information) are summarized into reports. Based on the report content, the risk level is assessed and corresponding response measures are formulated, such as optimizing code, increasing resources, fixing vulnerabilities, etc. The reports and response measures are fed back to the relevant teams or stakeholders to ensure that the problems are handled and resolved in a timely manner.
[0067] Through the above methods, comprehensive monitoring of the target program's running status and effective detection of abnormal behavior of mutated files can be achieved, providing strong support for improving program stability and security.
[0068] Step S205: Analyze the abnormal behavior and the crash information, identify vulnerabilities and generate a vulnerability report.
[0069] Specifically, based on the collected abnormal behavior and crash information, potential vulnerabilities are identified. The analysis includes comparing normal and abnormal behaviors, reproducing crash scenarios, verifying the exploitability of vulnerabilities, etc., and a vulnerability report is generated, recording in detail the vulnerability discovery process, impact scope, repair suggestions and other information.
[0070] Performing pattern matching on the abnormal behavior and the crash information to determine the vulnerability type, wherein the vulnerability type includes buffer overflow, SQL injection or cross-site scripting attack;
[0071] Performing back-tracing analysis on the crash stack in the crash information to locate the source of the vulnerability in the source code;
[0072] Using code auditing tools to audit the source code to find potential security vulnerabilities;
[0073] A vulnerability report is generated for the vulnerability type, the vulnerability source and the security vulnerability, wherein the vulnerability report includes a vulnerability description, an impact analysis and a repair suggestion.
[0074] In this embodiment, by collecting diverse test data, performing preprocessing and fuzzy processing, generating variant files and monitoring the running status of the target program, and finally identifying vulnerabilities by analyzing abnormal behaviors and crash information, an automated and efficient software testing method is particularly suitable for discovering hidden vulnerabilities that are difficult to discover through conventional testing methods.
[0075] Through the above method, firstly, by collecting test data, the test data is multi-source data, so that the target program can receive various test data, which is helpful to discover vulnerabilities that are sensitive to specific types of inputs; secondly, the test data is preprocessed and converted into target test data in a preset format, which improves the efficiency of automated testing and makes the testing process faster and more repeatable; thirdly, the target test data is fuzzy processed to determine a variant file containing a variety of variant data, so that the variant file is input into the target program to simulate various input scenarios, and a variety of fuzzy generation strategies are used to trigger abnormal paths and boundary conditions in the target program that are not easily covered by conventional tests, thereby enhancing the ability to detect potential vulnerabilities; finally, the running status of the target program simulating various input scenarios is monitored in real time to obtain abnormal behavior and crash information of the variant file; the abnormal behavior and the crash information are analyzed, the vulnerability is identified and a vulnerability report is generated, so that the tester can quickly locate the problem and quickly respond to and handle the potential vulnerability, thus not only reducing the burden of testing, but also improving the accuracy and efficiency of vulnerability identification.
[0076] See also Figure 3 , is a framework flow chart of a vulnerability scanning method in an embodiment of the present application, which is described in detail as follows:
[0077] Input module,The input module is responsible for receiving and parsing input data from multiple sources.,This module includes multiple data format parsers, which can process data in multiple formats, including but not limited to text (such as JSON, XML), binary files (such as EXE, DLL, SYS), images (such as JPEG, PNG), audio (such as MP3, WAV) and video (such as MP4, AVI).
[0078] Fuzzy generation module,The fuzzy generation module generates a variety of variant data based on the input data.
[0079] Execution module,The execution module inputs the generated mutation data into the target system or application.,This module injects data into the system through specific injection points (such as,interfaces, function calls, data flows) to simulate the real operating environment.
[0080] Monitoring module,The monitoring module monitors the running status of the target system and applications in real time, and captures the system's abnormal behavior, crash information and error logs. This module includes a logger, performance monitoring tools and anomaly detectors, which can comprehensively record the system operation.
[0081] Analysis module: The analysis module conducts in-depth analysis on the captured abnormal behaviors and error logs to identify and confirm vulnerabilities. This module uses technical means such as pattern matching, stack backtracking and code auditing to locate the source of vulnerabilities and provide detailed vulnerability reports.
[0082] Workflow
[0083] Data collection: Collect and extract test data from multiple sources (such as user input, network traffic, file system, etc.), ensuring coverage of different data formats and usage scenarios.
[0084] Data preprocessing, preprocess the collected data and convert it into a data format suitable for fuzz testing. The preprocessing steps include data cleaning, format conversion and normalization.
[0085] Fuzz testing fuzzifies the preprocessed data to generate a variety of variant data. These data are input into the target system or application to simulate various input scenarios.
[0086] Anomaly detection, real-time monitoring of the running status of the target system and application, capturing abnormal behavior and crash information. The monitoring module comprehensively records system responses through various means (such as logging, performance monitoring, and anomaly detection).
[0087] Vulnerability analysis: conduct in-depth analysis of captured abnormal behaviors and crash information, use a variety of technical means (such as pattern matching, stack backtracing, code auditing) to identify and confirm vulnerabilities, and generate detailed vulnerability reports.
[0088] Technical advantages
[0089] In this embodiment, by using multiple data formats, the framework can handle multiple types of data formats, ensuring that the test covers different types of input data, and improving the breadth and applicability of the test. Through deep fuzzy generation and the use of multiple fuzzy generation strategies, the detection capability of complex vulnerabilities is enhanced, and multiple attack scenarios can be simulated to fully cover the potential vulnerabilities of the system. By real-time monitoring of the operating status of the target system, abnormal behavior and crash information can be quickly captured and analyzed, which improves the timeliness and accuracy of vulnerability detection; due to support for automated testing processes, test data can be processed in batches, improving test efficiency; at the same time, the framework has good scalability and supports the expansion of new data formats and fuzzy generation strategies.
[0090] The text data fuzzy generator is used to replace, insert or delete characters in a JSON file or an XML file so as to mutate the structure of any file;
[0091] The multimedia data fuzzy generator is used to perform format mutation and content mutation on JPEG files and MP4 files, so as to change the frame rate or color depth of the video files;
[0092] The custom fuzzy generator is used to perform mutation processing on preset fields in preset files; the binary fuzzy generator is used to perform bit flipping on JPEG files and MP4 files, so that the binary bytes of any file are flipped to complete the bit flipping to generate new test cases, or to change the binary bytes of any file by byte insertion or byte deletion to generate new test cases, or to select format elements through the file format of JPEG files and MP4 files to perform mutation to generate new test cases;
[0093] The HTTP protocol fuzzy generator is used to perform fuzzy mutation on the request line, request header or request body of the HTTP protocol to generate a mutated HTTP protocol, wherein the fuzzy mutation includes at least one of character insertion, character deletion or character replacement.
[0094] For example, in some embodiments, the request line includes HTTP method variation, URL variation, HTTP version variation, and From-data variation for fuzzy variation; the request header includes header field name, header field value, header field insertion, and header field deletion for fuzzy variation; the request body fuzzy variation includes character replacement, character insertion, character deletion, and format variation for fuzzy variation.
[0095] In some embodiments, the method further includes: saving and backing up the test data; comparing the backed-up test data one by one according to the vulnerability report, determining and outputting the comparison results, and storing them persistently.
[0096] During the test process, save the test data to a safe storage location in a timely manner and back it up to prevent data loss or damage. According to the vulnerability type and trigger conditions described in the vulnerability report, compare the backed-up test data one by one to determine which data caused the vulnerability. For each potential trigger data, analyze its specific content, format and structure to confirm whether it can indeed cause the vulnerability. Record the comparison results, including the data sample that triggers the vulnerability, trigger conditions, vulnerability manifestations, etc.
[0097] Organize the comparison results into a format that is easy to understand and consult, and store them persistently in a reliable database or file system. Use tables, charts, or code snippets to clearly display the comparison results.
[0098] Select appropriate storage media and formats (such as databases, CSV files, Markdown documents, etc.) to persistently store the comparison results, ensure the security of the storage location, prevent unauthorized access or tampering, and use the persistently stored comparison results for subsequent vulnerability repair, test verification, and risk assessment.
[0099] After the vulnerability is fixed, the same test data and comparison scripts are used to verify the effectiveness of the fix. The comparison results are incorporated into the risk assessment process to evaluate the impact of the vulnerability on the overall security of the system and formulate corresponding security policies and measures.
[0100] Through the above methods, the integrity and traceability of test data can be ensured, while providing strong support for vulnerability repair and verification.
[0101] In other embodiments, a vulnerability scanning framework based on deep fuzz testing of multiple data formats is applied in a Web application. A Web application allows users to upload and process files in multiple formats (such as JSON, XML, JPEG, and MP4, etc.). In order to ensure the security of the Web application, a vulnerability scanning framework based on deep fuzz testing of multiple data formats is used to detect and discover potential vulnerabilities. The following is a detailed description of a specific implementation method:
[0102] 1. Data Collection Module
[0103] The data collection module collects test data from different sources:
[0104] For example, the file system scanner is used to scan uploaded files on the server and collect JSON, XML, JPEG and MP4 files.
[0105] For example, a network traffic capturer is used to capture the network traffic of files uploaded by users and extract the uploaded file data.
[0106] For example, the API is used to obtain sample file data by calling the API interface of the Web application.
[0107] 2. Data preprocessing module
[0108] The data preprocessing module cleans and normalizes the collected data and converts it into a data format suitable for fuzz testing:
[0109] For example, data cleaning and normalization are used to remove unnecessary metadata and redundant information and ensure data format consistency.
[0110] For example, format converters are used to convert files of different formats into an internal unified representation that the framework can handle.
[0111] 3. Fuzzy generation module
[0112] The fuzzy generation module generates multiple variant data based on the preprocessed data:
[0113] For example, the text data fuzzifier is used to perform character replacement, deletion, insertion, and structural mutations such as adding or deleting nodes for JSON and XML files.
[0114] For example, the HTTP protocol fuzzy generator, in which the request line contains the HTTP method, URL and HTTP version, the from-data data is mutated, and the fuzzy mutation is detailed as follows:
[0115] 1) Request line fuzzy mutation
[0116] The request line contains the HTTP method, URL, and HTTP version, and from-data data fuzzing mutation can be performed on these parts.
[0117] HTTP method variation:
[0118] Randomly choose an HTTP method to replace (for example, replace GET with POST, or use an illegal method name like FOO).
[0119] Example:
[0120] Original request line: GET / index.html HTTP / 1.1
[0121] After method mutation: POST / index.html HTTP / 1.1
[0122] Illegal method: FOO / index.html HTTP / 1.1
[0123] URL Variation:
[0124] Modify the URL path, insert or remove path segments, add query parameters or change the values of existing parameters.
[0125] Example:
[0126] Original request line: GET / index.html HTTP / 1.1
[0127] After URL mutation: GET / index.html?user=admin&password=1234HTTP / 1.1 Insert path segment: GET / foo / index.html HTTP / 1.1
[0128] HTTP version variation:
[0129] Modify the HTTP version and use an illegal version number or a random string.
[0130] Example:
[0131] Original request line: GET / index.html HTTP / 1.1
[0132] After version mutation: GET / index.html HTTP / 1.0
[0133] Illegal version: GET / index.html HTTP / 3.5
[0134] From-data variation:
[0135] Modify the value of filename in from-data, modify Content-Type, modify name, etc. Examples:
[0136] Original request line: filename="1.txt"
[0137] After version change: filename="1.jsp"
[0138] Original request line: name="file"
[0139] After version mutation: filename = "filedata"
[0140] 2) Request header fuzzy mutation
[0141] The request header contains multiple fields, each of which may vary.
[0142] Header field name variation:
[0143] Modify the header field name to use illegal characters or random strings.
[0144] Example:
[0145] Original header field: Content-Type: text / html
[0146] After the header field name changes: Content-Type: text / html
[0147] Illegal name: C0ntent-Type:text / html
[0148] Header field value variation:
[0149] Modify the value of the header field and insert illegal characters, overlong strings, or random data.
[0150] Example:
[0151] Original header field: Content-Length: 123
[0152] After the header field value changes: Content-Length:999999999
[0153] Illegal value: Content-Length:abc
[0154] Header field insertion and deletion:
[0155] Insert random header fields or remove critical header fields.
[0156] Example:
[0157] Original header field: User-Agent: Mozilla / 5.0
[0158] Insert header field: X-Custom-Header:fuzzing
[0159] Delete header fields: remove Content-Length3) Request body fuzzy variation
[0160] The request body is present in a POST or PUT request, and its contents can be mutated.
[0161] Character substitution, insertion, and deletion:
[0162] Replace, insert, and delete characters in the request body.
[0163] Example:
[0164] Original request body: username=admin&password=1234
[0165] Replace characters: username=admin&password=abcd
[0166] Insert characters: username=admin123&password=1234
[0167] Delete characters: username=admin&password=12
[0168] Format variations:
[0169] Modify the format of the request body. For example, convert the JSON-formatted request body to an illegal JSON or XML format.
[0170] Example:
[0171] Original request body (JSON): {"username":"admin","password":"1234"}
[0172] Illegal JSON: {"username":"admin","password":1234}
[0173] Convert to XML: <user> <name> admin< / name> <pass> 1234< / pass> < / user>
[0174] Binary fuzzy generator, used to perform bit flipping, byte insertion and deletion operations on JPEG and MP4 files. ① Bit Flipping
[0175] Bit flipping is to flip one or more bits of binary data to generate new test cases.
[0176] Specific implementation steps:
[0177] Randomly select one or more byte positions.
[0178] Flip one or more bits of the selected byte (0 to 1, 1 to 0).
[0179] Application scenarios:
[0180] Binary files: Flipping bits in critical locations will trigger unexpected behavior or crashes. For example, flipping bits in the header of an image file will cause the image to not decode correctly.
[0181] Network packets: Flip bits in transmitted packets to test the robustness of the receiver.
[0182] Example:
[0183] Original data: 10110011
[0184] After bit flipping: 10111011
[0185] ②Byte Insertion
[0186] Byte insertion is to insert one or more new bytes at a certain position in the data to generate new test cases.
[0187] Specific implementation steps:
[0188] Randomly select a location in the data.
[0189] Insert one or more random bytes at that position.
[0190] Application scenarios:
[0191] Text file: Insert random characters or strings at a certain position in the JSON or XML file to test the parser's processing capabilities.
[0192] Binary Files: Insert random bytes into image files to test the fault tolerance of image processing software.
[0193] Example:
[0194] Original data: HelloWorld
[0195] After byte insertion: HelloXWorld
[0196] ③Byte Deletion
[0197] Byte deletion is to delete one or more bytes from a certain position of the data to generate new test cases.
[0198] Specific implementation steps: Randomly select a position in the data and delete one or more bytes at that position.
[0199] Application scenarios:
[0200] Text file: Delete a key character or string from a JSON or XML file to test the parser's error tolerance.
[0201] Binary Files: Removes bytes from an image file, testing image processing software's ability to handle corrupted files.
[0202] Example:
[0203] Original data: HelloWorld
[0204] After Byte Delete: HeloWorld
[0205] ④Format Mutation
[0206] Format mutation is to mutate a specific file format to generate new test cases. Format mutation includes modifying the file structure, format specifications, etc.
[0207] Specific implementation steps: According to the specifications of the file format, randomly select the format part to mutate, and modify the structure or format elements of the file, such as tags, header information, etc.
[0208] Application scenarios:
[0209] JSON file: modify the key name and value type of the object, and add or delete nested objects.
[0210] XML file: modify tag names, attribute values, and add or delete tags.
[0211] JPEG file: Modify image header information, such as resolution and color depth.
[0212] MP4 files: Modify video metadata, such as frame rate and encoding type.
[0213] Example:
[0214] JSON file: Original data: {"name":"John","age":30}, after format change: {"name":"John","age":"thirty"}
[0215] XML file:
[0216] Raw data: <person> <name> John< / name> <age> 30< / age> < / person> , after the format change: <person> <fullname> John< / fullname> <age> 30< / age> < / person>
[0217] JPEG files:
[0218] Original header information: FFD8FFE000104A46494600010101006000600000FFDB004300..., after format mutation: FFD8FFE000104A46494600010101008000800000FFDB004300...
[0219] MP4 Files:
[0220] Original metadata: ...moov...mvhd...000001E0...
[0221] After the format change:...moov...mvhd...000003E0...
[0222] In addition, a multimedia data fuzzer generator is used to perform format mutation and content mutation on JPEG and MP4 files, such as changing the color depth of images or modifying the frame rate of videos.
[0223] Custom fuzzy strategies are used to define mutation strategies for specific data formats based on specific requirements.
[0224] Binary hard-coded analysis
[0225] Through efficient binary hard-coding analysis technology, it automatically parses the binary file structure, intelligently identifies and extracts hard-coded data such as keys, passwords, URLs, etc., and improves the accuracy and efficiency of security analysis.
[0226] For example, file parsing can extract key data segments by parsing the structure of binary files.
[0227] For example, pattern recognition, identifying hard-coded data such as keys, passwords, URLs, etc. through pattern matching or regular expressions.
[0228] For example, data validation verifies that the extracted data conforms to the expected format and checks for anomalies or potential vulnerabilities.
[0229] Application Scenario
[0230] For example, security analysis can be used to find hard-coded keys, passwords and other sensitive information in binary files and assess security risks.
[0231] For example, functional testing verifies that hard-coded parameters in the binary are correct and detects potential functional defects.
[0232] For example, reverse engineering is analyzing hard-coded data to understand how software works and discover potential backdoors or malicious code.
[0233] Example, Hardcoded Keys, Find hardcoded encryption keys in binaries.
[0234] Original data, ...A1B2C3D4E5F6...
[0235] Identification result, key A1B2C3D4E5F6
[0236] Hardcoded URLs. Hardcoded server URLs are found in the binary.
[0237] Original data, ...123456...
[0238] Recognition result: PASSWORD 123456
[0239] Assembly binary analysis
[0240] Assembly binary analysis tool that combines intelligent disassembly technology and pattern recognition algorithms to accurately analyze and annotate assembly code, identifying potential vulnerabilities and hard-coded data.
[0241] Disassembly: Use smart disassembly tools to convert binary files into assembly code.
[0242] Parse the disassembly results to understand the execution order and data flow of instructions.
[0243] Pattern Recognition
[0244] Leverage advanced pattern matching and regular expressions to identify specific assembly instruction sequences, such as cryptographic functions, API calls, etc. Check the code for hard-coded data, such as constants, strings, etc.
[0245] Code Annotation: Add detailed comments to key assembly instructions to explain their functions and effects. Record the location and purpose of hard-coded data to facilitate subsequent analysis and repair.
[0246] Application Scenario
[0247] Vulnerability analysis, through disassembly analysis, discover potential vulnerabilities in binary files, such as buffer overflow, uninitialized memory access, etc.
[0248] Reverse engineering, understanding how binary files work, reverse analyzing their functional implementation, and finding hidden features or malicious code.
[0249] Optimization and debugging: Optimize program performance and fix low-level errors and defects through assembly code analysis.
[0250] Example, disassembled code snippet:
[0251] Raw binary: 0xB8 0x01 0x00 0x00 0x00 0xCD 0x80
[0252] Disassembly result:
[0253] Arduino
[0254] mov eax,1
[0255] int 0x80
[0256] This code executes a system call to terminate the current process.
[0257] Hard-coded data identification
[0258] Raw binary, ... 68 74 74 70 3A 2F 2F 65 78 61 6D 70 6C 65 2E 63 6F6D...
[0259] Disassembly result:
[0260] push 0x6d6f632e; "moc."
[0261] push 0x65706d61; "exam"
[0262] push 0x2f2f3a70;": / / p"
[0263] push 0x68747470; "http"
[0264] 4. Execution module
[0265] The Web data injection engine sends the mutated data to the server through the interface of the Web application.
[0266] Automatically send the mutated data to the server via HTTP requests or other protocols (such as WebSocket, GRPC, etc.) to ensure that all interfaces and parameters are fully tested.
[0267] The binary injection engine injects the mutated data into the binary file through the execution module and outputs the result.
[0268] Parse binary files and extract key parts such as file header, data segment, code segment, etc.
[0269] Building the injection engine
[0270] Data modification is used to mutate the parsed binary data and regenerate the binary file.
[0271] An automated script is used to implement binary file parsing, mutation, injection, and result output, injecting the mutated data into the corresponding position of the binary file to ensure that the file structure and format remain valid.
[0272] Environmental simulators are used to simulate different user environments and operating systems to ensure comprehensiveness and realism of the tests.
[0273] 5. Monitoring module
[0274] The monitoring module monitors the running status of the Web application in real time and captures abnormal behavior and crash information:
[0275] Logger: records log information when a Web application processes files, including processing time, file type, and exception logs.
[0276] Performance Monitor: Monitors server CPU, memory, and network usage to detect potential performance bottlenecks and resource exhaustion.
[0277] Anomaly detector: Captures abnormal behaviors of web applications when processing mutated files, such as crashes, error responses, and data leakage.
[0278] Crash Capture: records the crash information of the Web application when processing the mutated file, such as the crash stack, error code, and triggering conditions;
[0279] Application Monitor: Output samples to sample test results through the application monitor and display them on the Web front end.
[0280] 6. Analysis module
[0281] The analysis module conducts in-depth analysis of captured abnormal behaviors and crash information to identify and confirm vulnerabilities:
[0282] Pattern matching engine: Performs pattern matching on exception logs and crash information to identify common vulnerability types, such as buffer overflow, SQL injection, and cross-site scripting attacks.
[0283] Stack backtrace analysis: Perform backtrace analysis on the crash stack to locate the source of the vulnerability in the code.
[0284] Code auditing tool: Audit the source code of web applications to find potential security vulnerabilities.
[0285] Vulnerability report generation: Generate detailed vulnerability reports, including vulnerability description, impact analysis, and repair suggestions.
[0286] 7. Availability detection module
[0287] The availability detection module analyzes and records sample data, identifies and confirms sample availability:
[0288] File format check:
[0289] Check the binary file's header and metadata to ensure that the file is still in the correct format.
[0290] Parse the file header information (such as the DOS Header and PE Header of the PE file, the ELF Header of the ELF file) and verify it.
[0291] Checksum verification:
[0292] Calculate the checksum (such as CRC32, MD5) of the file and compare it with the original file to determine the file integrity.
[0293] Verify the signature information of the file (such as a digital signature) to ensure that the file has not been maliciously tampered with.
[0294] Structural Integrity Check:
[0295] Check the file's segment table, section table, and directory table to make sure the offsets and sizes of the various pieces of data are still correct.
[0296] Verify the data structure integrity of code segments, data segments, and other critical segments.
[0297] Load and execute the test:
[0298] Try to load the mutated binary file to confirm whether it can be loaded into memory correctly.
[0299] Perform basic functional testing to ensure that mutated data does not cause immediate file corruption or anomalies.
[0300] Error and exception catching:
[0301] During the loading and execution process, any error messages and exception logs are captured and recorded.
[0302] Use debugging tools (such as gdb, WinDbg) to track the execution flow of the file and capture potential errors and exceptions.
[0303] Recording and analysis:
[0304] Record the availability test results of each variant sample, including successful loading, execution status, errors, and exception information.
[0305] Analyze test results and generate reports indicating unusable samples and reasons.
[0306] 8. Abnormal resend module
[0307] The exception module analyzes and records sample data anomalies, identifies and confirms them, and resends the samples:
[0308] Resend sample:
[0309] For each sample where an anomaly was detected, the automated script sent the sample again to confirm whether the anomaly was reproducible.
[0310] Record the results of the resent samples and compare them with the abnormal information during the initial sending to see if they are consistent.
[0311] Exception Records and Reports:
[0312] All exceptions and resend results are recorded in a database or log file, and detailed exception reports are generated.
[0313] Including information such as the type of exception, number of times, whether it can be reproduced, and number of times it is reproduced.
[0314] Result analysis and improvement:
[0315] Analyze exception reports to identify recurring anomaly patterns and potential system vulnerabilities.
[0316] Based on the analysis results, improve mutation and injection strategies to increase test effectiveness and coverage.
[0317] 2) Comparison of implementation results data
[0318] See Figure 7 It is a test data and result diagram in a vulnerability scanning method in an embodiment of the present application; by adopting the vulnerability scanning method of the present application relative to the AFL testing method, wherein the test environment: Web application function (supports uploading and processing JSON, XML, JPEG and MP4 files), the test duration is 24 hours, and the test tool (the vulnerability scanning method or system of the present application vs. the traditional fuzz testing tool (AFL));
[0319] It should be noted that AFL is a widely used fuzz testing tool that uses intelligent fuzz testing technology to discover vulnerabilities by mutating seed inputs. The main features of AFL are its efficient mutation strategy and coverage-guided fuzz testing method. Although AFL performs well in discovering many software vulnerabilities, it mainly targets text and binary data formats and has weak support for multimedia data formats.
[0320] Please refer to the interface views involved in the above embodiments. Figure 4 , is a GUI interface view (left side view) in a vulnerability scanning method in an embodiment of the present application; please refer to Figure 5 , is an interface view (left side view) of a binary fuzzy test in a vulnerability scanning method in an embodiment of the present application; wherein, Figure 6 In the embodiment of this application Figure 4 and Figure 5 Another part of the interface view (i.e. the right side view) of the interface, Figure 8 This is a partial interface view of a binary fuzz test in an embodiment of the present application.
[0321] It is concluded that this application has the following advantages compared to the AFL testing method:
[0322] Total number of test cases,The number of test cases generated by the vulnerability scanning framework of this application is large, and the coverage is wider;
[0323] Number of captured crashes,The number of crashes captured by our framework on all file types is higher than that of AFL,,which indicates that it is more effective in detecting crash vulnerabilities;
[0324] The number of anomalies captured,The number of anomalies captured by this application framework on all file types is higher than that of AFL,,which indicates that its anomaly detection capability is stronger;
[0325] Number of vulnerabilities found,The number of vulnerabilities found by this application framework on all file types is higher,than that of AFL, proving that it has higher vulnerability detection capability in,deep fuzz testing of multiple data formats.
[0326] See also Fig. 9 , is an architectural design diagram of a vulnerability scanning system in an embodiment of the present application, which is described in detail as follows:
[0327] The user interface module provides a command line interface and a graphical user interface through which users interact with the vulnerability scanning framework.
[0328] The data collection module is responsible for collecting test data from different sources (such as file systems, network traffic, APIs, etc.).
[0329] The data preprocessing module cleans and normalizes the collected data and converts it into a data format suitable for fuzz testing.
[0330] The fuzzy generation module generates various variant data based on the preprocessed data, including text, binary, multimedia data fuzzy generators and custom fuzzy strategies.
[0331] The execution module inputs the mutated data into the target system or application, simulating the real operating environment through the data injection engine and the environment simulator.
[0332] The monitoring module monitors the operating status of the target system in real time and captures abnormal behavior and crash information, including logging, performance monitoring, anomaly detection, and crash capture.
[0333] The analysis module conducts in-depth analysis of the captured abnormal behaviors and crash information, and uses technical means such as pattern matching, stack backtracing, and code auditing to generate detailed vulnerability reports.
[0334] See also Fig.10 , is a schematic diagram of the structure of a vulnerability scanning system in an embodiment of the present application, including:
[0335] The data collection module 1001 is used to collect test data, where the test data is multi-source data, and the multi-source data includes at least one of text, binary, image, audio and video;
[0336] A preprocessing module 1002 is used to preprocess the test data and convert it into target test data in a preset format, where the preset format is a format that satisfies fuzzy processing;
[0337] A fuzzy processing module 1003 is used to perform fuzzy processing on the target test data and determine a variant file containing multiple variant data, so that the variant file is input into the target program to simulate various input scenarios;
[0338] The abnormality detection module 1004 is used to monitor the running status of the target program simulating various input scenarios in real time and obtain abnormal behavior and crash information of the mutated file;
[0339] The vulnerability analysis module 1005 is used to analyze the abnormal behavior and the crash information, identify vulnerabilities and generate a vulnerability report.
[0340] It should be noted that the vulnerability scanning method of the present application corresponds one-to-one to the vulnerability scanning system, and the corresponding technical details and technical solutions refer to the above-mentioned vulnerability scanning system, which will not be repeated here.
[0341] Through the above method, firstly, by collecting test data, the test data is multi-source data, so that the target program can receive various test data, which is helpful to discover vulnerabilities that are sensitive to specific types of inputs; secondly, the test data is preprocessed and converted into target test data in a preset format, which improves the efficiency of automated testing and makes the testing process faster and more repeatable; thirdly, the target test data is fuzzy processed to determine a variant file containing a variety of variant data, so that the variant file is input into the target program to simulate various input scenarios, and a variety of fuzzy generation strategies are used to trigger abnormal paths and boundary conditions in the target program that are not easily covered by conventional tests, thereby enhancing the ability to detect potential vulnerabilities; finally, the running status of the target program simulating various input scenarios is monitored in real time to obtain abnormal behavior and crash information of the variant file; the abnormal behavior and the crash information are analyzed, the vulnerability is identified and a vulnerability report is generated, so that the tester can quickly locate the problem and quickly respond to and handle the potential vulnerability, thus not only reducing the burden of testing, but also improving the accuracy and efficiency of vulnerability identification.
[0342] In other embodiments, the present disclosure also provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.
[0343] Fig.11 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.11 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0344] like Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103, such as executing the method in the above embodiment. In the random access memory 1103, various programs and data required for system operation are also stored. The central processing unit 1101, the read-only memory 1102 and the random access memory 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0345] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. The drive 910 is also connected to the input / output interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0346] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, various functions defined in the system of the present application are executed.
[0347] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0348] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0349] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0350] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the method, system and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A vulnerability scanning method, characterized in that: include: Collecting test data, wherein the test data is multi-source data, and the multi-source data includes at least one of text, binary, image, audio, and video; Preprocessing the test data to convert it into target test data in a preset format, where the preset format is a format that satisfies fuzzy processing; Performing fuzzy processing on the target test data to determine a variant file containing a variety of variant data, so that the variant file is input into the target program to simulate various input scenarios; Real-time monitoring of the running status of the target program simulating various input scenarios to obtain abnormal behavior and crash information of the mutated file; The abnormal behavior and the crash information are analyzed to identify vulnerabilities and generate a vulnerability report.
2. The method according to claim 1, characterized in that The target test data is fuzzy processed to determine a variety of variant data, including: According to the data format of the target test data, a matching fuzzy strategy is called to perform fuzzy processing, each type of the target test data is converted into a variant data, and each type of the variant data is aggregated to obtain a plurality of the variant data; wherein the fuzzy strategy includes at least one of a text data fuzzy generator, an HTTP protocol fuzzy generator, a binary fuzzy generator, a multimedia data fuzzy generator, and a custom fuzzy generator.
3. The method according to claim 2, characterized in that The text data fuzzy generator is used to replace, insert or delete characters in a JSON file or an XML file so as to mutate the structure of any file; The multimedia data fuzzy generator is used to perform format mutation and content mutation on JPEG files and MP4 files, so as to change the frame rate or color depth of the video files; The custom fuzzy generator is used to perform mutation processing on the preset fields in the preset file; The binary fuzzy generator is used to perform bit flipping on JPEG files and MP4 files, so that the binary bytes of any file are flipped to complete the bit flipping and generate new test cases, or to change the binary bytes of any file by byte insertion or byte deletion to generate new test cases, or to select format elements through the file format of JPEG files and MP4 files to mutate and generate new test cases; The HTTP protocol fuzzy generator is used to perform fuzzy mutation on the request line, request header or request body of the HTTP protocol to generate a mutated HTTP protocol, wherein the fuzzy mutation includes at least one of character insertion, character deletion or character replacement.
4. The method according to claim 3, characterized in that The request line includes HTTP method variation, URL variation, HTTP version variation, and From-data variation for fuzzy variation; the request header includes header field name, header field value, header field insertion, and header field deletion for fuzzy variation; the request body fuzzy variation includes character replacement, character insertion, character deletion, and format variation for fuzzy variation.
5. The method according to claim 1, characterized in that Real-time monitoring of the target program's running status simulating various input scenarios to obtain abnormal behavior and crash information of the mutated data, including: Real-time monitoring of the CPU, memory and network usage of the terminal running the target program, and detection of potential performance bottlenecks and resource exhaustion of the terminal; Capturing a log file of the target program processing the mutated file, and detecting abnormal behavior of the mutated file according to the log file, the performance bottleneck, and the resource exhaustion, wherein the abnormal behavior includes a crash, an error response, and data leakage of the program; If it is detected that the abnormal behavior includes a program crash, the crash stack, error code and crash time are recorded and determined as crash information.
6. The method according to claim 5, characterized in that Analyze the abnormal behavior and the crash information, identify vulnerabilities and generate vulnerability reports, including: Performing pattern matching on the abnormal behavior and the crash information to determine the vulnerability type, wherein the vulnerability type includes buffer overflow, SQL injection or cross-site scripting attack; Performing back-tracing analysis on the crash stack in the crash information to locate the source of the vulnerability in the source code; Using code auditing tools to audit the source code to find potential security vulnerabilities; A vulnerability report is generated for the vulnerability type, the vulnerability source and the security vulnerability, wherein the vulnerability report includes a vulnerability description, an impact analysis and a repair suggestion.
7. The method according to claim 6, characterized in that Also includes: The test data is saved and backed up; the backed up test data is compared one by one according to the vulnerability report, the comparison results are determined and output, and are persistently stored.
8. The method according to claim 1, characterized in that Preprocessing the test data to convert it into target test data in a preset format includes: The test data is preprocessed, and the preprocessing includes data cleaning, normalization processing and format conversion, and the multiple test data in different formats are converted into target test data in a preset format.
9. A vulnerability scanning system, characterized in that: include: A data collection module, used to collect test data, wherein the test data is multi-source data, and the multi-source data includes at least one of text, binary, image, audio and video; A preprocessing module, used to preprocess the test data and convert it into target test data in a preset format, where the preset format is a format that satisfies fuzzy processing; A fuzzy processing module, used for performing fuzzy processing on the target test data, determining a variant file containing a variety of variant data, so that the variant file is input into the target program to simulate various input scenarios; An anomaly detection module, used to monitor the running status of the target program in real time to simulate various input scenarios and obtain abnormal behavior and crash information of the mutated file; The vulnerability analysis module is used to analyze the abnormal behavior and the crash information, identify vulnerabilities and generate a vulnerability report.
10. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 8.
Citation Information
Cited By
Network protocol fuzz testing method and device, storage medium and electronic equipment
CN119743417A
Data processing method, device and equipment
CN119848874A
A data processing method, apparatus and equipment
CN119848874B
Parasitic parameter result automatic analysis system based on FUZZ test
CN121072435A
Parasitic parameter result automatic analysis system based on FUZZ test
CN121072435B
