hackweb
notes on hacking and technology
IT EN
main menu
user menu
you are not logged in

Anti-debugging: when malware knows it is watched

March 15, 2025 · 1 min read · #reverse-engineering #malware #evasion

To slow analysts, malware detects the analysis environment and, if found, behaves benignly or exits.

The techniques

API: IsDebuggerPresent, CheckRemoteDebuggerPresent, NtQueryInformationProcess.

PEB: reads the BeingDebugged flag directly in the Process Environment Block.

Timing: rdtsc measures delays: under a debugger the time between two instructions explodes.

Anti-VM/sandbox: looks for artifacts (VMware drivers, low RAM, idle mouse, few processes).

mov eax, fs:[30h]   ; PEB
movzx eax, byte [eax+2]  ; BeingDebugged

Analyst countermeasures

Plugins that hide the debugger (ScyllaHide), patching the checks, more realistic sandboxes, static analysis when dynamic is hostile. It is a constant race between evasion and environment transparency.


« back to home

latest posts
 
your IP address:
216.73.216.108
visitor #0
MOTD:
Every abstraction leaks somewhere.
Here we look at where.
topics