# RDP File Transfer

### 🖥️ RDP File Transfers – Moving Files Over Remote Desktop

**RDP (Remote Desktop Protocol)** is a staple in Windows environments for remote access, but guess what? It's also super handy for **file transfers**! Whether you're using **Windows**, **Linux**, or a mix of both, there are ways to move files **in and out** of RDP sessions like a pro. 💼📤📥

***

### Option 1: Copy & Paste

On a Windows-to-Windows RDP session:

* ✅ Simply **right-click + copy** a file on your local machine
* ✅ Then **paste** it inside the RDP session’s desktop or folder

⚠️ Copy-paste may not always work between *Linux and Windows* — especially for large files or due to clipboard limitations.

***

### Option 2: Mount a Local Folder on Linux RDP Clients

When using **Linux as the attacker/client** machine, tools like `rdesktop` and `xfreerdp` can **mount your local directory** into the RDP session, which shows up as a network share.

***

#### 🔧 Mounting Local Folder with `rdesktop`

```bash
rdesktop 10.10.10.132 -d HTB -u administrator -p 'Password0@' -r disk:linux='/home/user/rdesktop/files'
```

📌 Breakdown:

* `-r disk:linux='...'` → shares your local folder as a virtual disk named **linux**
* You'll see this folder inside the RDP session as:

  ```
  \\tsclient\linux
  ```

***

#### 🧰 Mounting Local Folder with `xfreerdp`

```bash
xfreerdp /v:10.10.10.132 /d:HTB /u:administrator /p:'Password0@' /drive:linux,/home/plaintext/htb/academy/filetransfer
```

📌 Breakdown:

* `/drive:linux,/path/to/local/folder` → maps a local Linux folder to a network drive named **linux**
* Accessible via File Explorer in the RDP session at:

  ```
  \\tsclient\linux
  ```

***

#### 🪟 Option 3: Windows RDP Client (mstsc.exe)

Using **Windows' built-in** Remote Desktop tool:

1. 🔎 Open **`mstsc.exe`**
2. 🔧 Click on **"Show Options"**
3. Go to the **Local Resources** tab
4. Click **More...** under Local Devices and Resources
5. ✅ Check the **drives** you want to share (e.g., C:, D:, USB)

📂 Inside the RDP session, you’ll see them under:

```
This PC > Redirected drives
```
