|
[原创]过TesSafe反WinDbg双机调试
好帖,要Mark一下。 我的理解是。 VirtualKD 对 KdCom.dll进行了patch,以适应自己的机制。 如果没有安装 VirtualKD ,用工具是可以看到IAT钩子的。 如果安装了 VirtualKD ,那么 TP对KdReceivePacket KdSendPacket,修改可能是无效的。(真双机调试,情况要另分析) |
|
|
|
手动脱壳进阶第六篇PE-SHiELD V0.25 中有一处不明,还望指教。
反复看了风雨的回复,其中一句话给我一点提示: “3 文章不知道,但关注下context结构,你就会找到答案 ” 星期天就以“context结构”为关键字,开始了寻找。有点了眉目,不知道理解是否正确,还望指教。 当发生异常时,系统调用异常处理函数,它有四个参数。 EXCEPTION_DISPOSITION __cdecl _except_handler( struct _EXCEPTION_RECORD *ExceptionRecord, void * EstablisherFrame, struct _CONTEXT *ContextRecord, void * DispatcherContext ); 当程序停在0040D4AC 时,即已经进入了异常处理函数,观查这时的栈。 异常处理函数声明为:__cdecl ,即右侧的函数先入栈, 栈的结构应该是: 0--------返回地址 4--------参数1 8--------参数2 C--------参数3 10--------参数4 而Context是参数3,所以应该是+C 下面是关于Context结构的说明 ============================= typedef struct _CONTEXT { DWORD ContextFlags;//0 DWORD Dr0;//1 DWORD Dr1;//2 DWORD Dr2;//3 DWORD Dr3;//4 DWORD Dr6;//5 DWORD Dr7;//6 FLOATING_SAVE_AREA FloatSave;//7-34 DWORD SegGs;//35 DWORD SegFs;//36 DWORD SegEs;//37 DWORD SegDs;//38 DWORD Edi;//39 DWORD Esi;//40 DWORD Ebx;//41 DWORD Edx;//42 DWORD Ecx;//43 DWORD Eax;//44 DWORD Ebp;//45 DWORD Eip;//46 DWORD SegCs;//47 DWORD EFlags;//48 DWORD Esp;//49 DWORD SegSs;//50 } CONTEXT; typedef struct _FLOATING_SAVE_AREA { DWORD ControlWord; //1 DWORD StatusWord; //2 DWORD TagWord; //3 DWORD ErrorOffset; //4 DWORD ErrorSelector; //5 DWORD DataOffset; //6 DWORD DataSelector; //7 BYTE RegisterArea[SIZE_OF_80387_REGISTERS]; //8-27 DWORD Cr0NpxState; //28 } FLOATING_SAVE_AREA; SIZE_OF_80387_REGISTERS equ 80 ============================= 第46个Dword是Eip,程序通过修改Context中的EIP,改变了异常处理结束之后的返回地址,让程序转向0040D4DB。 |
|
手动脱壳进阶第六篇PE-SHiELD V0.25 中有一处不明,还望指教。
谢谢 风随雨行。可能我对SEH了解不够,现在就去找答案,两天后必来结帖。 PS: 风随雨行:如果找不到答案,还请您多多帮忙。 |
|
手动脱壳进阶第六篇PE-SHiELD V0.25 中有一处不明,还望指教。
感谢两位的回答。但我还是不清楚,为什么程序会停在“40D4DB”。 如果说“EIP=40D4D7,EIP+4=40D4DB”是一个线索,我承认。 但无法说明为什么程序是停在“40D4DB”,这与我之前所知的SEH不符合啊! |
|
手动脱壳进阶第六篇PE-SHiELD V0.25 中有一处不明,还望指教。
先感谢“风随雨行 ” 确实如“风随雨行”所说,上面是截图。 “异常时EIP=40D4D7,EIP+4=40D4DB 所以40D4DB是“迷失在系统代码”后返回到用户代码的地方 ” 1.我在40D4D7下断后,发现并没有被断下来,也没有异常发生,程序直接跑飞了。 2.如果40D4D7处发生异常,按我的理解,应该是找SEH处理,而我并没有看到“40D4DB”在SEH处理链表中。 |
|
手动脱壳进阶第六篇PE-SHiELD V0.25 中有一处不明,还望指教。
可能是我没说清, 我是在“0040D4DB”这里下断点的 由于是花指令,所以我笼统地说了“0040D4D9” 下面是过程录像。 过程.rar ======================= 而且我也有一点不明白原文作者的意图: 一边说:“如果你执行这里的返回语句,将迷失在系统领空。” 另一边说:“在这里下断点吧。顺利到达后取消断点。”,为什么要在这里下断呢?很疑惑 |
|
|
|
[求助]这个情况专业术语叫什么?
坛主的回复总是这么及时,真是非常的感谢。 |
|
|
|
[求助]看了很多脱壳文章,高手们上来第一句就是,OD忽略所有异常。
谢谢看雪。我看了《加密与解密》,其中说了一些关于异常的问题。我心里有些疑问: 1。为什么程序单独运行时没有异常错误,而在调试时却常被OD停下了。 2。我已经忽略了所有异常了,为什么有些程序在OD调试时还会停在某些指令上。 ========================== 在论坛里看帖,好像经常不能融入高手的思路,不知道他们在说什么,只说一些过程。希望能把思路,想法写地细一点。 最后谢谢坛主。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值