A method and system for automatically detecting mouse firmware vulnerabilities

Automatic detection of mouse firmware vulnerabilities through PC and motor systems has solved the problem of difficult to quickly locate mouse button abnormal parameters in the existing technology, and achieved fast and accurate vulnerability detection, reducing the incidence of mouse abnormalities.

CN114625585BActive Publication Date: 2025-08-08VTION ANZHUO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210093876.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-08-08
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

The existing technology is difficult to quickly and automatically detect mouse firmware vulnerabilities, which makes it difficult to locate abnormal parameters when the mouse button function is abnormal, increasing the detection difficulty and time cost.

Method used

Through the PC, MCU and four motor systems, the physical actions of the mouse are automatically controlled, combined with the Windows system event response, abnormal parameters are recorded, and the mouse firmware vulnerabilities are automatically detected.

Benefits of technology

It realizes rapid and automated detection of mouse firmware vulnerabilities, reducing the possibility of abnormal mouse due to parameter settings, and improving detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625585B_ABST
    Figure CN114625585B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for automatically detecting mouse firmware vulnerabilities. The method comprises: an MCU and four motors, wherein one motor controls clicking a left mouse button, one motor controls clicking a right mouse button, one motor controls left and right movement of the mouse, and one motor controls scrolling of a mouse wheel; testing whether all functions of the mouse are normal by setting parameters; randomly generating a string of parameters according to a parameter rule and length of a mouse setting interface and sending it to the mouse; sending a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtaining a system event response after the mouse actuation through a Windows system; if an abnormality occurs, recording the randomly generated string of parameters; controlling the mouse to power on again, so that the mouse is reset and restarted after the abnormality occurs; repeating the test until the detection is completed, and storing all recorded parameters; facilitating the capture of abnormal parameters and repairing firmware vulnerabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for automatically detecting mouse firmware vulnerabilities. Background Art

[0002] With the rise of gaming, the customization of mouse button functions has become increasingly diverse, and the ability to set macros and special function buttons has become increasingly rich. This has led to a significant increase in the likelihood that mouse customization will cause abnormal mouse button functions. However, testing all customizable functions individually is both difficult and time-consuming for testers. Therefore, identifying the parameters that cause abnormal mouse function settings when using software has become a pressing technical issue. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method and system for automatically detecting mouse firmware vulnerabilities, which can quickly find abnormal parameter strings and greatly reduce the occurrence of abnormalities such as the mouse firmware being unusable after parameter settings.

[0004] In a first aspect, the present invention provides a method for automatically detecting mouse firmware vulnerabilities, comprising: a PC, an MCU, and four motors, wherein the PC is connected to the MCU; the MCU is respectively connected to the four motors, one motor controls clicking the left button of the mouse, one motor controls clicking the right button of the mouse, one motor controls left and right movement of the mouse, and one motor controls scrolling of the mouse wheel;

[0005] Step 1: By setting parameters, randomly test the normal operation of the mouse set number of functions. If normal, proceed to step 2; if abnormal, report the abnormality and end the test;

[0006] Step 2: Based on the parameter rules and length of the mouse setting interface, a string of parameters is randomly generated and sent to the mouse;

[0007] Step 3: Send a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtain a system event response after the mouse action through the Windows system;

[0008] Step 4: If an exception occurs, record the randomly generated string of parameters; if no exception occurs, do not record;

[0009] Step 5: Power on the mouse again to reset the mouse after the abnormality occurs.

[0010] Step 6: Repeat steps 2 to 5 until the test is completed and store all recorded parameters.

[0011] Furthermore, step 1 is further specified as follows: setting a set of use cases including system events generated by all standard buttons, mapping the system events to a configuration parameter, and after the mouse button is set to the parameter, the MCU controls the motor to perform corresponding actuation, and the Window responds to the corresponding system event; testing whether the mouse is operating normally, if normal, proceed to step 2; if not normal, report the abnormality.

