Monitor control method and device, terminal equipment and storage medium

By combining state machines and monitor control functions, the timing of monitor control is determined and corresponding actions are executed, solving the problem of inflexible monitor control in fuzzy testing and achieving both flexibility and accuracy in monitoring.

CN115563009BActive Publication Date: 2026-06-19SECZONE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SECZONE TECH CO LTD
Filing Date
2022-10-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing fuzzing products, the monitor cannot be flexibly controlled, resulting in limited ability to capture monitoring anomalies and making it impossible to effectively monitor the tested object during mutation iteration.

Method used

By using a state machine and preset monitor control functions, the current control timing indicator is determined, and corresponding control actions are executed according to the indicator, thus flexibly controlling the start and stop of the monitor.

🎯Benefits of technology

It enables flexible control of the monitor during fuzz testing, avoiding missed or ineffective monitoring and improving the accuracy of anomaly detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563009B_ABST
    Figure CN115563009B_ABST
Patent Text Reader

Abstract

This invention discloses a monitor control method, apparatus, terminal device, and storage medium. Belonging to the field of fuzzy testing technology, the monitor control method includes: determining a current control timing identifier through a state machine; determining a control action corresponding to the current control timing identifier through a preset monitor control function; and controlling the monitor to monitor the object under test through the control action. This application achieves the goal of flexibly controlling the monitor in fuzzy testing by determining the control action corresponding to the current control timing identifier through a preset monitor control function, thereby implementing a corresponding monitoring strategy based on the current control timing identifier. This avoids missed or ineffective monitoring by the monitor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fuzz testing, and more particularly to monitor control methods, apparatus, terminal devices, and storage media. Background Technology

[0002] Existing fuzzing products typically consist of resources, mutants, packet senders, and monitors. Monitors are used to monitor the object under test (DUT), classify and report anomalies, and monitor for vulnerabilities in the fuzzing process. However, most fuzzing products only allow monitors to be activated before mutation iterations and deactivated afterward, or activated at fixed times. If the DUT receives mutation packets at a different time than the monitor monitors it, the DUT cannot be monitored, impacting the monitor's ability to capture anomalies.

[0003] Therefore, how to flexibly control the monitor during fuzz testing is an urgent problem to be solved. Summary of the Invention

[0004] The main purpose of this application is to provide a monitor control method, device, terminal equipment and storage medium, which aims to solve the problem of how to flexibly control the monitor in fuzz testing.

[0005] To achieve the above objectives, this application provides a monitor control method applied to a fuzz testing framework, the fuzz testing framework including a state machine and a monitor, and the monitor control method comprising the following steps:

[0006] The current control timing identifier is determined through the state machine;

[0007] The control action corresponding to the current control timing identifier is determined by a preset monitor control function;

[0008] The control action controls the monitor to monitor the object under test.

[0009] Optionally, the step of determining the current control timing identifier through the state machine includes:

[0010] If the state machine has a state to be updated, then the state to be updated is matched with the state of the state machine.

[0011] If the match is successful, the state number of the state to be updated is determined as the current control timing identifier based on the preset state machine state and the corresponding state number.

[0012] If the state machine does not have a state to be updated, the current control timing identifier is determined according to the preset progress value.

[0013] Optionally, the step of determining the control action corresponding to the current control timing identifier through a preset monitor control function includes:

[0014] The current control timing identifier is passed as a parameter to the preset monitor control function for matching with the preset monitor control timing identifier;

[0015] If a match is successful, the control action corresponding to the current control timing identifier is determined based on the preset monitor control timing identifier and the corresponding control action.

[0016] Optionally, the step of determining the current control timing identifier through the state machine further includes:

[0017] Configure the state machine's state and corresponding state number according to the object under test.

[0018] Optionally, the step of determining the current control timing identifier through the state machine further includes:

[0019] The timing identifier for controlling the monitor and the corresponding control action are configured according to the object under test.

[0020] Optionally, the monitor control timing identifier includes the status number of test start, test end, iteration start, iteration end, and pending update status.

[0021] Optionally, the control actions include configuring monitor-related parameters, starting the monitor, and stopping the monitor.

[0022] This application also proposes a monitor control device, which includes:

[0023] The acquisition module is used to determine the current control timing identifier through a state machine;

[0024] The matching module is used to determine the control action corresponding to the current control timing identifier through a preset monitor control function;

[0025] The execution module is used to control the monitor to monitor the object under test through the control actions.

