# --- 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:ignorexfreerdp3 /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 8DISPLAY=:77 xdotool key super; DISPLAY=:77 xdotool type 'cmd'; DISPLAY=:77 xdotool key ReturnDISPLAY=: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.