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:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunTo abuse this for persistence, we can simply issue the following command
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v NameOfKey /t REG_SZ /d c:\program /fNote 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\RunHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
Last updated
Was this helpful?