[0026] This application also proposes a terminal device, which includes a memory, a processor, and a monitor control program stored in the memory and running on the processor. When the monitor control program is executed by the processor, it implements the steps of the monitor control method.

[0027] This application also proposes a storage medium storing a monitor control program, which, when executed by a processor, implements the steps of the monitor control method.

[0028] This application proposes a monitor control method, apparatus, terminal device, and storage medium. The current control timing identifier is determined through a state machine; the corresponding control action is determined through a preset monitor control function; and the monitor is controlled to monitor the object under test through the control action. Based on this application, the control action corresponding to the current control timing identifier is determined through a preset monitor control function, thereby implementing a corresponding monitoring strategy based on the current control timing identifier. This achieves the goal of flexibly controlling the monitor in fuzzy testing and avoids missed or ineffective monitoring. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the functional modules of the terminal equipment to which the monitor control device belongs in this application;

[0030] Figure 2 This is a flowchart illustrating a first exemplary embodiment of the monitor control method of this application;

[0031] Figure 3 This is a flowchart illustrating a second exemplary embodiment of the monitor control method of this application;

[0032] Figure 4 This is a flowchart illustrating a third exemplary embodiment of the monitor control method of this application;

[0033] Figure 5 This is a flowchart illustrating a fourth exemplary embodiment of the monitor control method of this application;

[0034] Figure 6 This is a flowchart illustrating a fifth exemplary embodiment of the monitor control method of this application.

[0035] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0036] It should be understood that the specific implementation examples described herein are merely for illustrative purposes and are not intended to limit the scope of this application.

[0037] The main solution of this application embodiment is to determine the current control timing identifier through the state machine; determine the control action corresponding to the current control timing identifier through a preset monitor control function; and control the monitor to monitor the object under test through the control action. Based on this solution, the control action corresponding to the current control timing identifier is determined through a preset monitor control function, thereby implementing the corresponding monitoring strategy according to the current control timing identifier. This achieves the goal of flexibly controlling the monitor in fuzzy testing and avoids the monitor missing reports or ineffective monitoring.

[0038] Specifically, refer to Figure 1 , Figure 1 This is a functional module diagram of the terminal device to which the monitor control device belongs in this application. The monitor control device is a device based on the terminal device that can control the monitor by configuring the monitor control timing identifier and the corresponding control action, thereby achieving the purpose of flexibly controlling the monitor in fuzzy testing. It can be carried on the terminal device in the form of hardware or software.

[0039] In this embodiment, the terminal device to which the monitor control device belongs includes at least an output module 110, a processor 120, a memory 130, and a communication module 140.

[0040] The memory 130 stores the operating system and monitor control program. The monitor control device can determine the current control timing identifier through a state machine; determine the control action corresponding to the current control timing identifier through a preset monitor control function; and store information such as the monitor monitoring the object under test in the memory 130. The output module 110 can be a display screen, etc. The communication module 140 can include a WIFI module, a mobile communication module, and a Bluetooth module, etc., and communicates with external devices or servers through the communication module 140.

[0041] The monitor control program in memory 130 is applied to a fuzz testing framework, which includes a state machine and a monitor. When the monitor control program is executed by the processor, it performs the following steps:

[0042] The current control timing identifier is determined through the state machine;

[0043] The control action corresponding to the current control timing identifier is determined by a preset monitor control function;

[0044] The control action controls the monitor to monitor the object under test.

[0045] Furthermore, when the monitor control program in memory 130 is executed by the processor, it also performs the following steps:

[0046] If the state machine has a state to be updated, then the state to be updated is matched with the state of the state machine.

[0047] If the match is successful, the state number of the state to be updated is determined as the current control timing identifier based on the preset state machine state and the corresponding state number.

[0048] If the state machine does not have a state to be updated, the current control timing identifier is determined according to the preset progress value.

[0049] Furthermore, when the monitor control program in memory 130 is executed by the processor, it also performs the following steps:

[0050] The current control timing identifier is passed as a parameter to the preset monitor control function for matching with the preset monitor control timing identifier;

[0051] If a match is successful, the control action corresponding to the current control timing identifier is determined based on the preset monitor control timing identifier and the corresponding control action.

[0052] Furthermore, when the monitor control program in memory 130 is executed by the processor, it also performs the following steps:

[0053] Configure the state machine's state and corresponding state number according to the object under test.

[0054] Furthermore, when the monitor control program in memory 130 is executed by the processor, it also performs the following steps:

