Windows Privilege Escalation (Unquoted Service Paths)
One way we can seek to elevate privileges in a Windows environment is to look for unquoted service paths which also contain blank spaces. These can potentially be exploited if we have a shell as a user who can modify directories where Windows will search for binaries. To start this lab, I was given a bind shell to a Windows machine as a low privileged user. Before running the exploit, I used set AutoRunScript migrate -f so the shell would migrate to a different process once it had been established. This is useful as it prevents the shell being disrupted by a user who closes the process it is running on. As can be seen from the above screenshot, the initial shell was for a low level user. My mission was to elevate the privileges to system by finding and exploiting unquoted service paths. I started by opening an interactive shell so that I could use a wmic command to search for unquoted service paths which also contained blank spaces wmic service get name,displayname,pathname,start...