破解
This commit is contained in:
parent
efd130c4f4
commit
fcf5df8788
@ -210,7 +210,8 @@ int main(){
|
||||
|
||||
## 父进程检测
|
||||
一般双击运行的进程的父进程都是explorer.exe,但是如果进程被调试父进程则是调试器进程。也就是说如果父进程不是explorer.exe则可以认为程序正在被调试。
|
||||
'''
|
||||
|
||||
```
|
||||
BOOL IsInDebugger(){
|
||||
HANDLE hProcessSnap = NULL;
|
||||
char Expchar[] ="\\EXPLORER.EXE";
|
||||
@ -257,12 +258,12 @@ BOOL IsInDebugger(){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (Process32Next(hProcessSnap, &pe32));
|
||||
CloseHandle (hProcessSnap);
|
||||
return FALSE;
|
||||
}
|
||||
'''
|
||||
```
|
||||
|
||||
由上述示例代码,我们可以看到父进程检测中调用了GetCurrentProcessId函数来判断。
|
||||
因此在Ollydbg中首先找到GetCurrentProcessId模块(Ctrl+N),然后设置断点
|
||||

|
||||
|
Loading…
x
Reference in New Issue
Block a user