The present application belongs to the
network security technical field, especially a kind of Windowsx86 under the positioning and extraction method of
shellcode in stack space, comprising:
hooking system API function, after hitting, the function of being hooked is carried out stack
backtracking, every
backtracking one level stack frame, it is checked to the position that the return address of this level points to, see whether the position belongs to stack space, when checking that the return address of certain level points to stack space inside, address value is noted down, and the EBP value of the nearest level in address decreasing direction is noted down, then
backtracking one level obtains the EBP value of current stack frame;In order to further confirm the boundary of extraction;According to the boundary range determined, binary data is extracted, and binary data is identified as x86
assembly, and the real code will be contained therein.The present application can realize the positioning and extraction of
shellcode in an intuitive and fast way, and improve the accuracy of extraction.