Vehicle remote compliance testing method, apparatus, device, and medium
By reverse engineering the vehicle terminal CPU architecture and using compliance testing tools to generate test logs, the problem of daemon process interference was solved, and efficient vehicle compliance testing was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU MAITANG TECH CO LTD
- Filing Date
- 2022-10-20
- Publication Date
- 2026-06-23
Smart Images

Figure CN115599675B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle network security technology, and in particular to methods, devices, equipment and media for remote compliance testing of vehicles. Background Technology
[0002] During compliance testing of vehicles, testers often need to perform reverse engineering and dynamic debugging of key software. However, due to the presence of daemons, dynamic debugging can cause programs to malfunction. When the daemon receives a program error, the device automatically restarts, causing significant problems for testers. In research on debugging and analyzing connected vehicle devices, to address the aforementioned daemon issue, testers typically bypass the daemon by obtaining and simulating the firmware to achieve their debugging and analysis goals. In the connected vehicle environment, developers can achieve this by forcibly disabling the daemon and then remotely debugging the software. However, testers, unaware of the daemon, must manually locate and disable it. While emulated firmware can effectively solve the problems caused by daemon processes, there are still many undesirable aspects. Generally, Linux contains a large number of programs, and searching for them one by one is time-consuming and ineffective. When using a debugger, acquiring and sending data for each transmission requires setting breakpoints to capture data before continuing to send. During this process, the program may have already sent dozens of data packets, making manual acquisition extremely time-consuming and inefficient, and it cannot accurately analyze the time intervals between sent data. If compliant testers attempt to delete each process and then test whether a daemon process has been deleted, this process is also very time-consuming, and deleting the wrong program may cause the device to restart, which also poses a significant challenge for testers.
[0003] In conclusion, improving the efficiency of vehicle compliance testing is a problem that needs to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for remote vehicle compliance testing, which can improve the efficiency of vehicle compliance testing. The specific solution is as follows:
[0005] Firstly, this application discloses a method for remote compliance testing of vehicles, including:
[0006] The CPU architecture of the target vehicle terminal is reverse engineered to determine the program to be tested, and the compliance testing tools are then transmitted to the target vehicle terminal.
[0007] The program to be tested is injected into the compliance testing tool, and then the compliance testing tool is started to generate test logs;
[0008] Obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
[0009] Optionally, before transmitting the compliance testing tool to the target vehicle terminal, the method further includes:
[0010] When the preset command interface receives a vehicle control command, the strace tracker records the interaction data corresponding to the vehicle control command.
[0011] Based on the interaction data, and using the testing framework to write test code, a compliance testing tool is obtained.
[0012] Optionally, the step of using a testing framework to write test code to obtain compliance testing tools includes:
[0013] The mmap function is called to create a memory space, and the interactive data is written into the data space within the memory space.
[0014] Test code is written using a testing framework and written into the code space in the memory space to obtain a compliance testing tool.
[0015] Optionally, launching the compliance testing tool to generate test logs includes:
[0016] The compliance testing tool is launched, and the program counter in the program to be tested is set to the test code in the compliance testing tool via the PTRACE process, so that the compliance testing tool runs the test code and generates test logs.
[0017] Optionally, before setting the program counter in the program under test to point to the test code in the compliance testing tool via the PTRACE process, the method further includes:
[0018] The SO library address is queried, and the mmap function address is queried through the SO library address. Then, the actual address of the mmap function in the loader is calculated using the SO library address and the mmap function address.
[0019] The address of the program counter in the program under test is determined by the actual address of the mmap function in the loader, so that the program counter can be pointed to the test code in the compliance testing tool through the PTRACE process.
[0020] Optionally, launching the compliance testing tool to generate test logs includes:
[0021] The compliance testing tool is activated to monitor the test data and test behaviors generated by the target vehicle, and to generate test logs using the test data and test behaviors.
[0022] Optionally, before monitoring the test data and test behavior generated by the target vehicle through the compliance testing tool, the method further includes:
[0023] The PTRACE process transforms the relationship between the compliance testing tool and the program under test into a parent-child relationship, enabling the compliance testing tool to monitor the test data and test behavior generated by the target vehicle.
[0024] Secondly, this application discloses a remote compliance testing device for vehicles, comprising:
[0025] The test tool input module is used to reverse analyze the CPU architecture of the target vehicle terminal to determine the program to be tested, and to input the compliance test tool into the target vehicle terminal.
[0026] The test tool startup module is used to inject the program to be tested into the compliance test tool, and then start the compliance test tool to generate test logs;
[0027] The test report generation module is used to obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
[0028] Thirdly, this application discloses an electronic device, including:
[0029] Memory, used to store computer programs;
[0030] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed method for remote vehicle compliance testing.
[0031] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed remote vehicle compliance testing method.
[0032] As can be seen, this application reverse-engineers the CPU architecture of the target vehicle terminal to determine the program to be tested, and then transmits the compliance testing tool to the target vehicle terminal; injects the program to be tested into the compliance testing tool, and then starts the compliance testing tool to generate test logs; obtains the request logs sent by the server in the compliance testing tool, and sends the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs. Therefore, this application determines the program to be tested by reverse-engineering the CPU architecture of the target vehicle terminal, injects the program to be tested into the compliance testing tool, generates test logs after starting the compliance testing tool, and the server generates the test tool based on the test logs. Because this process does not involve daemon processes, it has no impact on daemon processes, thus avoiding the impact of daemon processes on testing. Furthermore, because this application does not require time to obtain firmware or time for firmware emulation, testing efficiency is improved. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0034] Figure 1 This application discloses a flowchart of a remote compliance testing method for vehicles.
[0035] Figure 2 This is an architecture diagram of a specific compliance testing tool disclosed in this application;
[0036] Figure 3 This application discloses a flowchart of a specific method for remote compliance testing of vehicles.
[0037] Figure 4 This is a schematic diagram of the structure of a vehicle remote compliance testing device disclosed in this application;
[0038] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0040] During compliance testing of vehicles, testers often need to perform reverse engineering and dynamic debugging of key software. However, due to the presence of daemons, dynamic debugging can cause programs to malfunction. When the daemon receives a program error, the device automatically restarts, causing significant problems for testers. In research on debugging and analyzing connected vehicle devices, to address the aforementioned daemon issue, testers typically bypass the daemon by obtaining and simulating the firmware to achieve their debugging and analysis goals. In the connected vehicle environment, developers can achieve this by forcibly disabling the daemon and then remotely debugging the software. However, testers, unaware of the daemon, must manually locate and disable it. While emulated firmware can effectively solve the problems caused by daemon processes, there are still many undesirable aspects. Generally, Linux contains a large number of programs, and searching for them one by one is time-consuming and ineffective. When using a debugger, acquiring and sending data for each transmission requires setting breakpoints to capture data before continuing to send. During this process, the program may have already sent dozens of data packets, making manual acquisition extremely time-consuming and inefficient, and it cannot accurately analyze the time intervals between sent data. If compliant testers attempt to delete each process and then test whether a daemon process has been deleted, this process is also very time-consuming, and deleting the wrong program may cause the device to restart, which also poses a significant challenge for testers.
[0041] Therefore, this application provides a remote vehicle compliance testing solution that can improve the efficiency of vehicle compliance testing.
[0042] See Figure 1 As shown in the figure, this application discloses a method for remote compliance testing of vehicles, including:
[0043] Step S11: Reverse engineer the CPU architecture of the target vehicle terminal to determine the program to be tested, and transmit the compliance testing tool to the target vehicle terminal.
[0044] It is understood that in this embodiment, reverse analysis refers to software reverse analysis, which means starting from a runnable program system and using various computer technologies such as decryption, disassembly, system analysis, and program understanding to reverse disassemble and analyze the structure, process, algorithm, code, etc. of the software to deduce the source code, design principles, structure, algorithm, processing procedure, running method, and related documents of the software product.
[0045] In this embodiment, before transmitting the compliance testing tool to the target vehicle terminal, the process further includes: when the preset command interface receives a vehicle control command, the strace tracker records the interaction data corresponding to the vehicle control command; based on the interaction data, test code is written using a testing framework to obtain the compliance testing tool. The remote terminal's CPU (central processing unit) architecture is examined to determine the program requiring process injection, i.e., the program to be tested. The tester sends a vehicle control command to the preset command interface, and the strace tracker records the data sent each time. The tester obtains the interaction data and, based on the interaction data, writes test code using a testing framework.
[0046] In this embodiment, the step of using a testing framework to write test code to obtain a compliance testing tool includes: calling the mmap function to create a memory space and writing the interaction data into the data space within the memory space; and using the testing framework to write test code and writing the test code into the code space within the memory space to obtain a compliance testing tool. The mmap function is called to create a memory space and obtain space address a3, which is used by the tester. The tester writes the data to be tested into this memory space, that is, writes the interaction data into the data space a3 within the memory space, and writes the test code into the code space a3+N within this memory space. It should be noted that N can be any number, but it does not overlap with the data space.
[0047] Step S12: Inject the program to be tested into the compliance testing tool, and then start the compliance testing tool to generate test logs.
[0048] In this embodiment, starting the compliance testing tool to generate test logs includes: starting the compliance testing tool and using the PTRACE process to point the program counter in the program under test to the test code in the compliance testing tool, so that the compliance testing tool runs the test code and generates test logs. The program counter is then pointed to the test code in code space a3+N using ptrace, and the compliance testing tool will automatically run the test code to achieve the testing purpose. After the test is completed, the environment will be restored to its original state. A static program is compiled, placed into the target vehicle terminal, and run to achieve compliance testing based on static program hooking.
[0049] In this embodiment, before the PTRACE process points the program counter in the program under test to the test code in the compliance testing tool, the method further includes: querying the SO library address, querying the mmap function address using the SO library address, and then calculating the actual address of the mmap function in the loader using the SO library address and the mmap function address; using the actual address of the mmap function in the loader to determine the address of the program counter in the program under test, so that the PTRACE process points the program counter to the test code in the compliance testing tool. Specifically, by querying / proc / {pid} / maps to find the SO library address a1, and then querying the mmap function address a2 using the SO library, the actual address a1+a2 of the mmap function in the loader is calculated. Finally, PTRACE modifies the program counter in the process under test to the address a1+a2 of the mmap function.
[0050] Step S13: Obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
[0051] In this embodiment, the architecture diagram of the compliance testing tool is as follows: Figure 2 As shown, it is mainly divided into two parts: client and server. The client mainly consists of three parts: compliance testing program, process injection program, logging program, and service processing program. The server includes test data processing and test report generation. The inspection items in compliance testing can include: checking whether the remote communication terminal prevents traffic replay attacks, checking reliability, checking whether the device files in the remote communication terminal can prevent data replay attacks, checking reliability, checking whether the remote communication terminal has memory security issues, checking availability, and checking whether the communication of the remote communication terminal is encrypted. The inspection items, inspection rules, and judgment criteria are shown in the table below:
[0052] Table 1
[0053]
[0054] As can be seen, this application reverse-engineers the CPU architecture of the target vehicle terminal to determine the program to be tested, and then transmits the compliance testing tool to the target vehicle terminal; injects the program to be tested into the compliance testing tool, and then starts the compliance testing tool to generate test logs; obtains the request logs sent by the server in the compliance testing tool, and sends the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs. Therefore, this application determines the program to be tested by reverse-engineering the CPU architecture of the target vehicle terminal, injects the program to be tested into the compliance testing tool, generates test logs after starting the compliance testing tool, and the server generates the test tool based on the test logs. Because this process does not involve daemon processes, it has no impact on daemon processes, thus avoiding the impact of daemon processes on testing. Furthermore, because this application does not require time to obtain firmware or time for firmware emulation, testing efficiency is improved.
[0055] See Figure 3 As shown in the figure, this application discloses a specific method for remote compliance testing of vehicles, including:
[0056] Step S21: Reverse engineer the CPU architecture of the target vehicle terminal to determine the program to be tested, and transmit the compliance testing tool to the target vehicle terminal.
[0057] Step S22: Inject the program to be tested into the compliance testing tool, start the compliance testing tool, so as to monitor the test data and test behavior generated by the target vehicle through the compliance testing tool, and generate test logs using the test data and test behavior.
[0058] In this embodiment, before monitoring the test data and test behavior generated by the target vehicle through the compliance testing tool, the method further includes: converting the relationship between the compliance testing tool and the program under test into a parent-child relationship through the PTRACE process, so that the test data and test behavior generated by the target vehicle can be monitored through the compliance testing tool. For example, the detection item is to test whether the remote communication terminal MCU has anti-replay attack capabilities. Observe the car; if the car repeatedly performs cloud-controlled actions, such as opening and closing the car door, it indicates that the MCU (microcontroller unit) has no anti-replay attack capability.
[0059] Step S23: Obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
[0060] Therefore, the compliance testing tool of this application performs compliance testing on the program to be tested on the target vehicle terminal. This process does not involve the daemon process, that is, it has no impact on the daemon process, thus avoiding the impact of the daemon process on the test. Furthermore, since this application does not require the time to obtain firmware and the time to simulate firmware, the testing efficiency is improved.
[0061] See Figure 4 As shown in the figure, this application discloses a vehicle remote compliance testing device, including:
[0062] The test tool input module 11 is used to reverse analyze the CPU architecture of the target vehicle terminal to determine the program to be tested and to input the compliance test tool to the target vehicle terminal.
[0063] The test tool startup module 12 is used to inject the program to be tested into the compliance test tool, and then start the compliance test tool to generate test logs;
[0064] The test report generation module 13 is used to obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
[0065] As can be seen, this application reverse-engineers the CPU architecture of the target vehicle terminal to determine the program to be tested, and then transmits the compliance testing tool to the target vehicle terminal; injects the program to be tested into the compliance testing tool, and then starts the compliance testing tool to generate test logs; obtains the request logs sent by the server in the compliance testing tool, and sends the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs. Therefore, this application determines the program to be tested by reverse-engineering the CPU architecture of the target vehicle terminal, injects the program to be tested into the compliance testing tool, generates test logs after starting the compliance testing tool, and the server generates the test tool based on the test logs. Because this process does not involve daemon processes, it has no impact on daemon processes, thus avoiding the impact of daemon processes on testing. Furthermore, because this application does not require time to obtain firmware or time for firmware emulation, testing efficiency is improved.
[0066] In some specific embodiments, the vehicle remote compliance testing device further includes:
[0067] The test tool acquisition unit is used to record the interaction data corresponding to the vehicle control command when the preset command interface obtains the vehicle control command; based on the interaction data, test code is written using the test framework to obtain the compliance test tool.
[0068] In some specific embodiments, the test tool acquisition unit includes:
[0069] The compliance testing tool acquisition unit is used to call the mmap function to create a memory space and write the interaction data into the data space of the memory space; it also uses a testing framework to write test code and writes the test code into the code space of the memory space to obtain the compliance testing tool.
[0070] In some specific embodiments, the test tool startup module 12 includes:
[0071] The first test log generation unit is used to start the compliance testing tool and, through the PTRACE process, point the program counter in the program to be tested to the test code in the compliance testing tool, so that the compliance testing tool runs the test code and generates test logs.
[0072] In some specific embodiments, the vehicle remote compliance testing device further includes:
[0073] The address determination unit is used to query the SO library address, and then query the mmap function address through the SO library address. It then uses the SO library address and the mmap function address to calculate the actual address of the mmap function in the loader. Finally, it uses the actual address of the mmap function in the loader to determine the address of the program counter in the program to be tested, so that the PTRACE process can point the program counter to the test code in the compliance testing tool.
[0074] In some specific embodiments, the test tool startup module 12 includes:
[0075] The second test log generation unit is used to start the compliance testing tool so as to monitor the test data and test behavior generated by the target vehicle through the compliance testing tool, and generate test logs using the test data and test behavior.
[0076] In some specific embodiments, the vehicle remote compliance testing device further includes:
[0077] The monitoring unit is used to convert the relationship between the compliance testing tool and the program under test into a parent-child relationship through the PTRACE process, so as to monitor the test data and test behavior generated by the target vehicle through the compliance testing tool.
[0078] Furthermore, embodiments of this application also provide an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0079] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the following steps:
[0080] The CPU architecture of the target vehicle terminal is reverse engineered to determine the program to be tested, and the compliance testing tools are then transmitted to the target vehicle terminal.
[0081] The program to be tested is injected into the compliance testing tool, and then the compliance testing tool is started to generate test logs;
[0082] Obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
[0083] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0084] When the preset command interface receives a vehicle control command, the strace tracker records the interaction data corresponding to the vehicle control command.
[0085] Based on the interaction data, and using the testing framework to write test code, a compliance testing tool is obtained.
[0086] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0087] The mmap function is called to create a memory space, and the interactive data is written into the data space within the memory space.
[0088] Test code is written using a testing framework and written into the code space in the memory space to obtain a compliance testing tool.
[0089] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0090] The compliance testing tool is launched, and the program counter in the program to be tested is set to the test code in the compliance testing tool via the PTRACE process, so that the compliance testing tool runs the test code and generates test logs.
[0091] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0092] The SO library address is queried, and the mmap function address is queried through the SO library address. Then, the actual address of the mmap function in the loader is calculated using the SO library address and the mmap function address.
[0093] The address of the program counter in the program under test is determined by the actual address of the mmap function in the loader, so that the program counter can be pointed to the test code in the compliance testing tool through the PTRACE process.
[0094] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0095] The compliance testing tool is activated to monitor the test data and test behaviors generated by the target vehicle, and to generate test logs using the test data and test behaviors.
[0096] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:
[0097] The PTRACE process transforms the relationship between the compliance testing tool and the program under test into a parent-child relationship, enabling the compliance testing tool to monitor the test data and test behavior generated by the target vehicle.
[0098] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0099] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0100] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0101] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the remote vehicle compliance testing method executed by the electronic device as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0102] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the method steps disclosed in any of the foregoing embodiments that are executed during remote compliance testing of a vehicle.
[0103] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0104] The present invention provides a detailed description of a remote compliance testing method, apparatus, device, and medium for vehicles. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for remote compliance testing of vehicles, characterized in that, include: The CPU architecture of the target vehicle terminal is reverse engineered to determine the program to be tested, and the compliance testing tools are then transmitted to the target vehicle terminal. The program to be tested is injected into the compliance testing tool, and then the compliance testing tool is started to generate test logs; Obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs; Before transmitting the compliance testing tool to the target vehicle terminal, the process also includes: When the preset command interface receives a vehicle control command, the strace tracker records the interaction data corresponding to the vehicle control command; based on the interaction data, test code is written using a test framework to obtain a compliance testing tool; The method of using a testing framework to write test code to obtain compliance testing tools includes: The mmap function is called to create a memory space, and the interaction data is written into the data space of the memory space; test code is written using the test framework, and the test code is written into the code space of the memory space to obtain a compliance testing tool; The step of launching the compliance testing tool to generate test logs includes: The compliance testing tool is launched, and the program counter in the program to be tested is set to the test code in the compliance testing tool via the PTRACE process, so that the compliance testing tool runs the test code and generates test logs.
2. The vehicle remote compliance testing method according to claim 1, characterized in that, Before setting the program counter in the program under test to the test code in the compliance testing tool via the PTRACE process, the method further includes: The SO library address is queried, and the mmap function address is queried through the SO library address. Then, the actual address of the mmap function in the loader is calculated using the SO library address and the mmap function address. The address of the program counter in the program under test is determined by the actual address of the mmap function in the loader, so that the program counter can be pointed to the test code in the compliance testing tool through the PTRACE process.
3. The vehicle remote compliance testing method according to claim 1 or 2, characterized in that, The step of launching the compliance testing tool to generate test logs includes: The compliance testing tool is activated to monitor the test data and test behaviors generated by the target vehicle, and to generate test logs using the test data and test behaviors.
4. The vehicle remote compliance testing method according to claim 3, characterized in that, Before monitoring the test data and test behavior generated by the target vehicle through the compliance testing tool, the method further includes: The PTRACE process transforms the relationship between the compliance testing tool and the program under test into a parent-child relationship, enabling the compliance testing tool to monitor the test data and test behavior generated by the target vehicle.
5. A remote compliance testing device for vehicles, characterized in that, The steps for implementing the vehicle remote compliance testing method as described in any one of claims 1 to 4 include: The test tool input module is used to reverse analyze the CPU architecture of the target vehicle terminal to determine the program to be tested, and to input the compliance test tool into the target vehicle terminal. The test tool startup module is used to inject the program to be tested into the compliance test tool, and then start the compliance test tool to generate test logs; The test report generation module is used to obtain the request logs sent by the server in the compliance testing tool, and send the test logs to the server based on the request logs, so that the server can generate a test report based on the test logs.
6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the vehicle remote compliance testing method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when executed by a processor, the computer program implements the steps of the vehicle remote compliance testing method as described in any one of claims 1 to 4.