Penetration testing method and device and vehicle

Through the multimodal interactive penetration testing method, the attacker is simulated to launch attacks in a coordinated manner using multiple input methods, test cases are dynamically generated, and virtual USB device injection technology is used to solve the problem that existing penetration testing cannot evaluate coordinated attacks using multiple input methods, improve the comprehensiveness and efficiency of the test, and enhance system security.

CN120724441APending Publication Date: 2025-09-30GREAT WALL MOTOR CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510835971.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing penetration tests only target a single input method and cannot effectively evaluate the security of systems that use multiple input methods to collaboratively launch attacks.

Method used

A penetration testing method is provided. By obtaining a set of test cases including collaborative attack operations in multiple interaction modes, the electronic equipment system is tested and a test report is generated. The method simulates attackers using two or more input methods to launch collaborative attacks, dynamically generates test cases to expand the test scope, and uses virtual USB device injection technology to simulate external device access to reduce manual dependence.

Benefits of technology

It has achieved penetration testing of attack behaviors launched in a coordinated manner through multiple input methods, improved the comprehensiveness and efficiency of the test, increased the transparency and accuracy of the test process, and helped technical personnel improve the protection mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120724441A_ABST
    Figure CN120724441A_ABST
Patent Text Reader

Abstract

The invention provides a penetration test method and device and a vehicle, and relates to the technical field of data test.The method comprises the steps that in response to test operation, a test case set is obtained; wherein the test case set comprises a plurality of test cases, and the test cases comprise contents of collaborative attack operations corresponding to a plurality of interaction modes; testing the electronic equipment system according to the content of the collaborative attack operation corresponding to each test case to obtain an execution result corresponding to each test case; and generating a test report based on the execution result corresponding to each test case. Therefore, the electronic equipment can test the electronic equipment system according to the content of the cooperative attack operation corresponding to each test case, so as to simulate the behavior that an attacker cooperatively initiates an attack by using two or more input modes, thereby achieving the purpose of performing a penetration test on the behavior that the attacker cooperatively initiates the attack by using the two or more input modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data testing technology, and in particular to a penetration testing method, device and vehicle. Background Art

[0002] In order to provide a richer interactive experience, electronic devices can support multi-modal interaction (MMI) function. Multimodal interaction refers to a technology that can enable users to interact with electronic devices through multiple input methods, among which the multiple input methods can be voice, touch, gesture and other input methods.

[0003] Attackers can coordinate attacks using two or more input methods to compromise the system security of electronic devices. To assess the system security of electronic devices, penetration testing can be performed. Penetration testing is a technical method for assessing the system security of electronic devices by simulating malicious attack behaviors.

[0004] However, existing penetration tests only test a single input method, and the defense mechanism is also a single protection mechanism for dealing with attacks launched using a single input method. How to conduct penetration tests on attacks launched collaboratively using two or more input methods has become an urgent problem to be solved. Summary of the Invention

[0005] In view of the above problems, the present disclosure provides a penetration testing method, device and vehicle that overcome the above problems or at least partially solve the above problems. The technical solutions are as follows:

[0006] A penetration testing method, the method comprising: obtaining a test case set in response to a test operation; wherein the test case set includes multiple test cases, and the test cases include the content of collaborative attack operations corresponding to multiple interaction modes; testing the electronic device system according to the content of the collaborative attack operation corresponding to each test case, and obtaining the execution result corresponding to each test case; and generating a test report based on the execution result corresponding to each test case.

[0007] In an embodiment of the present application, since the test case includes the content of collaborative attack operations corresponding to multiple interaction modes, the electronic device can test the electronic device system according to the content of the collaborative attack operation corresponding to each test case to simulate the attacker's behavior of collaboratively launching an attack using two or more input methods, and obtain the attack result corresponding to the behavior of collaboratively launching an attack using two or more input methods, that is, the execution result, thereby achieving the purpose of performing penetration testing on the behavior of collaboratively launching an attack using two or more input methods.

[0008] Optionally, in response to a test operation, a test case set is obtained, including: in response to a test operation input by a user, determining a test mode under the current test; when the test mode is a first test mode, obtaining a first test case set, and determining the first test case set as a test case set; wherein, the first test case set includes multiple first test cases, and the first test case includes the content of collaborative attack operations corresponding to multiple interaction modes; when the test mode is a second test mode, obtaining a second test case set, and determining the second test case set as a test case set; wherein, the second test case set includes multiple second test cases, and the second test case includes the content of collaborative attack operations corresponding to multiple interaction modes; the content of the collaborative attack operations corresponding to at least some of the second test cases is related to the access of external devices.

[0009] In this embodiment of the present application, at least some of the coordinated attack operations corresponding to the second test cases are related to external device access. This means that test cases can be dynamically generated based on real-time changes in the electronic device's state, such as external device access, thereby expanding the scope of the penetration test and improving its comprehensiveness.

[0010] Optionally, when the test mode is the second test mode, obtaining a second test case set includes: when the test mode is the second test mode, obtaining first information; wherein the first information includes external device access; inputting the first information into a preset model, and obtaining a second test case set using the preset model.

[0011] In an embodiment of the present application, using a preset model to generate a second set of test cases can improve the efficiency of generating test cases, thereby improving the efficiency of penetration testing.

[0012] Optionally, the second test case also includes a preset execution condition, which corresponds to the first information and includes access to an external device; the electronic device system is tested according to the content of the collaborative attack operation corresponding to each test case, including: using virtual universal serial bus device injection technology to simulate the access of an external device to the electronic device so that the electronic device meets the preset execution condition; when the preset execution condition is met, the electronic device system is tested according to the content of the collaborative attack operation corresponding to each test case.

[0013] In the embodiment of the present application, virtual USB device injection technology is used to simulate the connection of an external device to an electronic device, rather than a technician connecting the external device to the electronic device. This can achieve automated testing of hardware interface attacks and reduce manual dependence.

[0014] Optionally, the second test case also includes a test priority; the second test case set includes a first test case subset and a second test case subset; the content of the collaborative attack operation included in the first test case in the first test case set is related to the access of an external device; wherein the test priority is used to indicate the test order of the second test case, the test priority is positively correlated with the test order, and the test priority of the first test case subset is greater than that of the second test case subset.

[0015] In an embodiment of the present application, the test priority of the first test case subset is higher than that of the second test case subset. By sorting the test order according to the test priority, excessive testing of unimportant functions can be avoided, thereby saving time and energy.

[0016] Optionally, the test report includes: the content of the test case whose execution result is an abnormal execution result; wherein the content of the test case includes the content of the attack operations corresponding to multiple interaction modes, the execution order of the content of the attack operations corresponding to multiple interaction modes, the type of abnormal execution, preset execution conditions, test priority and at least one or more of the expected safe execution results; the type of abnormal execution is used to reflect the cause of the abnormal execution.

[0017] In an embodiment of the present application, the test report includes the content of the test case whose execution result is an abnormal execution result, which increases the transparency of the testing process. When the execution result is an abnormal execution, the technician can clearly understand the content and execution results of the collaborative attack operation, and even the type of abnormal execution, and make targeted improvements to the protection mechanism of the electronic device.

[0018] Optionally, a test report is generated based on the execution result corresponding to each test case, including: if the execution result is an abnormal execution result, obtaining the content of the test case with the abnormal execution result; determining the test report; wherein the test report includes the content of the test case with the abnormal execution result.

