Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

NtGlobalFlag

Мрак edited this page Jun 12, 2022 · 1 revision

How it works

The NtGlobalFlag field of the Process Environment Block (0x68 offset on 32-Bit and 0xBC on 64-bit Windows) is 0 by default. Attaching a debugger doesn’t change the value of NtGlobalFlag. However, if the process was created by a debugger, the following flags will be set:

  • FLG_HEAP_ENABLE_TAIL_CHECK (0x10)
  • FLG_HEAP_ENABLE_FREE_CHECK (0x20)
  • FLG_HEAP_VALIDATE_PARAMETERS (0x40)

The presence of a debugger can be detected by checking a combination of those flags.

Reference

Anti-Debug Tricks

Clone this wiki locally