Книга: Practical Malware Analysis: The Hands-On Guide to Dissecting Malicious Software
Назад: Identifying Debugger Behavior
Дальше: Debugger Vulnerabilities

. TLS supports callback functions for initialization and termination of TLS data objects. Windows executes these functions before running code at the normal start of a program.

. All TLS callback functions have their labels prepended with TlsCallback. You can browse to the callback function in IDA Pro by double-clicking the function name.

.

, you learned how to set up an SEH to achieve an unconventional jump. The modification of the SEH chain applies to both anti-disassembly and anti-debugging. In this section, we will skip the SEH specifics (since they were addressed in ) and focus on other ways that exceptions can be used to hamper the malware analyst.

Exceptions can be used to disrupt or detect a debugger. Most exception-based detection relies on the fact that debuggers will trap the exception and not immediately pass it to the process being debugged for handling. The default setting on most debuggers is to trap exceptions and not pass them to the program. If the debugger doesn’t pass the exception to the process properly, that failure can be detected within the process exception-handling mechanism.

shows OllyDbg’s default settings; all exceptions will be trapped unless the box is checked. These options are accessed via OptionsDebugging OptionsExceptions.

shows assembly code that implements this technique. This example sets a new SEH and then calls INT 3 to force the code to continue.

sss
sss

© RuTLib.com 2015-2018