Overview
Each Windows service has a registry key underHKLM\SYSTEM\CurrentControlSet\Services\. If you have write access to a service’s registry key, you can change its binary path, add parameters, or modify its configuration to execute arbitrary code as SYSTEM.
Find Writable Service Registry Keys
accesschk
KEY_ALL_ACCESS or KEY_SET_VALUE.
PowerShell
Modify ImagePath
If writable, change the service binary:Add Admin User via ImagePath
Service DLL
Some services load a DLL specified in the registry:ServiceDll key is writable:
AppendData Permission
If you haveAppendData but not SetValue: