| 查看: 234 | 回复: 0 | |||
| 当前主题已经存档。 | |||
sdlj8051金虫 (著名写手)
|
[交流]
[转贴]用单步跟踪Anti-Debugger
|
||
|
在调试器中,拙劣的debugger是用0xcc 来跟踪代码,但od就是用标志位进行单步跟踪,简单的说就是把TF置位,如果我们有自己的单步跟踪代码,od如果同时也跟踪了,就会“无视”我们自己的代码....达到anti的目的 代码如下: ;===============================cut============================== ;Author:Comic.Liu .386 .model flat,stdcall option casemap :none include windows.inc include user32.inc includelib user32.lib include kernel32.inc includelib kernel32.lib .const .data szT db 'Title',0 szM db 'You Are Passed',0 .code SEH proc pExcept WORD,pFrame WORD,pContext WORD,pDispatch WORDpushad assume esi:ptr EXEPTION_RECORD,edi:ptr CONTEXT mov esi,[pExcept] mov edi,[pContext] mov ebx,[edi].regEip inc ebx cmp byte ptr[ebx],0 org $-1 popfd jz fin or [edi].regFlag,100h jmp fin1 fin: inc [edi].regEip fin1: popad mov eax,ExceptionContinueExecution ret SEH endp start: assume fs:nothing push offset SEH push fs:[0] mov fs:[0],esp pushfd pushfd or dword ptr[esp],100h popfd ;进入这一段代码就翘翘了 nop ret ;=======End============ ;不过可以用OD里的F4直接跳过上面那一段,到下面 popfd invoke MessageBox,NULL,offset szM,offset szT,NULL pop fs:[0] add esp,4 invoke ExitProcess,0 end start ;==========================finish=========================== 程序在nop处以Single Step事件进入seh 在seh里面,修改eip跳过代码:ret 如果od跟踪,就截断了single step,seh就不会运行了,然后就出错 [ Last edited by sdlj8051 on 2006-10-6 at 11:26 ] |
» 猜你喜欢
一志愿华南理工大学331分材料求调剂
已经有11人回复
271求调剂
已经有40人回复
求调剂学校
已经有3人回复
332求调剂
已经有15人回复
297求调剂
已经有25人回复
本科西工大 324求调剂
已经有5人回复
297工科调剂?
已经有7人回复
调剂
已经有11人回复
08工学 309分求调剂
已经有7人回复
各位老师好,求调剂,本科211,一志愿天津大学生物与医药学硕,差两名录取。
已经有9人回复














WORD,pFrame
回复此楼