[0012] Furthermore, a USB Hub is included; the PC is electrically connected to the mouse and the MCU via the USB Hub.

[0013] In a second aspect, the present invention provides a system for automatically detecting mouse firmware vulnerabilities, comprising: a PC, an MCU, and four motors, wherein the PC is connected to the MCU; the MCU is respectively connected to the four motors, one motor controls clicking the left button of the mouse, one motor controls clicking the right button of the mouse, one motor controls left and right movement of the mouse, and one motor controls scrolling of the mouse wheel;

[0014] Normal test module, by setting parameters, randomly tests the normal operation of the set number of mouse functions. If normal, it enters the stress test module; if abnormal, it reports an abnormality and ends the test;

[0015] The stress test module randomly generates a string of parameters and sends it to the mouse according to the parameter rules and length of the mouse setting interface;

[0016] The actuation module sends a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtains a system event response after the mouse actuation through the Windows system;

[0017] The exception recording module records the randomly generated string of parameters if an exception occurs; if no exception occurs, no recording is performed;

[0018] Reset and restart module, control the mouse to power on again, so that the mouse can be reset and restarted after an abnormality;

[0019] The vulnerability recording module repeats the stress test module to the reset and restart module until the detection is completed and all recorded parameters are stored.

[0020] Furthermore, the normal test module is further specified as follows: setting a set of use cases including system events generated by all standard buttons, mapping the system events to a configuration parameter, and after the mouse button is set to the parameter, the MCU controls the motor to perform corresponding actions, and the Window responds to the corresponding system events; testing whether the mouse is operating normally, if normal, entering the stress test module; if abnormal, reporting an abnormality.

[0021] Furthermore, a USB Hub is included; the PC is electrically connected to the mouse and the MCU via the USB Hub.

[0022] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

[0023] The embodiments of the present application provide a method and system for automatically detecting mouse firmware vulnerabilities, generating setting parameters, controlling mouse hardware movement and clicking, determining whether the mouse is normal (based on mouse events obtained by the system), restarting and resetting the mouse, recording abnormal parameter strings, and repairing the mouse firmware code through the abnormal parameter strings. This can greatly reduce the risk of mouse firmware becoming unusable due to parameter settings, thereby reducing the defective rate of the mouse.

[0024] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0026] Figure 1 This is a flowchart of the method in Example 1 of the present invention;

[0027] Figure 2 This is a schematic diagram of the structure of the device in Example 2 of the present invention. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of this application have the following general ideas:

[0029] The entire system consists of a computer, a set of Windows test software (Mouse Test Software), a small MCU development board, multiple PWM motors, several levers, cams, and gears.

[0030] Let the Mouse Test Software use the motor rotation to automatically control the physical actions of moving the mouse left and right or clicking buttons;

[0031] Click action: One end of the lever is mounted on the motor and rotates with the motor, while the other end is mounted on a cam. It uses the principle of a cam mechanism. When the cam rotates, it drives the follower to move up and down to achieve a click.

[0032] Scrolling action: One end of the lever is mounted on the motor and rotates with the motor, while the other end is mounted on a cam. When the cam rotates, it drives the mouse scroll wheel to rotate.

[0033] Movement: A sliding lever is connected to a suction cup, which holds the mouse. Clockwise or counterclockwise rotation of the motor will drive the sliding lever to move the mouse left or right.

[0034] USB Hub Module Features

[0035] 1. Contains normal USB Hub bus functions.

[0036] 2. Mouse Test Software can control the USB Hub to power on and off a single USB port.

[0037] Functions of the Mouse Test Software module

[0038] 1. The software has a built-in set of use cases that include all system events that can be generated by standard keystrokes. System events are mapped to a configuration parameter. After the mouse button is set to this parameter, pressing the button will generate the system event. (Normal parameter settings)