[0055] The monitor control timing identifier and corresponding control action are configured according to the object under test. The monitor control timing identifier includes the status number of test start, test end, iteration start, iteration end, and pending update status. The control action includes configuring monitor-related parameters, starting the monitor, and stopping the monitor.

[0056] Based on, but not limited to, the terminal device architecture described above, this application proposes method embodiments.

[0057] Reference Figure 2 , Figure 2 This is a flowchart illustrating a first exemplary embodiment of the monitor control method. Applied to a fuzzing framework, the fuzzing framework includes a monitor and a state machine. The monitor control method includes the following steps:

[0058] Step S110: Determine the current control timing identifier through the state machine;

[0059] Specifically, the fuzzing framework can be used to monitor vulnerabilities in test objects such as files or network protocols. The monitor control timing identifiers include StatusTestBegin (test start), StatusTestEnd (test end), StatusIterationBegin (item start), StatusIterationEnd (item end), and StatusXXX (status number of the pending update state). These will be referred to in Chinese as "Test Start," "Test End," "Iteration Start," "Iteration End," and "Pending Update State Number." If the state machine has a pending update state, the current control timing identifier is determined to be the status number of that pending update state. If the state machine does not have a pending update state, the current control timing identifier is determined based on a preset progress value. This preset progress value is obtained by the programmer through acquiring and judging other relevant information, and can be changed according to actual circumstances; it is not set here.

[0060] Step S130: Determine the control action corresponding to the current control timing identifier through a preset monitor control function;

[0061] Specifically, before this step, the state machine's state needs to be configured. The state machine's state is related to the object under test. When the object under test is a protocol, the corresponding state machine state is configured according to the protocol's interaction process. Taking the SSH protocol as an example, the SSH protocol consists of three parts: connection, user authentication, and transmission. The connection protocol exchanges version numbers between the two parties at the beginning. Further, after sending the version number, the SSH protocol sends an algorithm negotiation message, where the version interaction message is identification and the algorithm negotiation message is KEX-exchange. Therefore, the two state numbers of the state machine are ID and KEX. After configuring the state and the corresponding state number, the current control timing identifier is passed as a parameter to the preset monitor control function and matched with the preset monitor control timing identifier. If the match is successful, the control action corresponding to the current control timing identifier is determined according to the preset monitor control timing identifier and the corresponding control action. The control actions include starting the monitor (StartMonitor), configuring monitor-related parameters (ConfigMonitor), and stopping the monitor (StopMonitor). The following descriptions will use the corresponding Chinese characters for "Start Monitor," "Configure Monitor-related Parameters," and "Stop Monitor."

[0062] Step S150: Control the monitor to monitor the object under test through the control action.

[0063] Specifically, the control actions include, but are not limited to, configuring monitor-related parameters, starting the monitor, and stopping the monitor. After the control actions to be executed are determined through step S130, the monitor monitors the object under test by calling the implementation module corresponding to the control actions.

[0064] This embodiment, through the above-described scheme, specifically determines the current control timing identifier through the state machine; determines the control action corresponding to the current control timing identifier through a preset monitor control function; and controls the monitor to monitor the object under test through the control action. Based on this scheme, by configuring the monitor control timing identifier and the corresponding control action, a corresponding monitoring strategy is implemented according to the current control timing identifier, achieving the goal of flexibly controlling the monitor in fuzzy testing and avoiding the effect of missed reports or ineffective monitoring by the monitor.

[0065] Furthermore, referring to Figure 3 , Figure 3 This is a flowchart illustrating a second exemplary embodiment of the monitor control method. The step of determining the current control timing identifier through the state machine further includes:

[0066] Step S1100: If the state machine has a state to be updated, then match the state to be updated with the state of the state machine.

[0067] Specifically, the state to be updated in the state machine is obtained by parsing the message of the object under test or by other means, and the state of the state machine is pre-configured.

[0068] Step S1101: If the matching is successful, the state number of the state to be updated is determined as the current control timing identifier based on the preset state machine state and the corresponding state number.

[0069] Step S1102: If the state machine does not have a state to be updated, then the current control timing identifier is determined according to the preset progress value.

[0070] Specifically, the preset progress value is obtained by the programmer through obtaining other relevant information and making judgments, and can be changed according to the actual situation. It is not set here. The current control timing identifier is determined to be any one of test start, test end, iteration start, and iteration end.

