xfreerdp (and its newer version xfreerdp3) is the standard Linux RDP client used in OSCP. It connects to Windows machines over RDP (port 3389), supports Pass-the-Hash, clipboard/drive sharing, certificate bypass, and many display options.
OSCP tip: Use xfreerdp3 if available (Kali 2024+). Fall back to xfreerdp if not. Legacy alternative: rdesktop (rdesktop 192.168.x.x).
Set log level (TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF)
📌 2) Common Connection Examples
Standard connection (most common)
# Basic — ignore cert errors (use this most of the time)xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore# With domainxfreerdp3 /u:jsmith /d:corp.local /p:'Password1' /v:10.10.10.10 /cert:ignore# Domain short syntaxxfreerdp3 /u:corp\\jsmith /p:'Password1' /v:10.10.10.10 /cert:ignore# Useful display options addedxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /workarea +clipboard
Non-standard port
xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10:3390 /cert:ignorexfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /port:3390 /cert:ignore# Via tunnel / port forwardxfreerdp3 /u:Administrator /p:'Password1' /v:127.0.0.1:3389 /cert:ignore
Handling old / difficult targets
# If you get "ERRCONNECT_TLS_CONNECT_FAILED" or similar TLS errorsxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /tls-seclevel:0# Force old RDP security (no TLS — very old targets)xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 c/cert:ignore /sec:rdp# If connection resets immediatelyxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /sec:nla
Empty or special passwords
# Empty passwordxfreerdp3 /u:Administrator /p:'' /v:10.10.10.10 /cert:ignore# Password with special characters (quote carefully)xfreerdp3 /u:Administrator /p:'P@$$w0rd!' /v:10.10.10.10 /cert:ignore# Read password from stdin (no shell history)echo 'Password1' | xfreerdp3 /u:Administrator /v:10.10.10.10 /cert:ignore /from-stdin
📌 3) Pass-the-Hash (PTH)
RDP with an NTLM hash — no plaintext password required. Requires Restricted Admin mode to be enabled on the target (enabled by default on many Windows boxes, or can be enabled if you have admin access).
# PTH — use NT hash directlyxfreerdp3 /u:Administrator /pth:aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c /v:10.10.10.10 /cert:ignore# Just the NT portion (no LM needed if LM is blank)xfreerdp3 /u:Administrator /pth:8846f7eaee8fb117ad06bdd830b7586c /v:10.10.10.10 /cert:ignore# With domainxfreerdp3 /u:Administrator /d:corp.local /pth:NTHASH /v:10.10.10.10 /cert:ignore /restricted-admin# Enable Restricted Admin via registry (if you have admin access another way):# reg add "HKLM\System\CurrentControlSet\Control\Lsa" /v DisableRestrictedAdmin /t REG_DWORD /d 0
Note: If PTH fails, Restricted Admin may be disabled. Enable it from your existing admin session first.
📌 4) File Sharing (Transfer Files via RDP)
Share a local directory into the RDP session — appears as a network drive inside Windows.
# Share /tmp/share as drive "share" in the RDP sessionxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /drive:share,/tmp/share# Share your whole home dirxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /drive:kali,/home/kali# Inside the RDP session:# Open File Explorer → "This PC" → you'll see "share on KALI" or similar# Copy files to/from it like any network drive
Enable clipboard (copy/paste)
xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore +clipboard# Now you can paste text between your Kali clipboard and the Windows session
📌 5) Display Options
# Fit work area (recommended — doesn't cover taskbar)xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /workarea# Fullscreenxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /f# Specific resolutionxfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /size:1920x1080xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /w:1600 /h:900# Dynamic resize (resize window and RDP session follows)xfreerdp3 /u:Administrator /p:'Password1' /v:10.10.10.10 /cert:ignore /dynamic-resolution
# Netcat port checknc -nv 10.10.10.10 3389# Nmapnmap -p 3389 -sV --script rdp-enum-encryption 10.10.10.10nmap -p 3389 --script rdp-vuln-ms12-020 10.10.10.10 # BlueKeep/MS12-020 check# If no response on 3389, check if RDP is on a different portnmap -p 3387,3388,3389,3390 -sV 10.10.10.10