[0039] 2. Generate a random string of data parameters based on the parameter rules and length of the mouse setting interface and send it to the mouse. (Random parameter setting, abnormal parameter setting, the mouse must be able to maintain the original button function)

[0040] 3. Send commands to the MCU to control the motor device to rotate clockwise or counterclockwise a corresponding number of times to make the mouse perform physical actions such as sliding and clicking. The coordinate position of the mouse cursor and the system key events generated when the key is pressed are obtained through the Windows system to determine whether the mouse is normal.

[0041] (Physically moving the mouse to the left or right will cause the coordinates of the mouse cursor in the Windows system to change accordingly)

[0042] 4. Record the string of setting parameters that causes the mouse to behave abnormally.

[0043] 5. Control the USB Hub to power on the mouse again to reset and restart the mouse after an abnormality.

[0044] 6. Repeat the test in steps 2-5.

[0045] Functions of the MCU module

[0046] 1. Receive the move or click event commands sent by the Mouse Test Software.

[0047] 2. Control PWM output to control the motor to make corresponding physical movements to generate events such as mouse clicks.

[0048] Example 1

[0049] like Figure 1 As shown, this embodiment provides a method for automatically detecting mouse firmware vulnerabilities, including: a PC, an MCU, and four motors, wherein the PC is connected to the MCU; the MCU is respectively connected to the four motors, one motor controls clicking the left button of the mouse, one motor controls clicking the right button of the mouse, one motor controls moving the mouse left and right, and one motor controls scrolling the mouse wheel;

[0050] Step 1. Set up a set of use cases that include all system events generated by standard buttons. Map the system events to a configuration parameter. After the mouse button is set to the parameter, the MCU controls the motor to perform the corresponding actuation, and the Windows responds to the corresponding system event. Test whether the mouse is operating normally. If it is normal, proceed to step 2. If not, report an exception. During the test, only a few functions need to be randomly tested to ensure that the basic functions of the mouse are normal (basic functions include: left button, right button, scroll wheel, and movement).

[0051] Step 2: Based on the parameter rules and length of the mouse setting interface, a string of parameters is randomly generated and sent to the mouse;

[0052] Step 3: Send a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtain a system event response after the mouse action through the Windows system;

[0053] Step 4: If an exception occurs, record the randomly generated string of parameters; if no exception occurs, do not record;

[0054] Step 5: Power on the mouse again to reset the mouse after the abnormality occurs.

[0055] Step 6: Repeat steps 2 to 5 until the test is completed and store all recorded parameters.

[0056] In another preferred solution of this embodiment, a USB Hub is further included; the PC is electrically connected to the mouse and the MCU respectively through the USB Hub.

[0057] Based on the same inventive concept, this application also provides a device corresponding to the method in Example 1, see Example 2 for details.

[0058] Example 2

[0059] like Figure 2 As shown, in this embodiment, a system for automatically detecting mouse firmware vulnerabilities is provided, including: a PC, an MCU, and four motors, wherein the PC is connected to the MCU; the MCU is respectively connected to the four motors, one motor controls clicking the left button of the mouse, one motor controls clicking the right button of the mouse, one motor controls moving the mouse left and right, and one motor controls scrolling the mouse wheel;

[0060] The normal test module sets up a set of use cases that include all system events generated by standard buttons, maps the system events to a configuration parameter, and after the mouse button is set to the parameter, the MCU controls the motor to perform the corresponding actuation, and the Window responds to the corresponding system event; tests whether the mouse is operating normally. If normal, it enters the stress test module; if not, it reports an abnormality; during the test, only a few functions need to be randomly tested to ensure that the basic functions of the mouse are normal (basic functions include: left button, right button, pulley and movement). After the mouse movement and click operation, there will be corresponding reactions in the computer, and the mouse is judged by the reaction.

[0061] The stress test module randomly generates a string of parameters and sends it to the mouse according to the parameter rules and length of the mouse setting interface;