[0071] This embodiment, through the above-described scheme, specifically involves matching the state to be updated with the state of the state machine if the state machine has a state to be updated; if the match is successful, the state number of the state to be updated is determined as the current control timing identifier based on the preset state machine state and its corresponding state number; if the state machine does not have a state to be updated, the current control timing identifier is determined based on a preset progress value. Based on this scheme, by passing the current control timing identifier to a preset monitor control function to call the corresponding control action, the monitor is controlled to monitor the target, achieving the goal of flexibly controlling the monitor's actions through the control actions corresponding to the pre-registered control timing identifier, thus avoiding missed or ineffective monitoring by the monitor.

[0072] Furthermore, referring to Figure 4 , Figure 4 This is a flowchart illustrating a third exemplary embodiment of the monitor control method. The step of determining the control action corresponding to the current control timing identifier through a preset monitor control function includes:

[0073] Step S1301: Pass the current control timing identifier as a parameter into the preset monitor control function and match it with the preset monitor control timing identifier;

[0074] Specifically, the preset monitor control function mainly determines the control action corresponding to the current control timing identifier by matching the pre-configured monitor control timing identifier. Taking the SSH protocol as an example, when the state to be updated is KEX, the control action corresponding to the pre-configured control timing identifier KEX is to configure the relevant parameters of the monitor and start the monitor. Then, the state to be updated KEX is matched with the pre-configured control timing identifier to determine the corresponding control action as configuring the relevant parameters of the monitor and starting the monitor. The following will be explained in Chinese as configuring the relevant parameters of the monitor and starting the monitor.

[0075] Step S1302: If the matching is successful, the control action corresponding to the current control timing identifier is determined according to the preset monitor control timing identifier and the corresponding control action.

[0076] Specifically, taking step S1301 as an example, if the match is successful, the relevant parameters of the monitor will be configured and the monitor will be started. At this time, the relevant parameters of the monitor will be set first, and then the monitor will be started to monitor the vulnerabilities of the object under test, record and report them. The current control timing indicator will change to test end. The corresponding action can be configured to end the monitor. The following will be explained in Chinese as end the monitor. Then the monitor will stop monitoring the object under test. In this way, flexible control of the monitor can be achieved.

[0077] This embodiment, through the above-described scheme, specifically matches the current control timing identifier as a parameter passed to the preset monitor control function with a preset monitor control timing identifier. If the match is successful, the control action corresponding to the current control timing identifier is determined based on the preset monitor control timing identifier and the corresponding control action. Based on this scheme, the control action on the monitor is controlled according to the current control timing identifier, thereby achieving the purpose of flexible control of the monitor and avoiding the effect of missed alarms or ineffective monitoring.

[0078] Furthermore, referring to Figure 4 , Figure 4 This is a flowchart illustrating a third exemplary embodiment of the monitor control method, which further includes the following steps before determining the current control timing identifier via the state machine:

[0079] Step S101: Configure the state machine and its corresponding state number according to the object under test.

[0080] Specifically, when the object under test is a protocol, the state of the corresponding state machine is configured according to the interaction process of the protocol. In order to facilitate subsequent matching and convenience, each state in the protocol under test is assigned a state number.

[0081] This solution configures the state machine's states and corresponding state numbers based on the object under test. Based on this solution, the state machine's corresponding state numbers are configured, allowing these state numbers to serve as control timing identifiers, facilitating configuration and subsequent matching operations.

[0082] Furthermore, referring to Figure 5 , Figure 5 This is a flowchart illustrating a fourth exemplary embodiment of the monitor control method, which further includes the following steps before determining the current control timing identifier via the state machine:

[0083] Step S102: Configure the monitor control timing identifier and corresponding control action according to the tested object. The monitor control timing identifier includes the status number of test start, test end, iteration start, iteration end, and pending update status. The control action includes starting the monitor, configuring relevant monitor parameters, and ending the monitor.

[0084] Specifically, taking the SSH protocol listed in step S130 above as an example, during testing, if the state machine does not configure corresponding actions in the ID state, the monitor will not be used for detection. Only after switching to the KEX state, when corresponding control actions are configured, will the monitor be activated, thus reducing invalid detections. A monitor without state control completes its detection in the ID state. If subsequent complex state interactions cause problems on the server side, the monitor will not detect these issues, resulting in a false negative. If the monitor detects after the ID state and before the KEX state, false negatives will be reduced. Therefore, by not configuring control actions in the ID state and configuring the desired monitoring actions before switching to the KEX state, the monitor can be flexibly controlled. The monitor control timing identifiers include the state numbers for test start, test end, iteration start, iteration end, and pending update states. The control actions include configuring monitor-related parameters, starting the monitor, and stopping the monitor.

