본문으로 바로가기

[API 기반] IsDebuggerPresent

category Reversing/Anti Debugging 2015. 3. 25. 09:57

IsDebuggerPresent를 이용한 안티 디버깅

IsDebugger Present()를 호출한 프로세스(디버기)가 유저모드 디버거에 의해 디버깅 중인지 체크하는 함수.


MSDN

디버깅 중일 경우 반환 값은 TRUE(non zero), 아닐 경우 반환 값은 FALSE(zero)


소스 코드

  

안티 디버깅 우회 방법
1. IsDebuggerPresent 함수의 리턴 값을 수정
2. PEB.BeingDebugged 멤버 값을 0으로 수정(PEB 기반에서 설명)
3. 디버거의 안티디버깅 플러그인 이용(ex : OllyDbg의 OllyAdvanced Plug-In을 이용)


Reference

MSDN : https://msdn.microsoft.com/en-us/library/windows/desktop/ms680345(v=vs.85).aspx