Overview
TheRDPSavedConnections command enumerates saved Remote Desktop Protocol (RDP) connections stored in the Windows registry. These entries reveal systems that users have previously connected to via RDP, providing valuable intelligence about infrastructure and lateral movement opportunities.
Important: User commands run for the current user if not elevated and for ALL users if elevated.
Syntax
Output
The command returns:- RDP server hostnames and IP addresses
- Saved connection names
- Username hints (when available)
- Last connection timestamps (when available)
- User context for each saved connection
- Connection settings and preferences
Use Cases
Red Team
- Network Mapping: Discover RDP-accessible servers and workstations
- Lateral Movement Planning: Identify targets for RDP-based lateral movement
- Infrastructure Discovery: Map organizational server topology
- User Profiling: Understand which systems users regularly access
- Target Prioritization: Identify frequently accessed systems
Blue Team
- Asset Discovery: Document RDP connection patterns across the organization
- Access Audit: Review RDP access history and patterns
- Incident Response: Track RDP connections during security investigations
- Anomaly Detection: Identify unusual RDP connection patterns
- Compliance Monitoring: Ensure remote access aligns with policies
Example Output
Privilege Context
- Non-Elevated: Returns saved RDP connections for the current user only
- Elevated: Returns saved RDP connections for ALL users on the system, providing comprehensive RDP connection mapping
Remote Execution
This command supports remote execution (marked with + in the command list). Remote syntax:Detection Considerations
Indicators
- Registry enumeration of RDP connection keys
- Access to HKCU\Software\Microsoft\Terminal Server Client
- Reading Default and Servers registry values
- Enumeration across multiple user profiles
Defensive Monitoring
- Monitor registry access to Terminal Server Client keys
- Alert on automated enumeration of RDP connection history
- Track processes reading RDP configuration data
- Log bulk access to RDP settings across multiple users
- Detect reconnaissance tools mapping RDP infrastructure
- Monitor for unusual RDP connection patterns
What Saved Connections Reveal
- Complete list of RDP servers accessed by users
- Internal infrastructure (domain controllers, SQL servers, etc.)
- IP addresses and hostnames of critical systems
- Admin access patterns (administrator accounts)
- Lateral movement history
- Network topology and naming conventions
Registry Locations
HKCU\Software\Microsoft\Terminal Server Client\Default- Default usernameHKCU\Software\Microsoft\Terminal Server Client\Servers- Server MRU list- Individual server entries contain UsernameHint values
Related Commands
- RDCManFiles: Finds Remote Desktop Connection Manager configuration files
- RDPSessions: Shows current incoming RDP sessions
- RDPsettings: Displays Remote Desktop Server/Client settings
- LogonEvents: Shows logon event logs which include RDP logons
- PuttySessions: Enumerates saved Putty/SSH sessions
- MappedDrives: Shows mapped network drives