This detection identifies adversaries modifying registry subkeys to embed specific code features that may indicate early-stage persistence or configuration changes within Windows endpoints. Proactively hunting for these subtle registry alterations in Azure Sentinel allows the SOC team to distinguish legitimate administrative updates from stealthy attacker behaviors before they escalate into more severe incidents.
rule RegSubDatCode : RegSubDat Family
{
meta:
description = "RegSubDat code features"
author = "Seth Hardy"
last_modified = "2014-07-14"
strings:
// decryption loop
$ = { 80 34 3? 99 40 (3D FB 65 00 00 | 3B C6) 7? F? }
// push then pop values
$ = { 68 FF FF 7F 00 5? }
$ = { 68 FF 7F 00 00 5? }
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
Here are 5 specific false positive scenarios for the RegSubDat detection rule in an enterprise environment, including suggested filters and exclusions:
Antivirus Definition Updates via Scheduled Tasks
RegSubDat events on keys like HKLM\SOFTWARE\Antivirus\Definitions.NT SERVICE\CrowdStrikeService, Local System) and filter by the specific registry path containing “Definitions” or “Signatures.” Additionally, exclude events where the Data value matches known hash patterns of update files.Group Policy Object (GPO) Application
gpsvc) applies policies that modify registry settings to enforce compliance. This involves writing data to keys under HKLM\SOFTWARE\Policies and HKCU\Software\Policies, generating a high volume of legitimate RegSubDat events for standard configuration changes (e.g., disabling USB storage, setting proxy configurations).Process Name is gpupdate.exe or svchost.exe with the command line containing /k gpcsvc. Furthermore, filter by registry paths starting with \SOFTWARE\Policies\Microsoft\Windows to isolate standard policy enforcement traffic.Software Deployment and Patching (SCCM/Intune)