# RDP

Use **xfreerdp**:

```bash
xfreerdp /v:10.200.85.150 /u:ret2basic /p:'password1337' +clipboard /dynamic-resolution /drive:/usr/share/windows-resources,share
```

* `/v`
  * Victim IP
* `/u`
  * Username
* `/p`
  * Password
* `/dynamic-resolution`
  * Allows us to resize the window, adjusting the resolution of the target in the process
* `/size:WIDTHxHEIGHT`
  * Sets a specific size for targets that don't resize automatically with `/dynamic-resolution`
* `+clipboard`
  * Enables clipboard support
* `/drive:LOCAL_DIRECTORY,SHARE_NAME`
  * Creates a shared drive between the attacking machine and the target. This switch is insanely useful as it allows us to very easily use our toolkit on the remote target, and save any outputs back directly to our own hard drive. In essence, this means that we never actually have to create any files on the target. For example, to share the current directory in a share called `share`, you could use: `/drive:.,share`, with the period (`.`) referring to the current directory

When creating a shared drive, this can be accessed either from the command line as `\\tsclient\`, or through File Explorer under "This PC":

![shared drive](/files/DTI2J3CQmJ9j0VhxVIuX)

For example, Mimikatz can be accessed with the following command:

```powershell
\\tsclient\share\mimikatz\x64\mimikatz.exe
```


---

# 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://ret2basic.gitbook.io/ctfnote/red-teaming/post-exploitation/windows-post-exploitation/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.