[0019] In an embodiment of the present application, the test report includes the content of the test case whose execution result is an abnormal execution result, which increases the transparency of the testing process. When the execution result is an abnormal execution, the technician can clearly understand the content and execution results of the collaborative attack operation, and even the type of abnormal execution, and make targeted improvements to the protection mechanism of the electronic device.

[0020] Optionally, a test report is generated based on the execution result corresponding to each test case, including: if the execution result is an abnormal execution result, obtaining the system log corresponding to the test case with the abnormal execution result; determining the test report based on the parsing result of the system log; wherein the test includes the parsing result and the content of the test case; the parsing result includes the type of abnormal execution, and the type of abnormal execution is used to reflect the cause of the abnormal execution.

[0021] In the embodiment of the present application, the test report is determined by using the analysis results of the system log, which can quickly and accurately locate the problem and improve the test efficiency of the penetration test.

[0022] A penetration testing device, the device comprising: an acquisition module for acquiring a test case set in response to a test operation; wherein the test case set includes multiple test cases, and the test cases include the content of collaborative attack operations corresponding to multiple interaction modes; a testing module for testing an electronic device system according to the content of the collaborative attack operation corresponding to each test case, and obtaining an execution result corresponding to each test case; and a generation module for generating a test report based on the execution result corresponding to each test case.

[0023] A vehicle comprises: a vehicle computer, the vehicle computer comprising a processor and a memory for storing instructions executable by the processor, wherein the processor is used to execute any one of the above-mentioned penetration testing methods.

[0024] An electronic device comprises: a processor; and a memory for storing instructions executable by the processor, wherein the processor is used to execute any one of the above-mentioned penetration testing methods.

[0025] A computer-readable storage medium stores a computer program for executing any one of the above-mentioned penetration testing methods.

[0026] A computer program product includes a computer program. When the computer program is executed by a processor of a computer device, the computer device is enabled to perform any of the above-mentioned penetration testing methods.

[0027] By means of the above-mentioned technical solution, the present disclosure provides a penetration testing method, device and vehicle. Since the test case includes the content of collaborative attack operations corresponding to multiple interactive modes, the electronic device can test the electronic device system according to the content of the collaborative attack operation corresponding to each test case to simulate the attacker's behavior of collaboratively launching an attack using two or more input methods, and obtain the attack result corresponding to the behavior of collaboratively launching an attack using two or more input methods, that is, the execution result, thereby achieving the purpose of performing penetration testing on the behavior of collaboratively launching an attack using two or more input methods.

[0028] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, 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 disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present disclosure. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0030] Figure 1 FIG2 is a schematic diagram of a scenario of performing a penetration test on a vehicle computer in a vehicle provided by an exemplary embodiment of the present application;

[0031] Figure 2 Shown is a schematic diagram of a test interface provided by an exemplary embodiment of the present application;

[0032] Figure 3 Shown is a flow chart of a penetration testing method provided by an exemplary embodiment of the present application;

[0033] Figure 4 Shown is a schematic diagram of a test interface provided by an exemplary embodiment of the present application;

[0034] Figure 5 FIG2 is a flow chart of a penetration testing method provided by another exemplary embodiment of the present application;

[0035] Figure 6 FIG2 is a schematic diagram showing a framework of reverse parsed content obtained by reverse engineering a voice input method, provided by an exemplary embodiment of the present application;

[0036] Figure 7 FIG2 is a schematic diagram showing a framework of reverse parsed content obtained by reverse engineering a touch input method, provided by an exemplary embodiment of the present application;

[0037] Figure 8 FIG2 is a schematic diagram showing a framework of reverse parsed content obtained by reverse engineering a gesture input method according to an exemplary embodiment of the present application;

[0038] Figure 9 FIG2 is a schematic diagram showing a framework of reverse parsed content obtained by reverse engineering a gesture input method according to an exemplary embodiment of the present application;

[0039] Figure 10FIG2 is a schematic diagram showing a framework of reverse parsed content obtained by reverse engineering a USB flash drive input method, provided by an exemplary embodiment of the present application;

[0040] Figure 11 Shown is a schematic structural diagram of a penetration testing device provided by an exemplary embodiment of the present application;

[0041] Figure 12 Shown is a structural schematic diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0043] Application Overview

[0044] As described in the background technology above, how to conduct penetration testing on two or more input methods to launch attack behaviors in a coordinated manner has become an urgent problem to be solved.

[0045] In response to the above technical problems, an embodiment of the present application provides a penetration testing method, which includes: obtaining a test case set; the test case set includes multiple test cases, each test case includes the content of collaborative attack operations corresponding to multiple interaction modes; testing the electronic device system according to the content of the collaborative attack operation corresponding to each test case, and obtaining the execution result corresponding to each test case; generating a test report based on the execution result corresponding to each test case.

[0046] In an embodiment of the present application, since the test case includes the content of collaborative attack operations corresponding to multiple interaction modes, the electronic device can test the electronic device system according to the content of the collaborative attack operation corresponding to each test case to simulate the attacker's behavior of collaboratively launching an attack using two or more input methods, and obtain the attack result corresponding to the behavior of collaboratively launching an attack using two or more input methods, that is, the execution result, thereby achieving the purpose of performing penetration testing on the behavior of collaboratively launching an attack using two or more input methods.

[0047] Example scenarios

[0048] The penetration testing method provided in the embodiment of the present application can be applied to electronic devices that support multimodal interaction functions, and the electronic devices can be vehicles, mobile phones, computers, robots, etc. The embodiment of the present application does not impose any special restrictions on the specific form of the vehicle.

[0049] With the popularization of smart cockpits, vehicles are generally equipped with car computers that support multimodal interaction functions. The following example illustrates the scenario of penetration testing of a car computer that supports multimodal interaction functions.

[0050] For example, Figure 1 The figure shows a scenario diagram of a penetration test on a vehicle computer provided by an exemplary embodiment of the present application. Figure 1 As shown, the scenario includes a vehicle 100 and a technician. The vehicle 100 includes a vehicle computer 110, which has a test application installed therein. The test application is used to perform a penetration test on the vehicle computer system of the vehicle computer 110. The vehicle computer 110 includes a display screen 111. In response to the technician opening the test application, the vehicle computer 110 displays a test interface on the display screen 111, for example, Figure 2 FIG. 1 is a schematic diagram of a test interface provided by an exemplary embodiment of the present application. Figure 2 As shown, the test interface may include a test mode activation control 1110. In response to a user clicking the test mode activation control 1110, the vehicle computer 110 may perform a penetration test mode: obtaining a test case set; the test case set includes multiple test cases, each test case including coordinated attack operations corresponding to multiple interaction modes; testing the vehicle computer system according to the coordinated attack operations corresponding to each test case, obtaining an execution result corresponding to each test case; and generating a test report based on the execution result corresponding to each test case.

[0051] For example, this example may be referred to as Test Case 1 below. Test Case 1, where the multiple interaction modes are touch and voice, is used as an example for illustration. Test Case 1 may include: The coordinated attack operations corresponding to the multiple interaction modes may include: the attack operation for touch being a click at a preset location at a preset frequency; the attack operation for voice being a voice command to "switch to navigation mode"; and the touch and voice attack operations being executed simultaneously. The preset frequency may be a high-frequency input of 10 seconds.

[0052] If the vehicle computer 110 executes the attack operation corresponding to touch and the attack operation corresponding to voice simultaneously, and then calls the navigation application and displays the navigation interface within the preset time, the execution result is normal. In this case, the test report can include the content that the execution result of test case 1 is normal.

[0053] If the vehicle computer 110 simultaneously executes both the touch-based attack and the voice-based attack, but fails to call the navigation application within the preset time, the execution result is abnormal. The test report may include the following: the execution result of test case 1 is abnormal, the content of the coordinated attack, and the type of abnormal execution are Application Not Responding (ANR). If the execution result corresponding to this test case is abnormal, technicians can improve the vehicle computer based on the test report and create a multimodal protection mechanism corresponding to this test case to avoid abnormal execution results in the actual operating scenarios corresponding to this test case. This way, if the driver issues a voice command to "switch to navigation mode" to the vehicle computer 110 while driving, even if a child nearby frequently taps the vehicle computer's display, the navigation application will be called normally and the navigation interface will be displayed, improving the driver's user experience.

[0054] It should be understood that the above application scenario examples are only provided to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited thereto. On the contrary, the embodiments of the present application can be applied to any applicable scenario.

[0055] Exemplary Methods

[0056] Figure 3 Shown is a flow chart of a penetration testing method provided by an exemplary embodiment of the present application. Figure 3 The method can be performed by an electronic device, such as Figure 1 The vehicle 100 in FIG. Figure 3 As shown, the penetration testing method may include the following:

[0057] 310: In response to the test operation, obtain a test case set; wherein the test case set includes multiple test cases, and the test cases include content of collaborative attack operations corresponding to multiple interaction modes.

[0058] The test operation is used to trigger the electronic device to perform a penetration test. In one example, a test application can be installed in the electronic device, and the test application is used to perform a penetration test on the electronic device system. In response to the user (such as the above-mentioned technician) opening the test application, the electronic device can display a test interface, and the test interface can include a test start control. The electronic device can obtain a test case set in response to the user's first operation on the test start control. The first operation can be a click operation, a voice operation, etc., but is not limited to this. The user's first operation on the test start control is an example of a test operation.

[0059] In one example, the test case set may be pre-set in the test application, or may be a test case set generated instantly in response to a user's operation of opening a test mode of the test application.

[0060] In one example, the contents of the coordinated attack operations corresponding to the multiple interaction modes include the attack operation contents corresponding to the multiple interaction modes and the execution order of the attack operation contents corresponding to each interaction mode.

[0061] The multiple interaction modes may be at least two input methods. In one example, the multiple interaction modes may be at least two input methods such as voice, touch, gesture, and external device.

[0062] 320: Testing the electronic device system according to the content of the coordinated attack operation corresponding to each test case, and obtaining the execution result corresponding to each test case.

[0063] The electronic device system is the operating system of the electronic device. If the electronic device is a vehicle, the operating system is the vehicle system.

[0064] A test case set includes at least one test case. After executing a single test case, the electronic device can obtain the execution results of the single test case and generate a test report for the single test case. Alternatively, the electronic device can sequentially execute the coordinated attack operations corresponding to each test case in the test case set and, after executing all test cases in the test case set, generate a test report for all test cases.

[0065] The execution result can be normal execution. Specifically, if the test case execution result is consistent with the expected safe execution result, the execution result is determined to be normal execution, where the expected safe execution result refers to the execution result that complies with the execution rules. The execution result can be abnormal execution. Specifically, if the test case execution result is inconsistent with the expected safe execution result, the execution result is determined to be abnormal execution. The abnormal execution result can be used to indicate the success of a combined attack using multiple input methods.

[0066] For example, the expected safe execution result in the above example 1 or the following test case 3 is that the electronic device calls the navigation application within the preset time and displays the navigation interface. If the execution result corresponding to the above example 1 is that the electronic device calls the navigation application within the preset time and displays the navigation interface, then the execution result corresponding to the above example 1 is normal execution; if the execution result corresponding to the above example 1 is that the electronic device does not call the navigation application within the preset time and displays the navigation interface, then the execution result corresponding to the above example 1 is abnormal execution. For another example, in the following test case 2, the format of the USB flash drive file with the path " / usb / storage / malicious.sh" is text format, and the execution rule is: the electronic device can only recognize audio format, video format and image format files in the USB flash drive, and cannot recognize text format files. In this way, subsequently, the electronic device cannot execute the USB flash drive file with the path " / usb / storage / malicious.sh". The expected safe execution result is: the electronic device cannot execute the USB flash drive file with the path " / usb / storage / malicious.sh". If the execution result of Test Case 2 below is that the USB file with the path " / usb / storage / malicious.sh" is executed, then the execution result of Test Case 2 below is abnormal execution; if the execution result of Test Case 2 below is that the USB file with the path " / usb / storage / malicious.sh" is not executed, then the execution result of Test Case 2 below is normal execution. For another example, if the expected safe execution result is to create a file in a specified directory, if the execution result is not to create the file in the specified directory, then the execution result is abnormal execution; if the execution result is to create the file in the specified target, then the execution result is normal execution.

[0067] In one example, the content of the test case may include an expected safe execution result, where the expected safe execution result is used as a criterion for determining whether the execution result is normal execution or abnormal execution.

[0068] 330: Generate a test report based on the execution results corresponding to each test case.

[0069] In one example, if the test case set includes a test case, the electronic device may generate a test report corresponding to the test case based on the execution result set of the test case, that is, the test report includes the execution result of the test case.

[0070] In another example, if the test case set includes multiple test cases, the electronic device can generate a test report based on the execution result sets corresponding to the multiple test cases, that is, the test report includes the execution results of the multiple test cases.

[0071] In another example, if the test case set includes multiple test cases, the electronic device may generate multiple test reports based on the execution result sets corresponding to the multiple test cases, that is, each test report includes the execution result of one test case.

[0072] In an embodiment of the present application, since the test case includes the content of collaborative attack operations corresponding to multiple interaction modes, the electronic device can test the electronic device system according to the content of the collaborative attack operation corresponding to each test case to simulate the attacker's behavior of collaboratively launching an attack using two or more input methods, and obtain the attack result corresponding to the behavior of collaboratively launching an attack using two or more input methods, that is, the execution result, thereby achieving the purpose of performing penetration testing on the behavior of collaboratively launching an attack using two or more input methods.

[0073] According to one embodiment of the present application, in response to a test operation, a test case set is obtained, including: in response to a test operation input by a user, determining a test mode under the current test; when the test mode is a first test mode, obtaining a first test case set, and determining the first test case set as a test case set; wherein, the first test case set includes multiple first test cases, and the first test case includes the content of collaborative attack operations corresponding to multiple interaction modes; when the test mode is a second test mode, obtaining a second test case set, and determining the second test case set as a test case set; wherein, the second test case set includes multiple second test cases, and the second test case includes the content of collaborative attack operations corresponding to multiple interaction modes; the content of the collaborative attack operations corresponding to at least some of the second test cases is related to the access of external devices.

[0074] For example, Figure 4 FIG. 1 is a schematic diagram of a test interface provided by an exemplary embodiment of the present application. Figure 4 As shown, the test interface may include a first test mode activation control 1111 and a second test mode activation control 1112. Determining the test mode for the current test in response to a test operation input by the user includes: determining the test mode for the current test to be the first test mode in response to a second operation of the user clicking the first test mode activation control 1111; and determining the test mode for the current test to be the second test mode in response to a second operation of the user clicking the second test mode activation control 1112. The first operation may be, but is not limited to, a click operation, a voice operation, or the like.

[0075] The test application can have two test modes: a first test mode and a second test mode. The first test case set obtained in the first test mode can be pre-set in the test application. The second test case set obtained in the second test mode can be a test case set generated by the electronic device in response to a user's operation to open the second test mode of the test application. The second test case set can be generated by the electronic device or by another electronic device, such as a cloud platform or cloud server, and then fed back to the electronic device.

