Modify
Scheduled Tasks
schtasks /create /sc <ScheduleType> /tn <TaskName> /tr <TaskRun>
Creates a scheduled task (CMD).
New-ScheduledTask -Action <Action> -Trigger <Trigger>
Creates a new scheduled task object (PowerShell).
Register-ScheduledTask -TaskName <TaskName> -InputObject <ScheduledTask>
Registers a scheduled task (PowerShell).
Registry
Adds an auto-start entry for the current user (CMD).
Adds an auto-start entry for all users (CMD).
Adds an auto-start entry for the current user (PowerShell).
Adds an auto-start entry for all users (PowerShell).
Startup Folder
Copies a file to the current user's startup folder (CMD).
Copies a file to the current user's startup folder (PowerShell).
Services
Creates a new service set to start automatically (CMD).
Creates a new service set to start automatically (PowerShell).
Registry Keys
Registry Query:
Persistence Keys
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Programs in this key run automatically when the current user logs in.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Programs listed here run automatically for all users at system startup.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
Commands or programs here run once at the next user login.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
Commands or programs in this key run once at the next system startup.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
Programs listed here are executed at system startup.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
Programs listed here are executed at user login.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Entries such as 'Userinit' and 'Shell' can be modified to run custom scripts or applications during the logon process.
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Load
Specifies programs to load at user login.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\Load
Specifies programs to load at system startup.
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Run
Specifies additional programs to run at user login.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\Run
Specifies additional programs to run at system startup.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellExecuteHooks
Hooks that can be used to execute code when certain actions occur.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
Services listed here are started by the Service Control Manager. Malware can create or modify existing services.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Customization of user shell folders can be used for persistence.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Customization of shell folders at a system-wide level.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components
Components listed here are executed when a user logs in for the first time and when creating new user accounts.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
On 64-bit systems, this key is used to run 32-bit applications at system startup.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes*\ShellEx\ContextMenuHandlers
Context menu handlers can be used to execute code when certain file types are right-clicked.
HKEY_CURRENT_USER\Software\Classes*\ShellEx\ContextMenuHandlers
Context menu handlers for specific file types under the current user profile.
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKU<SID>\Software\Microsoft\Windows\CurrentVersion\Run
HKLM\BCD00000000
HKLM\SAM\SAMs
Startup Folders
Individual User Startup:
C:\Users<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
All Users Statup:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
Are these locations the same across all Windows Versions? Need to research.
Sysinternals
autorunsc -accepteula
Start
autorunsc -a
(all) # ALWAYS CHECK BOOT EXECUTE
autorunsc -s
Services
autorunsc -t
Tasks
autorunsc -b
Boot execute
autorunsc -d
App init DLLs
Last updated
Was this helpful?