.. / sc-misconfiguration
Star

Each service on a Windows machine will have an associated executable which will be run by the Service Control Manager (SCM) whenever a service is started. The associated executable is specified through the BINARY_PATH_NAME parameter, and the account used to run the service is shown on the SERVICE_START_NAME parameter. Of you have permission on the BINARY_PATH_NAME you can evelvate your rights to the user as mention in SERVICE_START_NAME.

Another point of interest is the unquoted BINARY_PATH_NAME, as in the extra code, Windows interpretation will be “C:\MyPrograms\Disk.exe”. So if you have control over the directory you can create a malicious executable.

Command Reference:

"disk sorter enterprise": Service on the Windows machine
Command: Copy Extra code: Copy References:

https://www.ired.team/offensive-security/privilege-escalation/unquoted-service-paths