[0062] The actuation module sends a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtains a system event response after the mouse actuation through the Windows system;

[0063] The exception recording module records the randomly generated string of parameters if an exception occurs; if no exception occurs, no recording is performed;

[0064] Reset and restart module, control the mouse to power on again, so that the mouse can be reset and restarted after an abnormality;

[0065] The vulnerability recording module repeats the stress test module to the reset and restart module until the detection is completed and all recorded parameters are stored.

[0066] In another preferred solution of this embodiment, a USB Hub is further included; the PC is electrically connected to the mouse and the MCU respectively through the USB Hub.

[0067] Since the device described in the second embodiment of the present invention is used to implement the method of the first embodiment of the present invention, those skilled in the art will be able to understand the specific structure and variations of the device based on the method described in the first embodiment of the present invention, and therefore will not be described in detail here. All devices used in the method of the first embodiment of the present invention fall within the scope of protection of the present invention.

[0068] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for automatically detecting mouse firmware vulnerabilities, characterized by: include: A PC, an MCU and four motors, wherein the PC is connected to the MCU; The MCU is connected to the four motors respectively, one motor controls clicking the left button of the mouse, one motor controls clicking the right button of the mouse, one motor controls moving the mouse left and right, and one motor controls scrolling of the mouse wheel; Step 1: Set up a set of use cases that include all system events generated by standard buttons. Map the system events to a configuration parameter. After the mouse button is set to the parameter, the MCU controls the motor to perform the corresponding action, and Windows responds to the corresponding system event. Test whether the mouse is operating normally. If it is normal, proceed to step 2. If not, report an exception. Step 2: Based on the parameter rules and length of the mouse setting interface, a string of parameters is randomly generated and sent to the mouse; Step 3: Send a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtain a system event response after the mouse action through the Windows system; Step 4: If an exception occurs, record the randomly generated string of parameters; if no exception occurs, do not record; Step 5: Power on the mouse again to reset the mouse after the abnormality occurs. Step 6: Repeat steps 2 to 5 until the test is completed and store all recorded parameters.

2. The method for automatically detecting mouse firmware vulnerabilities according to claim 1, wherein: It also includes a USB Hub; the PC is electrically connected to the mouse and the MCU via the USB Hub.

3. A system for automatically detecting mouse firmware vulnerabilities, characterized by: include: A PC, an MCU and four motors, wherein the PC is connected to the MCU; The MCU is connected to the four motors respectively, one motor controls clicking the left button of the mouse, one motor controls clicking the right button of the mouse, one motor controls moving the mouse left and right, and one motor controls scrolling of the mouse wheel; The normal test module sets up a set of use cases that include all system events generated by standard buttons, maps the system events to a configuration parameter, and after the mouse button is set to the parameter, the MCU controls the motor to perform the corresponding action, and Windows responds to the corresponding system event. This tests whether the mouse is operating normally. If normal, it enters the stress test module; if not, it reports an exception. The stress test module randomly generates a string of parameters and sends it to the mouse according to the parameter rules and length of the mouse setting interface; The actuation module sends a command corresponding to the string of parameters to the MCU to control the motor, so that the mouse performs a corresponding physical action, and obtains a system event response after the mouse action through the Windows system; An exception recording module records the randomly generated string of parameters if an exception occurs; If there is no abnormality, no record will be made; Reset and restart module, control the mouse to power on again, so that the mouse can be reset and restarted after an abnormality; The vulnerability recording module repeats the stress test module to the reset and restart module until the detection is completed and all recorded parameters are stored.

4. The system for automatically detecting mouse firmware vulnerabilities according to claim 3, wherein: It also includes a USB Hub; the PC is electrically connected to the mouse and the MCU via the USB Hub.

Citation Information

Patent Citations

  • Universal automatic test equipment for HID man-machine interaction scene cases

    CN112612699A

  • Interaction technology of a touchable interaction device based on mouse

    CN113391752A