[0076] In one example, the external device may be a Universal Serial Bus (USB) device. A USB device refers to any hardware device that connects to an electronic device via a USB interface. For example, a USB device may be a Universal Serial Bus flash drive (USB flash disk), a keyboard, or the like. A Universal Serial Bus flash drive is also known as a USB flash drive.

[0077] It's understandable that connecting or inserting a USB drive can be considered an input method because it can carry data and scripts that can be read and executed by electronic devices. If a USB drive contains a malicious script and is inserted into an electronic device, the malicious script may automatically execute, thereby bypassing the device's protection mechanisms. Therefore, connecting or inserting a USB drive may be an attack method and requires penetration testing.

[0078] The following describes a test case related to inserting a USB flash drive. For example, the multiple interaction modes can be voice and USB flash drives. The coordinated attack operations corresponding to the multiple interaction modes are as follows: the attack operation corresponding to voice is to issue a voice command to "open the audio file in the corresponding path of the USB flash drive." The attack operation corresponding to the USB flash drive is to open the audio file in the corresponding path of the USB flash drive. The audio file is malformed, for example, the file name is too long or the encoding is abnormal. The attack operations corresponding to voice and USB flash drives are executed simultaneously.

[0079] Under normal execution conditions, the expected safe execution result is: the electronic device can correctly identify the deformed audio file, refuse to open the file, and display a prompt message that the audio file cannot be opened. For example, if the file name length exceeds the maximum length allowed by the system, the electronic device may display a prompt message to remind the user that the file name is too long and the audio file cannot be opened. If the execution result of the electronic device is the expected safe execution result, the execution result is normal execution. However, if the electronic device does not display the prompt message that the audio file cannot be opened, the actual execution result is inconsistent with the expected safe execution result, and the execution result is abnormal execution. In this way, in the case where the execution result is abnormal execution, the electronic device can strengthen the file verification capability of the electronic device based on the test report of the test case, thereby improving the electronic device's ability to identify abnormal files, such as the above-mentioned deformed audio files, and improving the safety and stability of the electronic device.

[0080] In this embodiment of the present application, at least some of the coordinated attack operations corresponding to the second test cases are related to external device access. This means that test cases can be dynamically generated based on real-time changes in the electronic device's state, such as external device access, thereby expanding the scope of the penetration test and improving its comprehensiveness.

[0081] According to one embodiment of the present application, when the test mode is the second test mode, obtaining a second test case set includes: when the test mode is the second test mode, obtaining first information; wherein the first information includes external device access; inputting the first information into a preset model, and obtaining a second test case set using the preset model.

[0082] In one example, a preset model may be set in the electronic device, the first information is input into the preset model, and the second test case set is obtained using the preset model.

[0083] In another example, when the test mode is the second test mode, the electronic device can obtain the first information, send the first information to another electronic device, set a preset model in the other electronic device, input the first information into the preset model, use the preset model to obtain a second test case set, and feed the second test case set back to the electronic device. The other electronic device can be a cloud platform or cloud server, etc., as long as it is an electronic device that generates the second test case set based on the first information, and there is no limitation here.

[0084] The preset model in the embodiment of the present application can be various trained artificial intelligence models, such as a finite state machine (FSM) model, etc. In one example, a large number of training samples can be used to train the initial preset model to obtain a trained preset model. Specifically, the training sample includes a large amount of first information and a large number of target test cases. The first information can be used as an input sample of the initial preset model, and the large number of target test cases can be the real labels of the initial preset model. The model training device (such as a computer, a server) can input the first information into the initial preset model to obtain a large number of actual test cases, and then train the initial preset model based on the difference between the large number of actual test cases obtained and the large number of target test cases. After training with a large number of test samples, a trained preset model is obtained. In this way, when the electronic device inputs the first information into the preset model, the preset model can be used to obtain a second set of test cases.

[0085] In one example, the test interface includes the above Figure 4 The first test mode start control 1111 and the second test mode start control 1112 may also include an external device access option; in response to the user's selection of the external device access option in the first interface, and in response to the user's second operation of clicking the second test mode start control 1112, it is determined that the test mode under the current test is the second test mode.

[0086] The external device access option is used for the user to select one or more external devices. For example, if the user uses the external device access option to select only the USB disk insertion mode, the first information obtained includes the USB disk insertion.

[0087] For example, if an electronic device outputs information about a USB flash drive being inserted to a preset model, the preset model can generate a large number of test cases related to USB flash drives. One of the test cases related to USB flash drives might include: multiple interaction modalities, including voice and USB flash drives; the coordinated attack operations corresponding to the multiple interaction modalities include: the attack operation corresponding to voice is issuing a voice command to "open the audio file in the corresponding path of the USB flash drive"; the attack operation corresponding to the USB flash drive is opening the audio file in the corresponding path of the USB flash drive; the audio file is malformed, for example, the file name of the malformed audio file is overlong or the encoding of the malformed audio file is abnormal; and the attack operation corresponding to voice and the attack operation corresponding to the USB flash drive are executed simultaneously.

[0088] In addition to including the attack operations corresponding to the various interaction modes and the execution order of the attack operations corresponding to the various interaction modes, the test case content may also include the type of abnormal execution, the preset execution conditions, the test priority, and the expected safe execution results. For example, a test case related to USB flash drives that includes the aforementioned content may be Test Case 2 below.

[0089] Test Case 2

[0090] {

[0091] "Use Case ID": "MULTI_USB_ATK_001",

[0092] "Input combination": [

[0093] {"Modal Type":"U disk file","Path":" / usb / storage / malicious.sh","Action":"Auto-identify"}

[0094] {"Mode Type":"USB Keyboard","Key":"Win+X","Function":"System Settings Wake-up, Automatically Execute Files"}

[0095] {"modal type":"voice","command":"confirm operation"} ]

[0097] "Execution order": "The electronic device first identifies the USB flash drive file with the path " / usb / storage / malicious.sh". The electronic device then simulates a USB keyboard to input the shortcut key "Win+X". The shortcut key "Win+X" triggers the electronic device to execute the USB flash drive file with the path " / usb / storage / malicious.sh". The electronic device then displays a prompt message asking whether to confirm the execution. The electronic device responds to the user's voice command of "Confirm operation".

[0098] "Type of abnormal execution": "External device command injection and privilege escalation",

[0099] "Preset execution condition": "The vehicle computer is in USB debugging mode and the USB flash drive is connected",

[0100] "Test Priority": "Highest",

[0101] "Expected safe execution result": "The electronic device cannot execute the USB file with the path " / usb / storage / malicious.sh""

[0102] }

[0103] In an embodiment of the present application, using a preset model to generate a second set of test cases can improve the efficiency of generating test cases, thereby improving the efficiency of penetration testing.

[0104] According to one embodiment of the present application, the second test case also includes a preset execution condition, which corresponds to the first information, and the preset execution condition includes the access of an external device; the electronic device system is tested according to the content of the collaborative attack operation corresponding to each test case, including: using a virtual Universal Serial Bus (USB) device injection technology to simulate the access of an external device to the electronic device so that the electronic device meets the preset execution condition; when the preset execution condition is met, the electronic device system is tested according to the content of the collaborative attack operation corresponding to each test case.

[0105] In one example, the external device may be a keyboard. Further, in one example, the USB device injection technology may be an Android Debug Bridge Key Event (ADB KEYEVENT) simulation technology.

[0106] In the embodiment of the present application, virtual USB device injection technology is used to simulate the connection of an external device to an electronic device, rather than a technician connecting the external device to the electronic device. This can achieve automated testing of hardware interface attacks and reduce manual dependence.

