Книга: Practical Malware Analysis: The Hands-On Guide to Dissecting Malicious Software
Назад: Obscuring Flow Control
Дальше: Conclusion

, the column on the far left is the standard IDA Pro line prefix, which contains the segment name and memory address for each function. The next column to the right displays the stack pointer. For each instruction, the stack pointer column shows the value of the ESP register relative to where it was at the beginning of the function. This view shows that this function is an ESP-based stack frame rather than an EBP-based one, like most functions. (This stack pointer column can be enabled in IDA Pro through the Options menu.)

At , the stack pointer begins to be shown as a negative number. This should never happen for an ordinary function because it means that this function could damage the calling function’s stack frame. In this listing, IDA Pro is also telling us that it thinks this function takes 62 arguments, of which it thinks 2 are actually being used.

, the instruction cmp esp, 1000h will always produce a fixed result. An experienced malware analyst might recognize that the lowest memory page in a Windows process would not be used as a stack, and thus this comparison is virtually guaranteed to always result in the “greater-than-or-equal-to” , it may prove more fruitful to patch the stack-frame manipulation instructions, as in the previous examples.

Назад: Obscuring Flow Control
Дальше: Conclusion

sss
sss

© RuTLib.com 2015-2018