# RDP

RDP(Remote Desktop Protocol)은 Windows에서 기본으로 제공되는 서비스입니다.

AD 환경에서는 Remote Desktop User 그룹에 속하거나 권한 정책에 의해 명시적으로 허용된 도메인 계정을 통해 원격 접속이 가능하며, 일반 Windows 환경에서는 기본적으로 생성한 모든 계정이 허용됩니다.

대상 시스템에 관리자 권한(High mandatory level)의 원격 명령 실행이 가능할 경우 rdp가 비활성화 된 상태에서도 강제로 활성화하여 접속할 수 있습니다.

## Abuse

<pre class="language-bash" data-title="cmd"><code class="lang-bash"><strong># rdp 방화벽 허용
</strong>reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

<strong># rdp 서비스 시작
</strong>net start TermService
</code></pre>

<pre class="language-powershell" data-title="PowerShell"><code class="lang-powershell"><strong># rdp 방화벽 허용
</strong>Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0

<strong># rdp 서비스 시작
</strong>net start TermService
</code></pre>

## References

{% embed url="<https://asec.ahnlab.com/ko/39804/>" %}

{% embed url="<https://attack.mitre.org/techniques/T1021/001/>" %}


---

# 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/lateral-movement/windows/rdp.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.
