This detection identifies adversary behavior involving the execution of destructive target cleaning tools that may indicate an attacker attempting to erase forensic artifacts or disrupt system integrity following initial compromise. The SOC team should proactively hunt for this activity in Azure Sentinel because early identification of these low-severity, tool-based cleanup actions can reveal stealthy post-exploitation maneuvers before they escalate into significant data loss or incident response delays.
rule DestructiveTargetCleaningTool8
{
strings:
$license = {E903FFFF820050006F007200740069006F006E007300200063006F007000790072006900670068007400200052006F006200650072007400200064006500200042006100740068002C0020004A006F007200690073002000760061006E002000520061006E007400770069006A006B002C002000440065006C00690061006E000000000000000250000000000A002200CE000800EA03FFFF8200}
$PuTTY= {50007500540054005900}
condition:
(uint16(0) == 0x5A4D and uint16(uint32(0x3c)) == 0x4550) and $license and not $PuTTY
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the DestructiveTargetCleaningTool8 detection rule in an enterprise environment, including suggested filters or exclusions:
Enterprise Endpoint Security Agent Updates
C:\Program Files\CrowdStrike\*) or the Parent Process Name (e.g., falcon.sys, S1Service.exe). Additionally, filter by specific SHA-256 hashes of known legitimate update executables.Scheduled System Maintenance Tasks (Disk Cleanup)
cleanmgr.exe or PowerShell scripts utilizing Remove-Item to clear temporary folders (%TEMP%, C:\Windows\Temp) and recycle bin contents on a weekly basis. These operations often target large volumes of user-generated data, mimicking the behavior of destructive cleaning tools./sagerun or -Recurse. Implement an exclusion for the User Account running the task (e.g., NT AUTHORITY\SYSTEM or a dedicated service account like svc-maintenance) during defined maintenance windows (e.g., 02:00 – 04:00 UTC).Software Deployment and Patching Orchestrators