[0107] According to one embodiment of the present application, the second test case also includes a preset execution condition, which corresponds to the first information, and the preset execution condition includes the access of an external device; executing the content of the collaborative attack operation corresponding to each test case in the test case set includes: when it is detected that the electronic device meets the preset execution condition, executing the content of the collaborative attack operation corresponding to each second test case in the second test case set.

[0108] In one example, dynamic monitoring can be used to detect whether a physical external device is connected. For example, system call chain tracing can be used to detect the connection of an external device, real-time log analysis can be used to detect the connection of an external device, or the operating system can broadcast information indicating that an external device has been connected. In addition, other methods can be used to detect the connection of an external device, which will not be detailed here.

[0109] According to one embodiment of the present application, the second test case also includes a test priority; the second test case set includes a first test case subset and a second test case subset; the content of the collaborative attack operation included in the first test case in the first test case subset is related to the access of an external device; wherein the test priority is used to indicate the test order of the second test case, the test priority is positively correlated with the test order, and the test priority of the first test case subset is greater than that of the second test case subset.

[0110] The test priority is used to indicate the test order of the second test case. The positive correlation between the test priority and the test order means that the greater the test priority, the earlier the test order.

[0111] In an embodiment of the present application, the test priority of the first test case subset is higher than that of the second test case subset. By sorting the test order according to the test priority, excessive testing of unimportant functions can be avoided, thereby saving time and energy.

[0112] According to one embodiment of the present application, the test report includes: the content of the test case whose execution result is an abnormal execution result; wherein the content of the test case includes the content of the attack operations corresponding to multiple interaction modes, the execution order of the content of the attack operations corresponding to multiple interaction modes, the type of abnormal execution, preset execution conditions, test priority and at least one or more of the expected safe execution results; the type of abnormal execution is used to reflect the cause of the abnormal execution.

[0113] The following is an example of a test case format that includes the content of attack operations corresponding to multiple interaction modes, the execution order of the content of attack operations corresponding to multiple interaction modes, the type of abnormal execution, preset execution conditions, test priority, and expected safe execution results.

[0114] Taking the above test case 2 as an example, in the above test case 2, the case identifier (Identifier, ID) is used to distinguish different test cases, and the case identifier can be a custom string.

[0115] The coordinated attack operations in test case 2 are as follows: the USB flash drive attack involves the electronic device identifying the USB flash drive file at the path " / usb / storage / malicious.sh", the keyboard attack involves pressing the "Win+X" keys on a USB keyboard, and the voice attack involves issuing a voice command to confirm the operation. The execution sequence is as follows: the electronic device first identifies the USB flash drive file at the path " / usb / storage / malicious.sh", then simulates a USB keyboard input of the shortcut key "Win+X". This shortcut key "Win+X" triggers the electronic device to execute the USB flash drive file at the path " / usb / storage / malicious.sh". The electronic device then displays a prompt asking whether to confirm the execution and responds to the user's voice command "Confirm the operation". In this case, the abnormal execution type is external device command injection and privilege escalation. The default execution conditions are that the vehicle computer is in USB debugging mode and the USB flash drive is connected, giving the test the highest priority. The expected safe execution result is that the electronic device cannot execute the USB flash drive file at the path " / usb / storage / malicious.sh".

[0116] Test Case 3

[0117] {

[0118] "Use Case ID": "CASE_2025_ANR_001",

[0119] "Input combination": [

[0120] {"Modality Type":"Touch","Coordinates":"(200,400)","Action":"High-Frequency Click (10 times / second)"}

[0121] {"modal type":"voice","command":"switch to navigation mode"} ]

[0123] "Execution sequence": While frequently clicking at the coordinate position (200, 400) on the display screen of the electronic device, a voice command of "switch to navigation mode" is issued;

[0124] "Type of abnormal execution": "Main interface ANR crash",

[0125] "Preset execution condition": ";",

[0126] "Test Priority": "Urgent",

[0127] “Expected safety execution result”: “The electronic device calls the navigation application and displays the navigation interface within the preset time”

[0128] }

[0129] The content of the coordinated attack operation of test case 3 is: the content of the attack operation corresponding to touch is high-frequency clicking at the coordinate position (200,400) of the electronic device's display screen, and the content of the attack operation corresponding to voice is issuing a voice command of "switch to navigation mode". The execution order is: while clicking at the coordinate position (200,400) of the electronic device's display screen at high frequency, issue a voice command of "switch to navigation mode". The preset execution condition is none, and the type of abnormal execution is main interface ANR crash. The test priority is urgent. Main interface ANR crash means that the system desktop is stuck and cannot respond to user operations.

[0130] The coordinated attack operations included in Test Case 2 are related to external device access. Test Case 1 has the highest test priority, Test Case 3 has the emergency test priority, and Test Case 2 has a higher test order than Test Case 3.

[0131] In one example, the type of abnormal execution may include any one or more of an unresponsive application, system memory exhaustion, and a permissions conflict. A permissions conflict occurs when conflicting instructions are input into the electronic device's system, causing the system to be unable to determine which instruction to execute. In this case, some instructions may not execute properly.

[0132] For example, simulating high-frequency touch events (such as 10 clicks per second) to trigger UI thread blocking can cause the application to become unresponsive; system memory exhaustion, also known as memory leaks, and looping loading large USB video files can cause system memory exhaustion; for example, combining voice commands ("turn off safe mode") with shortcut key operations (force entry into the debugging interface) can lead to permission conflicts.

[0133] In an embodiment of the present application, the test report includes the content of the test case whose execution result is an abnormal execution result, which increases the transparency of the testing process. When the execution result is an abnormal execution, the technician can clearly understand the content and execution results of the collaborative attack operation, and even the type of abnormal execution, and make targeted improvements to the protection mechanism of the electronic device.

[0134] According to one embodiment of the present application, a test report is generated based on the execution result corresponding to each test case, including: if the execution result is an abnormal execution result, obtaining the content of the test case with the abnormal execution result; determining the test report; wherein the test report includes the content of the test case with the abnormal execution result.

[0135] According to one embodiment of the present application, a test report is generated based on the execution result corresponding to each test case, including: if the execution result is an abnormal execution result, obtaining the system log corresponding to the test case with the abnormal execution result; determining the test report based on the parsing result of the system log; wherein the test includes the parsing result and the content of the test case; the parsing result includes the type of abnormal execution, and the type of abnormal execution is used to reflect the cause of the abnormal execution.

[0136] A system log is a record of certain completed processes by an electronic device.

[0137] In the embodiment of the present application, the test report is determined by using the analysis results of the system log, which can quickly and accurately locate the problem and improve the test efficiency of the penetration test.

[0138] Figure 5 Shown is a flow chart of a penetration testing method provided by another exemplary embodiment of the present application. Figure 5 The method can be performed by an electronic device and a cloud platform, and the electronic device can be as follows Figure 1 The electronic device may include a test application, an execution framework, and an operating system. Figure 5 The embodiment is Figure 3 For the example of embodiment, in order to avoid repetition, the same points can be referred to the description in the above embodiment, which will not be repeated here. Figure 5 As shown, the penetration testing method may include the following steps.

[0139] 510: The test application obtains a test case set in response to the test operation.

[0140] 520: The test application sends a test case set to the execution framework

[0141] 530: The execution framework receives the test case set, tests the electronic device system according to the content of the coordinated attack operation corresponding to each test case, and obtains the execution result corresponding to each test case.

