Service Exploits
If a service runs with a SYSTEM Privs and are misconfigured, exploiting them may lead to command execution with SYSTEM privilege as well.
Service Commands
Service Misconfigurations
Insecure Service Permissions
Each service has an ACL which defined certain service-specific permission
If user has permission to change service configuration with SYSTEM priv, the change the executable path with our own
We need to have permission to start/stop the service, to be able to escalate prvileges Check ACLs for a service
Change binary path of a service
Using powershell to enumerate the pathnames
PowerUp can be used to query services whose binpath can be mofified by the current user:
PowerUp can be used to query services whose configuration can be changed by the current user:
Unquoted Service Path
This can be exploited to check which directory can we access and put our reverse shell there with write access.
To check write access for each of these directories
After writeable path is found. Copy the reverse shell.
We get a reverse shell
PowerUp script can be used to search for unquoted service paths:
Weak Registry Permission
Stores data for each service
Registries have ACL
ACLs can be misconfigured
may be possible to service config via registry.
Insecure Service Executable
If the original executable is modifiable by our user.
DLL Hijacking
A DLL is missing from the system.
Our user has write permission on the directory where the DDL is looked for by the system.
DDL is executed with the same privilege as the process that imports the DLL
Last updated