# RDP Hijacking

Adversaries may hijack a legitimate user's remote desktop session to move laterally within environment. Remote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Microsoft refers to its implementation of the Remote Desktop Protocol (RDP) as Remote Desktop Services (RDS).

Adversaries may perform RDP session hijacking which involves stealing a legitimate user's remote session. Typically, a user is notified when someone else is trying to steal their session. With System permissions and using Terminal Services Console. C:\Windows\System32\tscon.exe \[session number to be stolen], an adversary can hijack a session without the need for credentials or prompts to the user. This can be done remotely or locally and with active or disconnected session. It can also lead Remote System Discovery and Privilege Escalation by stealing a Domain Admin or higher privileged account session. All of this can be done by using native Windows commands, but it has also been added as a feature in red teaming tools.

**Example**

It is possible to switch from one user's desktop to another through the use of **tscon**, this will require us to have

NT AUTHORITY/SYSTEM

![](/files/-MRl0SxQNxdJ0rVzKL9o)

Will first **query users**  to check for any active sessions

![](/files/-MRl0TZjhY8_wBjmSr6J)

Then we use the tscon utility to switch sessions that are currently available

![](/files/-MRl0UZXNAcvIeg_y0tW)

And we manage to access another session

![](/files/-MRl0VVV0_7lNofAP5QO)

**RDP-Hijacking Demo:**

![](/files/-MRl0uDQ_bxMCYd2i_8D)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/lateral-movement/t1563-remote-service-session-hijacking/rdp-hijacking.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.