[0142] 540: When the execution framework tests the electronic device system according to the content of the coordinated attack operation corresponding to each test case, the operating system generates a system log and sends the system log to the execution framework.

[0143] 550: Detecting abnormal execution, sending a stack snapshot of the abnormally executed test case to the cloud platform; wherein the stack snapshot is the vehicle system log corresponding to the abnormally executed test case.

[0144] 560: The cloud platform receives a stack snapshot of the test case that was executed abnormally, and determines a parsing result of the execution exception based on the stack snapshot.

[0145] 570: The cloud platform sends the parsing results of the abnormally executed test case by executing the framework box test application.

[0146] The parsing result of the abnormally executed test case may include the above-mentioned abnormal execution type.

[0147] 570: The test application generates a test report based on the parsing results of the test case executed abnormally.

[0148] In one example, a test report includes analysis results and the test case content. The analysis results include the type of abnormal execution, which reflects the cause of the abnormal execution. This allows technicians to comprehensively analyze the cause of the abnormal execution by combining the abnormal execution type determined by the cloud platform with the abnormal execution type contained in the test case itself, thereby accurately establishing corresponding protection mechanisms.

[0149] According to one embodiment of the present application, the contents of attack operations corresponding to multiple interaction modes, the functions triggered after the contents of the attack operations are responded to, and the execution rules are obtained through reverse engineering; wherein the execution rules are used to simulate the process of responding to the contents of the attack operations and executing the corresponding functions; the contents of the collaborative attack operations corresponding to each test case in the test case set are executed, including: executing the contents of the collaborative attack operations corresponding to each test case in the test case set based on the execution rules.

[0150] It is understandable that the attack operation can also be referred to as an operation. In order to correspond to the technical terms above, the operation obtained through reverse engineering is called an attack operation.

[0151] The following describes how to use reverse engineering to obtain the attack operations corresponding to various interaction modes, the functions triggered after the attack operations are responded to, the execution rules, and the rules for generating test cases.

[0152] The following is an example of how to obtain the attack operation content corresponding to the voice input method, touch input method, and gesture input method through reverse engineering, as well as the functions triggered after the attack operation content is responded to and the execution rules.

[0153] For example, Figure 6 The figure shows a schematic diagram of a framework of reverse parsing content obtained by reverse engineering a voice input method provided by an exemplary embodiment of the present application. Figure 6 As shown:

[0154] Voice Input Parsing is the reverse engineering analysis of voice input methods.

[0155] Through API reverse engineering, we can obtain the application programming interface (API) of the voice input method and the rules for understanding the corresponding speech intent. The voice input API is a set of software interfaces used to implement human-computer voice input.

[0156] Through syntax tree construction, we can obtain rules for understanding the intention corresponding to speech. The rules for understanding the intention corresponding to speech can be syntax tree rules. The purpose of syntax tree rules is to understand the intention of speech and convert the instructions input by the user (such as natural language, programming code or voice commands) into a structured, executable logical representation so that the computer system can accurately understand and process it.

[0157] The execution rules of the voice input method are obtained through API reverse analysis and syntax tree construction. The execution rules of the voice input method are used to simulate the process of responding to the content of the voice input and executing the corresponding functions.

[0158] Sensitive Permission Tagging is used to determine the type of abnormal execution of voice input. The type of abnormal execution can reflect the reason why the voice input was not executed normally, which helps technicians locate the reason why the voice input was executed abnormally. For example, the type of abnormal execution may be that the voice input does not have the qualifications to trigger the use of a certain permission. For example, if the voice command is "Navigate to Tiananmen Square in Beijing", the sensitive permission is the positioning permission; if the voice command is "Modify memo", the sensitive permission is the write permission. The purpose of sensitive permission tagging is that if the execution result corresponding to the test case is abnormal execution, it will appear in the test report as the type of abnormal execution.

[0159] For example, Figure 7 FIG. 1 is a schematic diagram of a framework of reverse parsing content obtained by reverse engineering a touch input method, provided by an exemplary embodiment of the present application. Figure 7 As shown:

[0160] Touch input parsing is the reverse engineering analysis of touch input methods.

[0161] Touch track data is obtained through coordinate tracking. Touch track data is the raw information that records the user's finger or stylus input method on the display. Raw information can include touch coordinates and touch action type. Touch action type can be click, slide, long press, etc.

[0162] UI component mapping is used to determine the relationship between touch trajectory data and UI components on the interface. For example, the coordinates corresponding to a user's touch operation on the screen are (100, 200), the touch action type is click, and the coordinates are within the area of ​​the air conditioner temperature control.

[0163] The relationship between UI component mapping and triggered functions is obtained through Response Logic Modeling.

[0164] The touch input method's execution rules are derived through coordinate trajectory capture, UI component mapping, and response logic modeling. These rules link touch trajectory data, user interface (UI) component area information, and the functions corresponding to the touch trajectory data. These rules simulate the process of responding to touch input and executing the corresponding functions.

[0165] For example, Figure 8 The figure shows a schematic diagram of a framework of reverse parsing content obtained by reverse engineering a gesture input method provided by an exemplary embodiment of the present application. Figure 8 As shown:

[0166] Vision Input Parsing is the reverse engineering analysis of gesture input methods.

[0167] Gesture semantic decoding is used to obtain the correspondence between gesture operations and functions. Gesture semantics refers to the process of analyzing user gesture operations (such as sliding, long pressing, pinching, etc.), understanding their input method intentions and functional meanings, and mapping these actions to specific functions.

[0168] The gesture function binding whitelist is obtained through whitelist validation. The gesture function binding whitelist is a security and permission control mechanism used to clearly define a list of specific gestures that are allowed to trigger specific functions.

[0169] Through gesture semantic decoding and whitelist verification, the execution rules for the gesture input method are derived. These rules associate gesture operations, gesture semantics, and the corresponding functions. These rules simulate the process of responding to gesture input and executing the corresponding functions.

[0170] Unauthorized gestures that trigger vehicle control are detected through privilege escalation detection.

[0171] The abnormal execution category of gesture input is obtained through unauthorized behavior identification. If the execution result of the test case is abnormal, it will appear as the abnormal execution category of gesture input in the test report.

[0172] For example, Figure 9 The figure shows a schematic diagram of a framework of reverse parsing content obtained by reverse engineering a gesture input method provided by an exemplary embodiment of the present application. Figure 9 As shown:

[0173] USB Keyboard Parsing is to reverse engineer and analyze the USB keyboard input method.

[0174] The human interface device protocol is obtained through human interface device protocol decoding. The protocol is a standard protocol used for communication between electronic devices and USB keyboards.

[0175] System Command Injection Check (SCI) is used to identify rules for identifying unauthorized system-level commands. SCI is a security detection mechanism used to identify and prevent malicious users from entering key combinations to bypass the system's permission verification mechanism and execute unauthorized system-level commands.

[0176] The relationship between keyboard shortcuts and functions is obtained through shortcut mapping analysis.

[0177] Through HID protocol decoding, system command injection detection, and shortcut key mapping analysis, we identify the USB keyboard input execution rules. These rules associate USB keyboard input with functions. These rules simulate the process of responding to keyboard input and executing the corresponding function.

[0178] For example, Figure 10 The figure shows a schematic diagram of a framework of reverse parsing content obtained by reverse engineering the U disk input method provided by an exemplary embodiment of the present application. Figure 10 As shown:

[0179] USB Storage Parsing is to reverse engineer the USB input method.

