Boot/Logon Autostart Execution: Registry Run Keys
Process Create RegistryKey — Create or modify a Windows registry autostart key to cause attacker-controlled code to execute at boot or logon.
Detect
The autostart key path is fixed and finite. A rule matching reg_key.path against known autostart locations with activity_id = Create/Set is STP 5 and tool-agnostic.
Maintain an allowlist of expected autostart entries per system baseline. Alert on any Create or Set activity to autostart key paths not in the baseline, regardless of actor process.
Mitigate
Restricting write access to autostart registry keys to privileged accounts reduces the attacker population that can use the technique, but does not block it for an attacker who already holds sufficient privilege.
d3f:SystemConfigurationPermissionsNo STP 5 mitigation exists. Detection is the primary defensive lever.
Apply ACLs to autostart registry locations restricting writes to SYSTEM and administrators. Application control preventing unknown binaries from executing is a complementary STP 5 control on the execution side.
Respond
A new artifact was created and may persist beyond this session. Delete it immediately. Check for related persistence entries, scheduled tasks, and outbound callbacks originating from it.
actor.processactor.userd3f:ProcessTerminationd3f:AccountLockingd3f:NetworkIsolationOCSF event model▼
Event class: Registry Key Activity (201001)
· activity_id: Create or Set
%%{init: {"theme": "dark", "themeVariables": {"edgeLabelBackground": "#18181b", "lineColor": "#52525b"}}}%%
graph TD
classDef attacker fill:#7c2d12,stroke:#ea580c,color:#fed7aa
classDef victim fill:#1e3a5f,stroke:#3b82f6,color:#bfdbfe
classDef postSuccess fill:#78350f,stroke:#d97706,color:#fde68a
classDef tainted fill:#18181b,stroke:#52525b,color:#a1a1aa
EVENT(["Registry Key Activity\n· Create or Set"])
actor_process["Writing Process\nactor.process\nd3f:Process"]:::attacker
actor_user["Running Account\nactor.user\nd3f:UserAccount"]:::attacker
reg_key["Autostart Registry Key\nreg_key\nd3f:RegistryKey"]:::victim
device["Host\ndevice\nd3f:Host\n⚠ tainted"]:::tainted
EVENT --> actor_process
actor_process --> actor_user
EVENT --> reg_key
EVENT --> device
actor_process -.->|"writes autostart entry to"| reg_keyactor.process·d3f:Processactor.process.file.path | attacker_controlled | Process writing the key (reg.exe, PowerShell, etc.) — Execution Medium, attacker-chosen |
d3f:ProcessTerminationactor.user·d3f:UserAccountd3f:AccountLockingreg_key·d3f:RegistryKeyreg_key.path | variable | Autostart key path — victim-side, constrained to a finite known set by Windows |
reg_key.value | attacker_controlled | Payload path written into the autostart entry — attacker-chosen |
d3f:SystemConfigurationPermissionsdevice·d3f:Hostd3f:NetworkIsolationDefinitional Sigma rule▼
Broad by design — defines the technique, not an operational alert. Gate on variable or attacker-controlled field conditions to narrow for production use.
title: Boot/Logon Autostart Execution: Registry Run Keys (T1547.001)
status: experimental
description: >
Definitional rule — broad by design. Defines the technique independent of
medium, tool, or attacker-controlled variables. Narrow with variable and
attacker-controlled field conditions for operational use.
logsource:
product: ocsf
category: Registry Key Activity (201001)
detection:
selection:
activity_id: 'Create or Set'
condition: selectionExecution Medium–scoped detectionSTP 3 ceiling▼
Sample rules — not canonical definitions. Each constrains detection to a specific Execution Medium and has a hard STP 3 ceiling. The attacker switches Execution Medium; the rule misses. Compare with the definitional rule above.
Gating on actor.process.file.name = reg.exe has a hard STP 3 ceiling. Evaded by using PowerShell, a custom binary, or any other process that can call RegSetValueEx. The autostart key write is unchanged.
title: Registry Run Keys — reg.exe CLI medium (sample)
status: experimental
description: >
Sample — STP 3 ceiling. Detects reg.exe writing to a Run or RunOnce autostart
key. Evaded by switching to PowerShell, a custom binary, or any other Execution Medium.
logsource:
product: ocsf
category: Registry Key Activity (201001)
detection:
selection:
activity_id:
- 'Create'
- 'Set'
reg_key.key|contains:
- '\CurrentVersion\Run'
- '\CurrentVersion\RunOnce'
actor.process.file.name: 'reg.exe'
condition: selectionSeen in the wild1report▼
VBCloud backdoor establishes persistence by writing the main loader path to HKCU\Software\Microsoft\Windows\CurrentVersion\Run under the key YandexBrowser_setup — a textbook Registry Run Key persistence instance.