| name | hunting-for-registry-run-key-persistence |
| description | Detect MITRE ATT&CK T1547.001 registry Run key persistence by analyzing Sysmon Event ID 13 logs and registry queries to identify malicious auto-start entries. |
| domain | cybersecurity |
| subdomain | threat-hunting |
| tags | ["persistence","registry-run-keys","t1547-001","sysmon","threat-hunting","windows-forensics","mitre-attack"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
| d3fend_techniques | ["Executable Denylisting","Execution Isolation","File Metadata Consistency Validation","Content Format Conversion","File Content Analysis"] |
| nist_csf | ["DE.CM-01","DE.AE-02","DE.AE-07","ID.RA-05"] |
Hunting for Registry Run Key Persistence
Overview
Registry Run keys (T1547.001) are one of the most commonly used persistence mechanisms by adversaries. When a program is added to a Run key in the Windows registry, it executes automatically when a user logs in. Attackers abuse keys under HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKCU\Software\Microsoft\Windows\CurrentVersion\Run, and their RunOnce counterparts to maintain persistence. Sysmon Event ID 13 (RegistryEvent - Value Set) captures registry value modifications including the target object path, the process that made the change, and the new value. Detection involves monitoring these events for suspicious executables in temp directories, encoded PowerShell commands, LOLBin paths, and processes that do not normally create Run key entries. Chaining Event 13 with Event 1 (Process Creation) and Event 11 (FileCreate) strengthens detection by confirming payload creation and execution.
When to Use
- When investigating security incidents that require hunting for registry run key persistence
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Detection Gaps & Validation
- Filter completeness is everything: EID 13 fires only for paths in your Sysmon RegistryEvent rules. Confirm coverage of HKLM and HKCU
...\CurrentVersion\Run, RunOnce, RunOnceEx, \Policies\Explorer\Run, AND Wow6432Node variants — partial configs are the dominant false-negative.
- Value-only persistence: encoded PowerShell,
mshta http, or rundll32 written straight into the value leaves no EID 11 FileCreate, and chaining to EID 1 fails when the LOLBin itself is the registered command.
- Self-erasing evidence: RunOnce auto-deletes its value at execution; a same-day EID 13 with empty
Details may be the only trace.
- Offline hives: logged-off users' Run keys live in unmounted NTUSER.DAT, invisible to live
reg query.
- Validate: run Atomic T1547.001 writing a Run value via both reg.exe and PowerShell; confirm
TargetObject, Details, and Image populate.
- FP tuning: baseline OneDrive, Teams, Spotify, and vendor updaters by signed image + expected value string.