[0180] File system analysis is used to obtain file operation rules. A file system is a structured method used by an operating system to manage data on storage devices (such as hard drives and USB flash drives). It defines the storage, naming, access, and organization rules for files. The file system can be a file allocation table (FAT). FAT32 refers to a disk file management method that uses a 32-bit binary number record in the file allocation table. The file system can also be a New Technology File System (NTFS).

[0181] The file type to be automatically played is detected through Autoplay Protocol Detection. For example, MP3 files can be automatically loaded after a USB flash drive is inserted.

[0182] Malicious file camouflage detection is used to obtain malicious file camouflage identification rules.

[0183] The USB input method's execution rules are derived through file system analysis, auto-play protocol detection, and malicious file disguise identification. These rules identify abnormal files and the protocol for playing them. These rules simulate the process of responding to input from a USB drive and executing the corresponding function.

[0184] The above describes how to use reverse engineering to obtain the attack operations corresponding to various interaction modes, the functions triggered after the attack operations are responded to, and the execution rules. The following describes the test case generation process.

[0185] The execution rules obtained through reverse engineering are stored in a database, which can be called the Input Protocol Feature Library. In this way, during the penetration testing phase of the electronic device, the electronic device can use the execution rules to simulate the content of the response attack operation and the process of executing the corresponding function.

[0186] The attack operations corresponding to the various interaction modes obtained through reverse engineering are stored in a database, which can be called an attack pattern database. Thus, the attack operations corresponding to the various interaction modes can be obtained from the attack pattern database and combined to generate test cases. Furthermore, in some embodiments, the abnormal execution types obtained through reverse engineering can be stored in the database. This allows test cases containing the abnormal execution types to be generated.

[0187] Furthermore, in one example, the attack operation corresponding to each interaction mode includes corresponding key parameters. For example, in Test Case 2 above, the attack operation corresponding to the USB flash drive includes the key parameters of "Mode Type: USB Flash Drive File", "Path: / usb / storage / malicious.sh", and "Action: Automatic Identification." The attack operation corresponding to the USB keyboard includes the key parameters of "Mode Type: USB Keyboard", "Key Content: Win+X", "Function: System Settings Wake-up", and "Automatic File Execution." The attack operation corresponding to voice includes the key parameters of "Mode Type: Voice" and "Command Content: Confirmation Operation." The attack operation corresponding to the USB keyboard, the USB flash drive, and the voice is combined to generate Test Case 2 above.

[0188] Next, we'll discuss test case generation strategies. One strategy involves generating test cases with a high probability of abnormal execution. Generating fewer test cases with a high probability of abnormal execution can improve penetration testing efficiency.

[0189] In one example, a test case with a high probability of generating abnormal execution can be used as a test case in the first test mode and set in a test application.

[0190] In one example, the multimodal interaction combination of this test case can be a combination of USB flash drive input and voice input, a combination of USB keyboard input and voice input, a combination of USB flash drive input and touch input, and a combination of gesture input and external device input. For example, the combination of USB flash drive input and voice input can be related to loading malformed audio from a USB flash drive and high-frequency voice wake-up commands; the combination of USB keyboard input and voice input can be related to waking up background services with USB keyboard shortcuts and executing high-privilege operations with voice commands; the combination of USB flash drive input and touch input can be related to triggering automatic video playback when a USB flash drive is inserted and causing memory out of bounds when fast-forwarding with touch.

[0191] Another test case generation strategy is to generate test cases related to the electronic device based on the information of the external device connected to the electronic device, and set the test priority of the test cases related to the electronic device to a high priority, such as the highest priority mentioned above. Further, in some embodiments, on the basis of generating test cases related to the electronic device based on the information of the external device connected to the electronic device, test cases related to the usage status of the application in the electronic device can also be generated based on the usage status of the application in the current electronic device. For example, the usage status of the application in the electronic device can be that the electronic device is navigating using a navigation application and playing a media file using a video application. The generated test case can be a test case related to injecting high-priority voice instructions during navigation or playing a media file. High-priority voice instructions are voice instructions that are given a higher priority under certain conditions.

[0192] Generating test cases related to the electronic device according to the information about the external device being connected to the electronic device may serve as a generation strategy for the test case set in the second test mode.

[0193] Exemplary devices

[0194] Figure 11 The figure shows a schematic diagram of the structure of a penetration testing device provided by an exemplary embodiment of the present application. Figure 11 As shown, the penetration testing device 1100 includes: an acquisition module 1101, a testing module 1102, and a generation module 1103. The acquisition module 1101 is used to obtain a test case set in response to a test operation; wherein the test case set includes multiple test cases, and the test cases include the content of coordinated attack operations corresponding to multiple interaction modes; the testing module 1102 is used to test the electronic device system according to the content of the coordinated attack operation corresponding to each test case, and obtain the execution result corresponding to each test case; the generation module 1103 is used to generate a test report based on the execution result corresponding to each test case.

[0195] An embodiment of the present application provides a penetration testing device. Since the test case includes the content of collaborative attack operations corresponding to multiple interaction modes, the electronic device can test the electronic device system according to the content of the collaborative attack operation corresponding to each test case to simulate the attacker's behavior of collaboratively launching an attack using two or more input methods, and obtain the attack result corresponding to the behavior of collaboratively launching an attack using two or more input methods, that is, the execution result, thereby achieving the purpose of performing penetration testing on the behavior of collaboratively launching an attack using two or more input methods.

[0196] According to one embodiment of the present application, an acquisition module 1101 is used to obtain a test case set in response to a test operation, including: determining a test mode under the current test in response to a test operation input by a user; when the test mode is a first test mode, obtaining a first test case set, and determining the first test case set as a test case set; wherein, the first test case set includes multiple first test cases, and the first test case includes the content of collaborative attack operations corresponding to multiple interaction modes; when the test mode is a second test mode, obtaining a second test case set, and determining the second test case set as a test case set; wherein, the second test case set includes multiple second test cases, and the second test case includes the content of collaborative attack operations corresponding to multiple interaction modes; the content of the collaborative attack operations corresponding to at least some of the second test cases is related to the access of external devices.

[0197] According to one embodiment of the present application, the acquisition module 1101 is used to obtain a second test case set when the test mode is the second test mode, including: obtaining first information when the test mode is the second test mode; wherein the first information includes external device access; inputting the first information into a preset model, and obtaining the second test case set using the preset model.

[0198] According to one embodiment of the present application, the second test case also includes a preset execution condition, which corresponds to the first information, and the preset execution condition includes the access of an external device; the electronic device system is tested according to the content of the collaborative attack operation corresponding to each test case, including: using virtual universal serial bus device injection technology to simulate the access of an external device to the electronic device so that the electronic device meets the preset execution condition; when the preset execution condition is met, the electronic device system is tested according to the content of the collaborative attack operation corresponding to each test case.

[0199] According to an embodiment of the present application, the second test case further includes a test priority; the second test case set includes a first test case subset and a second test case subset; the content of the coordinated attack operation included in the first test case in the first test case subset is related to external device access;

[0200] The test priority is used to indicate the test order of the second test case. The test priority is positively correlated with the test order. The test priority of the subset of the first test case is greater than that of the subset of the second test case.

[0201] According to an embodiment of the present application, the test report includes: the content of the test case whose execution result is an abnormal execution result;

[0202] Among them, the content of the test case includes the content of collaborative attack operations corresponding to multiple interaction modes, the content of attack operations corresponding to multiple interaction modes respectively, the type of abnormal execution, preset execution conditions and test priority, and at least one or more of the following; the type of abnormal execution is used to reflect the cause of the abnormal execution.

