Code instrumentation detection method and device, equipment and medium
A technology of code instrumentation and detection methods, which is applied in the field of program analysis and can solve problems such as heavy workload and errors
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] This embodiment provides a code instrumentation detection method, which aims to parse the DEX file in the APK to obtain the function instruction length in the DEX file. After running the APK, obtain the function instruction length in the DEX file again, and compare the function instructions Length, judge whether the code is instrumented, so as to realize code instrumentation detection.
[0039] Based on the above principles, the code instrumentation detection method is introduced, such as figure 1 As shown, the code instrumentation detection method specifically includes the following steps:
[0040] Obtain the DEX file in the APK, parse the DEX file, and obtain the original function instruction length of the DEX file;
[0041] Run the APK to obtain the memory address of the DEX file;
[0042] Obtaining a function offset value, and obtaining the target function instruction length according to the memory address of the DEX file and the function offset value;
[0043] The length of...
Embodiment 2
[0066] This embodiment discloses a code instrumentation detection device corresponding to the code instrumentation detection method of embodiment 1, which is a virtual structure device, such as figure 2 Shown, including:
[0067] The DEX parsing module 210 is configured to obtain the DEX file in the APK, parse the DEX file, and obtain the original function instruction length of the DEX file;
[0068] The memory address obtaining module 220 is configured to run the APK and obtain the memory address of the DEX file;
[0069] The function length calculation module 230 is configured to obtain a function offset value, and obtain the target function instruction length according to the memory address of the DEX file and the function offset value;
[0070] The comparison output module 240 is configured to compare the length of the original function instruction and the length of the target function instruction, and output the instrumentation detection result.
[0071] The above-mentioned DEX pa...
Embodiment 3
[0079] image 3 This is a schematic structural diagram of an electronic device provided in Embodiment 3 of the present invention, such as image 3 As shown, the electronic device includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of processors 310 in the computer device may be one or more, image 3 Take a processor 310 as an example; the processor 310, the memory 320, the input device 330, and the output device 340 in the electronic device may be connected by a bus or other means, image 3 Take the bus connection as an example.
[0080] As a computer-readable storage medium, the memory 320 can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the code instrumentation detection method in the embodiment of the present invention (for example, a code instrumentation detection device). The DEX analysis module 210, the memory address acquisition module 220...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


