GetLocalTime, GetSystemTime, timeGetTime, NtQueryPerformanceCounter

When a debugger is present, and used to single-step through the code, there is a significant delay between the executions of the individual instructions, when compared to native execution.

U0110 U1308

Detection Rules

rule:
  meta:
    name: check for time delay via QueryPerformanceCounter
    namespace: anti-analysis/anti-debugging/debugger-detection
    author: michael.hunhoff@fireeye.com
    scope: function
    mbc:
      - Anti-Behavioral Analysis::Debugger Detection::Timing/Delay Check QueryPerformanceCounter [B0001.033]
    examples:
      - Practical Malware Analysis Lab 16-03.exe_:0x4011e0
  features:
    - and:
      - count(api(kernel32.QueryPerformanceCounter)): 2 or more

Additional Resources

Subscribe to our Newsletter and don't miss important updates