This detection identifies the execution of debug.exe, a known artifact associated with Chinese hacktool sets that adversaries often leverage for initial reconnaissance and command-and-control operations. Proactively hunting for this behavior in Azure Sentinel is critical to uncover early-stage lateral movement or persistence mechanisms, even at low severity, before they escalate into more significant compromises within the cloud environment.
rule FreeVersion_debug {
meta:
description = "Chinese Hacktool Set - file debug.exe"
author = "Florian Roth"
reference = "http://tools.zjqhr.com/"
date = "2015-06-13"
hash = "d11e6c6f675b3be86e37e50184dadf0081506a89"
strings:
$s0 = "c:\\Documents and Settings\\Administrator\\" fullword ascii
$s1 = "Got WMI process Pid: %d" ascii
$s2 = "This exploit will execute" ascii
$s6 = "Found token %s " ascii
$s7 = "Running reverse shell" ascii
$s10 = "wmiprvse.exe" fullword ascii
$s12 = "SELECT * FROM IIsWebInfo" fullword ascii
condition:
uint16(0) == 0x5a4d and filesize < 820KB and 3 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 7 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Chinese Hacktool Set - file debug.exe detection rule, tailored for an enterprise environment:
Microsoft Visual Studio Build & Debug Sessions
debug.exe processes within the installation directory (C:\Program Files\Microsoft Visual Studio\...) to attach debuggers, manage breakpoints, and inspect memory during active development cycles.debug.exe instances where the file path contains \Microsoft Visual Studio\ AND the parent process is devenv.exe.Windows Update Troubleshooting & Diagnostics
debug.exe to analyze update failures, collect telemetry logs, or troubleshoot installation errors. This often occurs during off-hours maintenance windows on domain-joined workstations and servers.debug.exe located in the %WINDIR%\System32\ directory when the parent process is svchost.exe (specifically with service names like wuauserv or DiagTrack) OR when the hash matches a known Microsoft-signed binary.Automated CI/CD Pipeline Execution
debug.exe. These jobs often run as scheduled tasks (e.g., nightly builds) under the context of a dedicated service account (e.g., svc-build-agent) to validate code changes before deployment.debug.exe processes where the User Account is a known Service Principal