[0085] This embodiment, through the above-described scheme, specifically configures the monitor control timing identifier and corresponding control actions based on the object under test. The monitor control timing identifier includes a status number indicating test start, test end, iteration start, iteration end, and pending update. The control actions include starting the monitor, configuring relevant monitor parameters, and stopping the monitor. Based on this scheme, by configuring the monitor control timing identifier and corresponding control actions, an execution basis is provided for subsequently controlling the monitor and the object under test according to the operator's needs.

[0086] Furthermore, embodiments of this application also propose a monitor control device, the monitor control device comprising:

[0087] The acquisition module is used to determine the current control timing identifier through a state machine;

[0088] The matching module is used to determine the control action corresponding to the current control timing identifier through a preset monitor control function;

[0089] The execution module is used to control the monitor to monitor the object under test through the control actions.

[0090] Furthermore, this application also proposes a terminal device, which includes a memory, a processor, and a monitor control program stored in the memory and running on the processor. When the monitor control program is executed by the processor, it implements the steps of the monitor control method.

[0091] Since this monitor control program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be repeated here.

[0092] Furthermore, this application also proposes a storage medium storing a monitor control program, which, when executed by a processor, implements the steps of the monitor control method.

[0093] Since this monitor control program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be repeated here.

[0094] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0095] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.

[0097] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A monitor control method, characterized in that, An application is made in a fuzzing framework, which includes a state machine and a monitor. The monitor control method includes the following steps: The current control timing identifier is determined through the state machine; The step of determining the current control timing identifier through the state machine further includes: The monitor control timing identifier and corresponding control action are configured according to the object under test. The monitor control timing identifier includes test start, test end, iteration start, iteration end, and a status number determined based on the protocol status of the object under test. The step of determining the current control timing identifier through the state machine includes: If the state machine has a state to be updated, then the state to be updated is matched with the state of the state machine. If the match is successful, the state number of the state to be updated is determined as the current control timing identifier based on the preset state machine state and the corresponding state number. If the state machine does not have a state to be updated, the current control timing identifier is determined according to the preset progress value; The control action corresponding to the current control timing identifier is determined by a preset monitor control function; The step of determining the control action corresponding to the current control timing identifier through a preset monitor control function includes: The current control timing identifier is passed as a parameter to the preset monitor control function for matching with the preset monitor control timing identifier; If the match is successful, the control action corresponding to the current control timing identifier is determined according to the preset monitor control timing identifier and the corresponding control action. The control action includes: configuring the relevant parameters of the monitor, starting the monitor, and ending the monitor. The control action controls the monitor to monitor the object under test.

2. The monitor control method according to claim 1, characterized in that, Before the step of determining the current control timing identifier through the state machine, the following is also included: Configure the state machine's state and corresponding state number according to the object under test.

3. A monitor control device, characterized in that, The monitor control device includes: The acquisition module is used to determine the current control timing identifier through a state machine; The acquisition module is further configured to configure the monitor control timing identifier and corresponding control action according to the object under test. The monitor control timing identifier includes test start, test end, iteration start, iteration end, and a status number determined based on the protocol status of the object under test. The control action corresponding to the current control timing identifier is determined by a preset monitor control function; If the state machine has a state to be updated, then the state to be updated is matched with the state of the state machine. If the match is successful, the state number of the state to be updated is determined as the current control timing identifier based on the preset state machine state and the corresponding state number. If the state machine does not have a state to be updated, then the current control timing identifier is determined according to a preset progress value. The matching module is used to determine the control action corresponding to the current control timing identifier through a preset monitor control function; The matching module is further configured to pass the current control timing identifier as a parameter to the preset monitor control function and match it with the preset monitor control timing identifier; If the match is successful, the control action corresponding to the current control timing identifier is determined according to the preset monitor control timing identifier and the corresponding control action. The control action includes: configuring the relevant parameters of the monitor, starting the monitor, and ending the monitor. The execution module is used to control the monitor to monitor the object under test through the control actions.

4. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a monitor control program stored in the memory and running on the processor. When the monitor control program is executed by the processor, it implements the steps of the monitor control method as described in any one of claims 1-2.

5. A storage medium, characterized in that, The storage medium stores a monitor control program, which, when executed by a processor, implements the steps of the monitor control method as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Software fuzzing test method and device, electronic equipment and storage medium

    CN114328173A

  • Process monitoring method for embedded application software testing

    CN1845081A