# Executable Files

## Overview

Sometimes there will be services that have executables attached to them. If we have the permissions to manipulate it **(FILE\_ALL\_ACCESS)** then we can replace it with a malicious executable and get it to do what we want as **system**.

## Escalation via Service Executables

Run PowerUp and check for **ModifileableFileIdentityReference** within **Service executables.**

<figure><img src="/files/ARCO1WFcIGdfrSHgHwBu" alt=""><figcaption></figcaption></figure>

Manually check the permissions on the service using accesschk64

```
accesschk64.exe -wvu "C:\Program Files\File Permissions Service"
```

Compile, upload the malicious exe, replacing the old executable and start the service

```
svc start filepermsvc
```


---

# 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/executable-files.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.
