🛠️ FreeRDP

Installation

sudo apt install freerdp2-x11      # xfreerdp
# newer: sudo apt install freerdp3-x11   # xfreerdp3

Common Commands

FlagDescription
/v:<host[:port]>Target (RDP default 3389)
/u: /p: /d:Username / password / domain
/pth:<NTLM>Pass-the-Hash (restricted admin)
/cert:ignoreAccept the server cert (labs)
/dynamic-resolutionResize the session to the window
+clipboardShare clipboard
/drive:<name>,<path>Mount a local folder into the session
/sec:nla / /sec:tlsForce a security protocol

Reusable Commands

# --- basic connect ---
xfreerdp3 /v:<TARGET>:3389 /u:'<user>' /p:'<pass>' /cert:ignore /dynamic-resolution
 
# --- domain creds / pass-the-hash ---
xfreerdp3 /v:<TARGET> /u:'<user>' /d:'<DOMAIN>' /p:'<pass>' /cert:ignore
xfreerdp3 /v:<TARGET> /u:'<user>' /pth:'<NTLM_HASH>' /cert:ignore          # restricted admin
 
# --- mount a local folder to move files in/out of the session ---
xfreerdp3 /v:<TARGET> /u:'<user>' /p:'<pass>' /cert:ignore \
          /drive:share,/home/kali/loot +clipboard
#   inside the session the folder appears at \\tsclient\share
 
# --- headless / scripted: render to a throwaway X server, drive with xdotool ---
Xvfb :77 -screen 0 1280x1024x24 &
DISPLAY=:77 xfreerdp3 /v:<TARGET> /u:'<user>' /p:'<pass>' /cert:ignore &
sleep 8
DISPLAY=:77 xdotool key super; DISPLAY=:77 xdotool type 'cmd'; DISPLAY=:77 xdotool key Return
DISPLAY=:77 import -window root /tmp/shot.png      # screenshot the virtual display

Tips & Tricks

  • Assumed-breach labs often hand you an RDP-only credential (won’t work on SSH) — RDP is the intended front door. Once in, a reverse shell + interactive-shell upgrade is far less laggy than driving the GUI.
  • RDP has no native command channel — “run a command without a window” means either RemoteApp (/app: — only if the server publishes it) or the headless Xvfb+xdotool approach above. If you can reach SSH on the box, prefer that for command execution.
  • Watch where the forwarded port lands: an HTB host often forwards :3389 into a container, so your session is on a jump box, not the host (check ip a once inside).
  • /sec:nla failures → try /sec:tls, and always /cert:ignore in labs.
FileCreated
HTB Machine - LayoverOctober 04, 2026
HTB Machine - TouchOctober 07, 2026

References: FreeRDP CLI reference