|
[求助]Hook SwapContext 和 Hook FastCallEntry的问题
//SwapContext 关键代码 void CheckFuncEx(PETHREAD pTargetThead) { //ULONG uDealProcessor; IDTRINFO IdtInfo = {0}; ULONG uTempBase; PEPROCESS pTargetEProcess = (PEPROCESS)*(PULONG)((ULONG)pTargetThead + 0x44); PUCHAR pszTargetName = PsGetProcessImageFileName(pTargetEProcess); __asm sidt IdtInfo; uTempBase = MAKELONG(IdtInfo.lowBase,IdtInfo.highBase); if ( _stricmp((const char *)pszTargetName,"game.exe") == 0 ) { WirteHookFunc((PVOID)uTempBase); } else { WirteOriginalFunc((PVOID)uTempBase); } __asm lidt IdtInfo; } __declspec(naked) void __stdcall HookFunc_SwapContext() { __asm { pushfd; pushad; push esi; call CheckFuncEx; popad; popfd; mov dword ptr ds:[ebx+18h], eax; sti; mov eax,dword ptr ds:[edi+44h]; jmp dword ptr ds:HookAddr_SwapContext_ret; } } //FastCallEntry 关键代码 //函数返回需要替换的地址; //参数1:函数索引; //参数2:函数地址; //参数3:表Base; ULONG MyDisposeFunc(ULONG uIndex,ULONG uFuncAddr,ULONG uServiceTableBase) { ULONG uNewFuncAddr; PUCHAR szName; szName = PsGetProcessImageFileName(IoGetCurrentProcess()); uNewFuncAddr = uFuncAddr; if ( _stricmp((const char *)szName,"game.exe") == 0 ) { return uNewFuncAddr; } if ( uServiceTableBase == *(PULONG)KeServiceDescriptorTable ) { switch ( uIndex ) { case 0x21: // NtCreateDebugObject uNewFuncAddr = (ULONG)My_NtCreateDebugObject; break; case 0x39: // NtDebugActiveProcess uNewFuncAddr = (ULONG)My_NtDebugActiveProcess; break; case 0x3A: // NtDebugContinue uNewFuncAddr = (ULONG)My_NtDebugContinue; break; case 0x10D: // NtWaitForDebugEvent uNewFuncAddr = (ULONG)My_NtWaitForDebugEvent; break; case 0x7A: // NtOpenProcess uNewFuncAddr = Original_NtOpenProcessAddr; break; case 0xBA: // NtReadVirtualMemory uNewFuncAddr = Original_NtReadVirtualMemroyAddr; break; case 0x115: // NtWriteVirtualMemory uNewFuncAddr = Original_NtWriteVirtualMemoryAddr; break; default: uNewFuncAddr = uFuncAddr; } } return uNewFuncAddr; } __declspec(naked) void __stdcall HookFunc_KiFastCallEntry() { __asm { pushad; pushfd; push edi; push ebx; push eax; call MyDisposeFunc mov dword ptr ds:[esp + 0x14],eax; popfd; popad; sub esp, ecx; shr ecx, 2 ; jmp dword ptr ds:HookAddr_KiFastCallEntry_ret; } } |
|
[求助]Hook SwapContext 和 Hook FastCallEntry的问题
没有大牛 来看看吗? 在线等 |
|
[求助]调试异常处理
异常是自己先捕获然后处理 没有捕获的异常和在自己捕获之外的异常是往上抛的.. |
|
[求助]内存对齐问题
为什么要数据对齐 因为系统是有位宽限制的 不管你在你的函数里面 还是外面声明的 char 或者 byte 当不满祝4字节的时候 会自动补齐4字节 但是你实际使用的过程中只使用了 1字节 剩余的3个字节被丢弃 但是当你使用 命令参数对齐的时候 那么类型是几字节就是几字节 除非你弄数组或指针 另外请注意你在局部声明变量类型不同的时候 esp每次减去的值 是多少 有什么关系你就明白了 |
|
[求助]帮忙看下汇编代码的意思
[QUOTE=leonpedy;1065037]CLD ;store hash push 0x1234567 push 0x1e1f1212 push 0x0c917432 mov esi, esp lea edi, [esi - 0xc] 想请教最后一句 lea edi, [esi - 0xc] 想问下,为什么是减0xc呢,...[/QUOTE] 1.这个需要引用上下文 下文中可能要对edi 或 esp 进行操作 这里的edi + 0xc 才是esp的寄存器的内容 2. edi = [esp - 0xc] 取的是 esp - 0xc 以后的 esp的寄存器内容 注意:不是内存中的内容 如果原始的esp = 0x0012ff3c 那么 edi = 0x0012ff30 |
|
[更新完毕]调试器实现(1、11、19、29、34、45、50楼更新)(50楼已上传源码)
下载 学习 ^^ 感恩 |
|
[原创]让XP用上4G内存,有图有真相,带破解补丁
[QUOTE=naux;1005561]为什么要破解呢?这有一种无需破解的方法。 我用的是64位的机子,但安装的是32位XP SP3系统,没有任何修改,3G内存显示为3.00G而不是2.98G,系统属性如下: 系统配置: [/QUOTE] XP 最高认到 3.5G 内存 你才 3G 当然现实正确 你在加个条子就知道了 |
|
[原创]让XP用上4G内存,有图有真相,带破解补丁
谢谢了 我看看我能补能有4G 哈 |
|
[求助]菜菜问一句,脱完壳之后要干什么?
来了很久 看了很多看不懂的东西 但是这次 我看懂了 笑了 哈哈 |
|
[原创]CRACK之路会有多长
我25了= = 目前也是在入门边缘 努力学习^^ |
|
[邀请码已发]OD常用断点之我收集,里面有VB绝对万能断点,杀VB程序专用(申请邀请码)
新手学习中 不过完全看不懂 = = |
|
[求助]我的钱够了 怎么够爱邀请码
恭喜啊 ^^ |
|
[原创]图解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 }}
勋章
兑换勋章
证书
证书查询 >
能力值