Cross-source coverage

T1622 / ATT&CK

Debugger Evasion

4 rules across 4 sources.

From MITRE ATT&CK 19.2

Adversaries may employ various means to detect and avoid debuggers. Debuggers are typically used by defenders to trace and/or analyze the execution of potential malware payloads.

Debugger evasion may include changing behaviors based on the results of the checks for the presence of artifacts indicative of a debugged environment. Similar to Virtualization/Sandbox Evasion, if the adversary detects a debugger, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for debugger artifacts before dropping secondary or additional payloads.

Specific checks will vary based on the target and/or adversary. On Windows, this may involve Native API function calls such as IsDebuggerPresent() and NtQueryInformationProcess(), or manually checking the BeingDebugged flag of the Process Environment Block (PEB). On Linux, this may involve querying /proc/self/status for the TracerPID field, which indicates whether or not the process is being traced by dynamic analysis tools. Other checks for debugging artifacts may also seek to enumerate hardware breakpoints, interrupt assembly opcodes, time checks, or measurements if exceptions are raised in the current process (assuming a present debugger would “swallow” or handle the potential error).

Malware may also leverage Structured Exception Handling (SEH) to detect debuggers by throwing an exception and detecting whether the process is suspended. SEH handles both hardware and software expectations, providing control over the exceptions including support for debugging. If a debugger is present, the program’s control will be transferred to the debugger, and the execution of the code will be suspended. If the debugger is not present, control will be transferred to the SEH handler, which will automatically handle the exception and allow the program’s execution to continue.

Adversaries may use the information learned from these debugger checks during automated discovery to shape follow-on behaviors. Debuggers can also be evaded by detaching the process or flooding debug logs with meaningless data via messages produced by looping Native API function calls such as OutputDebugStringW().

Tactics
Stealth · Discovery
Platforms
Linux · macOS · Windows
Telemetry
WinEventLog:Sysmonetw:Microsoft-Windows-Kernel-Processauditd:SYSCALLmacos:unifiedlog

How MITRE says to detect it DET0371

Detection Strategy for Debugger Evasion (T1622)

Windows Analytic 1045

Monitor for suspicious use of Windows API calls such as IsDebuggerPresent() and NtQueryInformationProcess(), or processes manually checking the BeingDebugged flag in the Process Environment Block (PEB). Detect sequences of OutputDebugStringW() calls in short intervals that may indicate debugger flooding attempts.

  • WinEventLog:Sysmon EventCode=1
  • etw:Microsoft-Windows-Kernel-Process NtQueryInformationProcess

Linux Analytic 1046

Monitor access to /proc/self/status where TracerPID field is queried, as this is a common technique for debugger detection. Detect processes that attempt to trigger exceptions intentionally and monitor whether exception handling indicates presence of a debugger.

  • auditd:SYSCALL open/read: Access to /proc/self/status with focus on TracerPID field

macOS Analytic 1047

Detect suspicious calls to sysctl or ptrace API used to determine if a process is being debugged. Monitor for processes that flood OutputDebugString equivalents or generate abnormal exceptions to evade analysis.

  • macos:unifiedlog ptrace: Processes invoking ptrace with PTRACE_TRACEME flag

SigmaHQ/sigma

1 rule
Detection Severity Format
PUA - Process Hacker Execution Medium Sigma

falcosecurity/rules

1 rule
Detection Severity Format
PTRACE anti-debug attempt Low Falco YAML

panther-labs/panther-analysis

1 rule
Detection Severity Format
GitHub Commits Skipping Workflows Medium Panther Python

socfortress/Wazuh-Rules

1 rule
Detection Severity Format
Sysmon - Event 1: Process creation · PowerShell Debugger Checks (T1622) High Wazuh XML

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.