IsDebuggerPresent官方出处
来源:互联网 发布:abp框架源码 编辑:程序博客网 时间:2024/06/09 22:43
在前面我的博文一步一步简单的保护我们的代码中 http://blog.csdn.net/lixiangminghate/article/details/43153263 提到了动态监测进程是否被调试。此间用到了Win Api IsDebuggerPresent。很可惜,某些系统没有导出该函数,因此,在那篇博文中用汇编模拟了这个API的实现。
今天看reactos033异常处理相关的源码,在异常处理开始部分,无意中看到了reactos监测进程调试状态的实现,代码如下:
[ntoskrnl\include\internal\i386\asmmarco.S]
mov ecx, fs:[KPCR_CURRENT_THREAD] cld /* Flush DR7 */ and dword ptr [ebp+KTRAP_FRAME_DR7], 0 /* Check if the thread was being debugged */ test byte ptr [ecx+KTHREAD_DEBUG_ACTIVE], 0xFF jnz Dr_&Label
既然reactos有这部分代码,wrk没理由没有,经过搜索,在文件[base\ntos\ke\i386\kimarco.inc]中找到如下代码:
ifdef PcPrcbData mov ecx,PCR[PcPrcbData+PbCurrentThread] ; get current thread addresselse mov ecx,PCR[PcPrcb] mov ecx,[ecx].PbCurrentThread ; get current thread addressendif cld and dword ptr [ebp].TsDr7, 0 test byte ptr [ecx].ThDebugActive, 0ffh ; See if debug registers need saving jnz Dr_&AssistLabel
看到没,不是网上随便忽悠的,确有这样的检测方法。差不多是官方声明的,放心用吧
0 0
- IsDebuggerPresent官方出处
- isdebuggerpresent
- IsDebuggerPresent解密
- IsDebuggerPresent学习
- 关于IsDebuggerPresent
- 反调试 - IsDebuggerPresent
- 1.ring3-反调试-IsDebuggerPresent
- 软件防破解方法大全 IsDebuggerPresent
- 反调试-----由IsDebuggerPresent函数看下去
- 下载出处
- 《脱壳艺术》学习笔记--IsDebuggerPresent 检测调试器
- 5.windbg script-禁用IsDebuggerPresent(调试 kernel32!SetUnhandledExceptionFilter)
- IsDebuggerPresent VC6.0编译时会报连接错误
- 反调试技术- IsDebuggerPresent,原理 与 反反调试
- 常用诗词语句出处
- Delphi指针(出处不详)
- 无题(不知出处)
- BUG名字的出处
- ZOJ 2283 Challenge of Wisdom
- Vmware vSphere常见问题及解决办法
- C++ STL 算法:对所有元素排序
- 国内各大城市的IT行业特色
- Java—读写锁的简单使用
- IsDebuggerPresent官方出处
- hadoop/spark调优以及遇到的问题
- 选择排序
- 如何获得设备环境句柄(HDC)--Win32 SDK
- 国内各大城市的IT行业特色
- Android开发--大神博客汇总
- bzoj 1858 序列操作(线段树)
- uvalive3266(田忌赛马)
- 修理牛棚(贪心)