My Study/Programming&Theory
PEB.BeingDeugged
sharememory
2009. 12. 5. 14:01
특정 변수를 사용해 디버깅을 탐지는 방법 입니다 ^^
IsDebuggerPresent로 많이
#include <stdio.h>
#include <Windows.h>
IsDebuggerPresent로 많이
#include <stdio.h>
#include <Windows.h>
int check(void)
{
_asm{
mov eax,fs:[0x30]
lea edx,[eax];
xor eax,eax
mov al,byte ptr [edx+0x2]
}
}
int main(void)
{
while(1)
{
if(check()!=0)
{
printf("Debuggering~! \n");
system("taskkill /F /IM OLLYDBG.exe"); //단순히 명령 프롬프트에서 제거 ^^
system("taskkill /F /IM devenv.exe");
}
else
printf("normal operating~! \n");
Sleep(500);
}
}