Attackers add their own program to the places that control this, the Registry run keys or the Startup folder. The program then starts again after every restart or logon.
How it works
Windows has set places where it looks for programs to launch at logon. These include certain Registry run keys and the Startup folders.
An attacker adds an entry to one of these places that points to their own program. When the user next logs in, Windows starts it with that user’s permission level.
This is a normal operating system feature, so the attacker does not need any special tool to use it. MITRE places it under persistence and privilege escalation, as part of the wider group of boot or logon autostart methods.
A real example
- MITRE ATT&CK lists ADVSTORESHELL as keeping itself running by adding itself to a Registry Run key.
- MITRE ATT&CK lists Agent Tesla as adding itself to the Registry as a startup program for persistence.
- MITRE ATT&CK lists Amadey as changing the Startup folder to the one holding its executable by overwriting Registry keys.
- MITRE ATT&CK lists APT3 as placing scripts in the startup folder for persistence.
- MITRE ATT&CK lists APT29 as adding Registry Run keys to establish persistence.
Who uses it
Seen in incidents
How to detect
-
Changes to Run keys
Monitor the creation and change of Registry entries in the Run and startup locations.
-
Unusual paths and scripts
Pay extra attention when a new entry points to an odd file location or to a script instead of a normal installed program.
-
What runs next
Link the change to the process that follows. Programs started from non-standard folders, or with strange parent and child relationships, deserve a closer look.
-
Data sources MITRE lists
File Creation, Process Creation, Windows Registry Key Modification
How to defend
-
Prevention is limited
MITRE states that this technique cannot be easily stopped with preventive controls, because it abuses normal system features.
-
Focus on monitoring
Since blocking is hard, the practical defense is to watch the startup locations and review new entries, as described above.
Frequently Asked Questions
What are Registry Run keys and the Startup folder?
They are set places where Windows looks for programs to launch at logon. Attackers add an entry that points to their own program, which then starts when the user next logs in.
Why do attackers use Run keys for persistence?
It is a normal operating system feature, so the attacker needs no special tool. The program starts again after every restart or logon with that user's permission level.
How can I detect Run key abuse?
Monitor creation and change of Registry entries in the Run and startup locations. Pay extra attention to entries pointing to odd file locations or scripts, and link the change to the process that follows.
Can this technique be blocked?
MITRE states it cannot be easily stopped with preventive controls because it abuses normal system features. The practical defense is to watch the startup locations and review new entries.
