Registry Run Key Persistence
What is Registry Run Key Persistence?
Registry Run Key PersistenceClassic Windows persistence technique that adds an entry under a Run or RunOnce registry key so a binary or script executes every time a user logs on.
Registry Run-key persistence (MITRE ATT&CK T1547.001, Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder) abuses autorun values that userinit.exe and explorer.exe read at logon. The canonical locations are HKCU\Software\Microsoft\Windows\CurrentVersion\Run, the machine-wide HKLM equivalent, their RunOnce and RunOnceEx siblings, and the per-user Startup shell folder. Writing under HKCU needs no administrator rights, which is why it remains one of the most common footholds seen in incident response.
How attackers hide in plain sight
The keys legitimately hold dozens of vendor updaters, so a malicious value blends in. Operators mimic names like OneDriveSetup or Updater, point to user-writable paths (%AppData%, %Temp%), and sometimes use StartupApproved\Run to toggle whether an entry appears in Task Manager's Startup tab. Commodity info-stealers such as Agent Tesla and loaders like Emotet have shipped this technique for years, and MITRE documents its use across many APT toolsets.
Defenders baseline autoruns with Sysinternals Autoruns, alert on Sysmon Event ID 13 (registry value set) referencing user-writable executables, and compare against a golden image.
flowchart LR A[Initial access] --> B[Write value under<br/>HKCU\\...\\CurrentVersion\\Run] B --> C[User logs on] C --> D[userinit / explorer<br/>reads Run key] D --> E[Malware executes<br/>in user context] E --> F[Persistence re-established<br/>each logon] B -.Sysmon EID 13.-> G[(Detection &<br/>Autoruns baseline)]
● Examples
- 01
An attacker writes "Updater" = "%AppData%\loader.exe" under HKCU\Software\Microsoft\Windows\CurrentVersion\Run.
- 02
Using RunOnce to execute a one-time installer that drops a service for long-term persistence.
● Frequently asked questions
What is Registry Run Key Persistence?
Classic Windows persistence technique that adds an entry under a Run or RunOnce registry key so a binary or script executes every time a user logs on. It belongs to the Attacks & Threats category of cybersecurity.
What does Registry Run Key Persistence mean?
Classic Windows persistence technique that adds an entry under a Run or RunOnce registry key so a binary or script executes every time a user logs on.
How do you defend against Registry Run Key Persistence?
Defences for Registry Run Key Persistence typically combine technical controls and operational practices, as detailed in the full definition above.
What are other names for Registry Run Key Persistence?
Common alternative names include: Run key persistence, Autorun key persistence.