1.ring3-反调试-IsDebuggerPresent
来源:互联网 发布:桌面会议软件 编辑:程序博客网 时间:2024/05/17 18:41
依赖于API的反调试
这个函数会看PEB中的BeingDebugged是否为0,不为0就表示无调试器,否则表示有调试器.注意的是以前代码都会对这个函数首字节是否为0x64作判断,但在win7下,需要对应kernelBase中的IsDebuggerPresent,而不是kernel32中的IsDebuggerPresent
//使用IsDebuggerPresent函数检测DbgToolType AntiDebugged::AD_IsDebuggerPresent(){HMODULE hKernelBaseDll = ::LoadLibrary(TEXT("kernelBase.dll"));if (NULL != hKernelBaseDll){// 不要使用kernel32,kernel32中IsDebuggerPresent第一条指令并非0x64FARPROC pIsDebuggerPresent = ::GetProcAddress(hKernelBaseDll, "IsDebuggerPresent");if (!pIsDebuggerPresent){::FreeLibrary(hKernelBaseDll);return DGBTOOL_NO;}if ((*(BYTE *)pIsDebuggerPresent == 0xCC)||(*(BYTE *)pIsDebuggerPresent != 0x64)|| pIsDebuggerPresent()){::FreeLibrary(hKernelBaseDll);return DBGTOOL_CUSTOM;}else{::FreeLibrary(hKernelBaseDll);return DGBTOOL_NO;}}return DGBTOOL_NO;}
这个过掉的方式比较简单:只需要把PEB中的BeingDebugged置为0.
比如直接在OD命令中输入:d fs:[30]+2把它改为1即可过掉:
- 1.ring3-反调试-IsDebuggerPresent
- 反调试 - IsDebuggerPresent
- 反调试技术- IsDebuggerPresent,原理 与 反反调试
- 反调试-----由IsDebuggerPresent函数看下去
- 0.ring3-反调试小结
- 0.ring3-反调试-CheckRemoteDebuggerPresent(ProcessDebugPort)
- isdebuggerpresent
- Ring3调试流程
- 《脱壳艺术》学习笔记--IsDebuggerPresent 检测调试器
- 5.windbg script-禁用IsDebuggerPresent(调试 kernel32!SetUnhandledExceptionFilter)
- 0.ring3-破坏knowndlls反劫持保护
- 反反调试总结
- 反调试
- 一个禁止任何ring3调试的驱动
- 0.ring3-设置默认调试器
- 反调试与反反调试
- 反调试与反反调试
- IsDebuggerPresent解密
- 教你如何把书本上的字快速弄到电脑上
- android界面之自定义标题栏
- Java学习(回顾)笔记之day1
- 雨中飘荡的回忆
- c++面向对象编程必备“良方”
- 1.ring3-反调试-IsDebuggerPresent
- 有效用户ID、实际用户ID
- 使用SSIS创建同步数据库数据任务
- 加速Android UI(一):加速ListView
- 在父类的构造函数和析构函数中都不能调用纯虚函数
- Linux 内存管理
- mybatis中Date和DateTime字段的插入
- BOOST 线程完全攻略 - 基础篇
- regionprops Matlab function之opencv的cvBlobsLib