我正在自学分析恶意软件,为了提高我对一些更常见的反调试技术的理解,我在程序集中编写了int 2d调试器检测概念。但是,当它到达int 2d时,程序将终止而不是跳过预期的操作码。这是我的代码:
include 'win32ax.inc'
.data
dbg db "Debugger!",0
nodbg db "No debugger!",0
.code
start:
xor eax,eax ;set the zero flag
int 2dh ;The debugger detection interupt
inc eax ;the instruction to be skipped during debugging
jnz notpresent ;the jump
invoke MessageBox,0,dbg,dbg,MB_OK ;Debugger detected!
jmp exit
notpresent:
invoke MessageBox,0,nodbg,nodbg,MB_OK ;No debugger detected!
exit:
invoke ExitProcess,0
.end start它应该做的是跳到MessageBox上说“没有调试器!”,相反,当它到达int 2d操作码时,即使没有调试,程序也会崩溃。有什么有用的建议吗?我做错了什么,该如何解决呢?我用的是平面汇编程序,如果这有帮助的话。
发布于 2014-06-19 08:32:42
如果没有附加调试器,int2dh将引发异常。所以你需要处理这个异常,否则你的程序就会崩溃。
您尝试过哪个调试器,因为他们中的许多人似乎无法正确处理该操作码,并且可能会崩溃或显示意外行为。
在这里可以找到一个代码示例和更多信息:OpenRCE调试器检测
https://stackoverflow.com/questions/24299536
复制相似问题