Registry Keys
Adding your executable to one one of these "run keys" will cause the executable to run when a user logs in.
An example of these run keys are:
To abuse this for persistence, we can simply issue the following command
Note that this only works in the context of the current user, to make this apply to all users on the machine, you will have to use the HKLM hive. Doing this requires admin privileges
More examples of run keys are:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
Last updated