| 查看: 220 | 回复: 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 ] |
» 猜你喜欢
依托企业入选了国家启明计划青年人才。有无高校可以引进的。
已经有5人回复
博士延得我,科研能力直往上蹿
已经有9人回复
遇见不省心的家人很难过
已经有23人回复
天津大学招2026.09的博士生,欢迎大家推荐交流(博导是本人)
已经有6人回复
AI 太可怕了,写基金时,提出想法,直接生成的文字比自己想得深远,还有科学性
已经有6人回复
有院领导为了换新车,用横向课题经费买了俩车
已经有9人回复
酰胺脱乙酰基
已经有13人回复
同年申请2项不同项目,第1个项目里不写第2个项目的信息,可以吗
已经有4人回复
有时候真觉得大城市人没有县城人甚至个体户幸福
已经有10人回复













WORD,pFrame
回复此楼