Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› RunOnce Persistence
Cyber Security

RunOnce Persistence

← Back to Glossary
By NHI Mgmt Group Updated October 31, 2026 Domain: Cyber Security

RunOnce persistence is a registry-based technique that schedules a program to run after the next logon or restart. Malware uses it to relaunch a payload from a temporary or disguised location. Because it blends into normal Windows startup behavior, it can survive a simple reboot and continue the intrusion.

What RunOnce Persistence Means in Practice

RunOnce persistence is a Windows startup technique, but the security significance is not the registry value itself, it is the way attackers use a legitimate logon or reboot hook to regain execution after removal of the immediate process. That makes it a persistence mechanism, not just an autorun setting.

Because the entry is evaluated by the operating system during normal startup behaviour, it can survive a simple reboot and create the impression that the intrusion has been removed when the attacker’s next-stage code is only waiting to launch again.

How RunOnce Persists Across Reboots

RunOnce-style entries are designed to run once at the next logon or restart and then clear themselves. Malware abuses that lifecycle by placing a launcher or stager in a temporary, user-writable, or disguised location, then pointing the registry key at that payload so execution resumes automatically after the next startup event.

This works especially well when defenders focus on processes currently in memory and do not also review startup extensibility points. The persistence can be short-lived in appearance, yet durable enough to reestablish the intrusion after every restart until the registry entry or payload is removed.

Why RunOnce Is Attractive to Malware

Attackers favour this technique because it blends into standard Windows behaviour and uses a trusted execution path rather than an exotic exploit. It can be paired with other persistence methods, used for a one-time relaunch after deployment, or left behind as a fallback if the malware is terminated before it finishes its setup.

It is also useful for preserving access after cleanup actions that only kill a process tree. When the payload is staged in an inconspicuous path and the RunOnce reference looks routine, the operator gains a low-noise way to regain code execution on the next user session or reboot.

Identity Threat Detection and Response (ITDR) Guide is useful here because persistence often follows credential abuse and other identity-driven access paths, and the guide maps the detections and response steps that matter after those footholds appear.

How Defenders Find and Remove It

Exposure review starts with startup-location inspection, registry hunting, and inventory of systems where users or malware can write to autorun-related keys. A simple reboot test is not enough, because the payload may not trigger until the next logon event, and the launcher may only become visible after a later startup chain completes.

Removal should focus on both the registry entry and the payload it points to. If the executable, script, or command line remains in place, another autorun or a later modification can restore the same persistence pattern even after the original key is deleted.

Post-removal validation matters as much as the cleanup itself. Organisations should confirm that the startup path is gone, that no secondary persistence mechanism was dropped alongside it, and that the affected host has not been re-compromised through the same operator access.

MITRE ATT&CK Enterprise Matrix is a useful companion when mapping this behaviour to persistence and credential-access tradecraft, while NIST SP 800-53 Rev 5 Security and Privacy Controls provides the control vocabulary for configuration management, auditability, and integrity monitoring.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1547.001 — Registry Run Keys / Startup FolderRunOnce abuse is a persistence path that starts from Windows registry startup execution.
Recommendation — Map suspected autorun entries to T1547.001 and hunt for related persistence artifacts on the host.
NIST SP 800-53 Rev 5CM-6 — Configuration SettingsRunOnce persistence exploits startup configuration that should be controlled and reviewed.
AU-6 — Audit Record Review, Analysis, and ReportingDetection depends on reviewing registry and execution evidence for unexpected startup launches.
Recommendation — Enforce CM-6 to restrict and review Windows startup configuration changes. Use AU-6 to review logs and alerts for suspicious registry-based execution at logon.
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareRunOnce abuse is prevented and found through secure baseline control of startup settings.
CIS-8 — Audit Log ManagementRegistry-driven persistence is easier to spot when startup and execution events are logged and reviewed.
Recommendation — Harden endpoint startup settings and alert on unauthorized autorun modifications. Collect and review logs for unexpected registry persistence and follow-on execution.

Practitioner Guidance

What to watch for: Treat unexpected RunOnce entries as a sign that an attacker may be using a short-lived but recurring launch point rather than relying on a single active process. The key question is not whether the registry value exists, but whether the path it references is trustworthy, expected, and still needed.

Governance implication: Startup extensibility points should be part of routine endpoint hardening and incident response ownership, not left to ad hoc cleanup after a reboot fails to solve the problem. If defenders only look at running processes, they will miss the mechanism that brings the malware back.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org