[0203] According to one embodiment of the present application, a generation module 1103 is used to obtain the content of the test case whose execution result is an abnormal execution result if the execution result is an abnormal execution result; determine a test report; wherein the test report includes the content of the test case whose execution result is an abnormal execution result.

[0204] According to one embodiment of the present application, a generation module 1103 is used to obtain a system log corresponding to a test case whose execution result is an abnormal execution result if the execution result is an abnormal execution result; determine a test report based on the parsing result of the system log; wherein the test report includes the parsing result and the content of the test case; the parsing result includes the type of abnormal execution, and the type of abnormal execution is used to reflect the cause of the abnormal execution.

[0205] It should be understood that the operations and functions of the acquisition module 1101, the test module 1102, and the generation module 1103 in the above embodiment can refer to the above Figure 3 To avoid repetition, the description of the penetration testing method provided in the embodiment will not be repeated here.

[0206] Figure 12 Shown is a structural schematic diagram of an electronic device provided by an exemplary embodiment of the present application.

[0207] For example, Figure 12 As shown, the electronic device includes: a memory 1201 and a processor 1202, wherein the memory 1201 stores an executable program code 1203, and the processor 1201 is used to call and execute the executable program code 1203 to perform the penetration testing method provided in the embodiment of the present application.

[0208] In this embodiment, the electronic device can be divided into functional modules according to the above-described method example. For example, each functional module can be mapped to a specific function, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used.

[0209] In the case of dividing the functional modules into corresponding functional modules, the electronic device may include: a first acquisition module 1101, a second acquisition module 1102, and a generation module 1103. It should be noted that all relevant contents of the various steps involved in the above method embodiment can be referred to the functional description of the corresponding functional modules and will not be repeated here.

[0210] The electronic device provided in this embodiment is used to perform the above-mentioned penetration testing method, and thus can achieve the same effect as the above-mentioned implementation method.

[0211] In the case of an integrated unit, the electronic device may include a processing module and a storage module. The processing module may be used to control and manage the operation of the electronic device, and the storage module may be used to support the electronic device in executing mutual program codes and data.

[0212] The processing module may be a processor or controller that implements or executes various exemplary logic blocks, modules, and circuits disclosed herein. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processing system (DSP) and a microprocessor, and the storage module may be a memory.

[0213] This embodiment also provides a computer-readable storage medium, which stores computer program code (including but not limited to disk storage, CD-ROM, optical storage, etc.). When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a penetration testing method provided by the above-mentioned embodiment.

[0214] This embodiment also provides a vehicle, including: a vehicle computer, the vehicle computer including a processor and a memory for storing processor executable instructions, wherein the processor is used to execute the penetration testing method provided in the embodiment of the present application.

[0215] This embodiment also provides a computer program product. When the computer program product is executed on a computer, it enables the computer to execute the above-mentioned related steps to implement a penetration testing method provided by the above embodiment.

[0216] Among them, the beneficial effects of the above embodiments can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0217] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0218] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection 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.

[0219] In the description of the present disclosure, it should be understood that the directions or positional relationships indicated by the terms "upper", "lower", "front", "back", "left" and "right" are based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the positions or elements referred to must have a specific direction, be constructed and operate in a specific direction, and therefore should not be understood as limiting the present disclosure. It should be noted that, in this document, relational terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, product or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of further limitations, the elements defined by the phrase "comprising a..." do not exclude the presence of other identical elements in the process, method, product or device comprising the elements.

[0220] The above are merely examples of the present disclosure and are not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

Claims

1. A penetration testing method, characterized in that: include: In response to the test operation, a test case set is obtained; wherein the test case set includes multiple test cases, and the test cases include content of collaborative attack operations corresponding to multiple interaction modes; Testing the electronic device system according to the content of the coordinated attack operation corresponding to each test case, and obtaining an execution result corresponding to each test case; A test report is generated based on the execution results corresponding to each of the test cases.

2. The penetration testing method according to claim 1, wherein: The step of obtaining a test case set in response to the test operation includes: In response to a test operation input by a user, determining a test mode under a current test; When the test mode is the first test mode, obtaining a first test case set and determining the first test case set as a test case set; wherein the first test case set includes a plurality of first test cases, and the first test cases include content of collaborative attack operations corresponding to a plurality of interaction modes; When the test mode is the second test mode, a second test case set is obtained, and the second test case set is determined as a test case set; wherein, the second test case set includes multiple second test cases, and the second test cases include the content of collaborative attack operations corresponding to multiple interaction modes; at least part of the content of the collaborative attack operations corresponding to the second test cases is related to the access of external devices.

3. The penetration testing method according to claim 2, wherein: When the test mode is the second test mode, obtaining a second test case set includes: When the test mode is the second test mode, obtaining first information; wherein the first information includes external device access; The first information is input into a preset model, and a second test case set is obtained using the preset model.

4. The penetration testing method according to claim 3, wherein: The second test case further includes a preset execution condition, the preset execution condition corresponds to the first information, and the preset execution condition includes external device access; Testing the electronic device system according to the content of the coordinated attack operation corresponding to each test case, including: Using virtual universal serial bus device injection technology to simulate the external device being connected to the electronic device, so that the electronic device meets the preset execution conditions; When the preset execution conditions are met, the electronic device system is tested according to the content of the coordinated attack operation corresponding to each test case.

5. The penetration testing method according to any one of claims 2 to 4, characterized in that: The second test case further includes a test priority; the second test case set includes a first test case subset and a second test case subset; the content of the coordinated attack operation included in the first test case in the first test case subset is related to external device access; The test priority is used to indicate the test order of the second test case, the test priority is positively correlated with the test order, and the test priority of the subset of the first test case is greater than that of the subset of the second test case.

6. The penetration testing method according to any one of claims 1 to 3, characterized in that: The test report includes: the content of the test case whose execution result is an abnormal execution result; Among them, the content of the test case includes at least one or more of the content of the attack operations corresponding to multiple interaction modes, the execution order of the content of the attack operations corresponding to multiple interaction modes, the type of abnormal execution, preset execution conditions, test priority and expected safe execution results; the type of abnormal execution is used to reflect the cause of the abnormal execution.

7. The penetration testing method according to claim 6, wherein: Generating a test report based on the execution result corresponding to each test case includes: If the execution result is an abnormal execution result, obtaining the content of the test case whose execution result is the abnormal execution result; Determine a test report; wherein the test report includes the content of the test case whose execution result is an abnormal execution result.

8. The penetration testing method according to claim 6, wherein: Generating a test report based on the execution result corresponding to each test case includes: If the execution result is an abnormal execution result, obtaining the system log corresponding to the test case whose execution result is the abnormal execution result; A test report is determined based on the parsing result of the system log; wherein the test report includes the parsing result and the content of the test case; the parsing result includes the type of abnormal execution, and the type of abnormal execution is used to reflect the cause of the abnormal execution.

9. A penetration testing device, characterized in that: The device comprises: An acquisition module is configured to acquire a test case set in response to a test operation; wherein the test case set includes a plurality of test cases, and the test cases include contents of collaborative attack operations corresponding to a plurality of interaction modes; A testing module is used to test the electronic device system according to the content of the coordinated attack operation corresponding to each test case, and obtain the execution result corresponding to each test case; The generation module is used to generate a test report based on the execution results corresponding to each test case.

10. A vehicle, characterized in that: include: A vehicle computer, comprising a processor and a memory for storing instructions executable by the processor, The processor is configured to execute the penetration testing method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Method and device for identifying and positioning multi-modal large-model vehicle touch test keys

    CN121541817A