Method, system and terminal equipment of layer-by-layer clamping variable positioning
A positioning method and pinching technology, applied in instruments, error detection/correction, calculation, etc., can solve the problems of difficult code location, difficulty in accurately locating the tampered position of variables, etc., and achieve a simple and easy-to-implement implementation and calling process. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0029] This embodiment provides a layer-by-layer clamping type variable positioning method, which is applied to any terminal device that can run an operating system and software program (for example, a mobile terminal such as a mobile phone, a tablet computer, a personal digital assistant, a notebook computer, and a smart bracelet) , PC (Personal Computer) client, test equipment, smart home equipment, etc.), mainly used to accurately locate the specific location of tampered variables in software programs.
[0030] In specific applications, the problem of variable tampering is usually caused by memory overflow.
[0031] In an embodiment, the executable operating system of the terminal device includes an embedded system (Embedded system).
[0032] like figure 1 As shown, the layer-by-layer clamping variable positioning method provided in this embodiment includes:
[0033] Step S100, defining a global pointer pointing to the target variable and a global variable for backing up ...
Embodiment 2
[0050] like figure 2 As shown, in this embodiment, step S100 in Embodiment 1 includes:
[0051] Step S201, defining a global pointer; wherein, the global pointer is of the same type as the target variable.
[0052] In a specific application, the tracking of the target variable can be realized by defining a global pointer to the target variable.
[0053] Step S202, defining a global variable; wherein, the global variable is of the same type as the target variable.
[0054] In a specific application, by defining a global variable for backing up the original value of the target variable, the tracking and monitoring of the current value of the target variable can be realized, so as to judge whether the current value of the target variable has changed through the global variable. When the current value is not equal to its original value, it is determined that the target variable has been tampered with.
[0055] In a specific application, the type of the target variable can be a...
Embodiment 3
[0085] like Figure 4 As shown, in this embodiment, based on the method steps in Embodiment 1 or 2, step S101 includes:
[0086] Step S1011, inserting debugging code in at least one position in the first-level code path of the target variable, so as to revise the first-level code path, and recompile the debugging code to run;
[0087] Wherein, the at least one position includes before or after the sub-function call position, before or after the suspicious code line, and the monitoring and debugging function has an entry parameter, and the entry parameter includes at least a unique position identification string, and the unique position The identification string is used to identify the position where the debugging code is inserted.
[0088] In a specific application, from the original assignment of the target variable to at least one of the first-level code paths where the target variable is found to be tampered with, the debugging code is inserted in a forced manner, that is,...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


