RDP (Remote Desktop Protocol)
Default Port: 3389
Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft that provides a graphical interface for users to connect to another computer over a network connection. RDP is widely used for remote administration, technical support, and accessing work computers from home. It transmits keyboard, mouse, and display data between client and server, making it a critical service in Windows environments.
Connect
Using mstsc (Windows)
# Basic connection
mstsc /v:target.com
# With specific port
mstsc /v:target.com:3389
# Full screen mode
mstsc /v:target.com /f
# Admin mode
mstsc /v:target.com /admin
# Save connection settings
mstsc /v:target.com /save:connection.rdp
Using xfreerdp (Linux)
# Basic connection
xfreerdp /v:target.com
# With credentials
xfreerdp /u:administrator /p:password /v:target.com
# With domain
xfreerdp /u:DOMAIN\\username /p:password /v:target.com
# Full options
xfreerdp /u:administrator /p:password /v:target.com:3389 \
/cert:ignore /size:1920x1080 +clipboard +drives
# Pass-the-Hash
xfreerdp /u:administrator /pth:NTHASH /v:target.com
# Dynamic resolution
xfreerdp /u:username /p:password /v:target.com /dynamic-resolution
Using rdesktop
# Basic connection
rdesktop target.com
# With credentials
rdesktop -u username -p password target.com
# Full screen
rdesktop -f -u username target.com
# Specific resolution
rdesktop -g 1920x1080 -u username target.com
Recon
Service Detection with Nmap
Use Nmap to detect RDP services and identify server capabilities.
nmap -p 3389 target.com
Banner Grabbing
Connect to RDP services to gather version and security information.
Using nmap
# Using nmap
nmap -p 3389 -sV target.com
Using rdp-sec-check
# Using rdp-sec-check
python rdp-sec-check.py target.com
Using openssl
# Check RDP certificate
openssl s_client -connect target.com:3389 < /dev/null 2>&1 | openssl x509 -noout -text
Version and Configuration Check
Extract RDP version and security configuration information.
# Check Windows version through RDP
nmap -p 3389 --script rdp-ntlm-info target.com
# Security layer check
nmap -p 3389 --script rdp-enum-encryption target.com
# Output shows:
# - RDP Protocol version
# - Security layer (RDP/TLS/CredSSP)
# - Encryption level