Windows Remote Protocols
Overview
Windows systems utilize various remote management protocols for system administration, monitoring, and control. These protocols enable IT administrators to manage Windows machines remotely and provide various levels of access and functionality.
RDP (Remote Desktop Protocol)
Overview
RDP (Remote Desktop Protocol) is a proprietary protocol developed by Microsoft that allows for remote connections to Windows systems. It provides full desktop access with graphical user interface over network connections.
Key Characteristics:
Port 3389: Default RDP port
Authentication: Network Level Authentication (NLA), password-based
Encryption: TLS encryption for secure connections
Functionality: Full desktop remote access
Clients: Windows Remote Desktop, mstsc, rdesktop, xfreerdp
RDP Features
Desktop Sharing: Full graphical desktop access
Multi-Session: Multiple simultaneous connections
RemoteApp: Application-specific remote access
Clipboard Integration: Copy/paste between local and remote systems
Drive Redirection: Access to local drives from remote session
RDP Configuration
RDP Enumeration
RDP Security Issues
Weak Authentication: Default or weak passwords
Version Vulnerabilities: Outdated RDP versions
Encryption Issues: Weak encryption protocols
Brute Force: Password guessing attacks
Network Exposure: RDP accessible from internet
WinRM (Windows Remote Management)
Overview
WinRM (Windows Remote Management) is Microsoft's implementation of the WS-Management Protocol, providing remote management capabilities for Windows systems. It enables remote execution of commands and scripts.
Key Characteristics:
Port 5985: HTTP (unencrypted)
Port 5986: HTTPS (encrypted)
Authentication: Kerberos, NTLM, Basic, Certificate
Protocol: SOAP over HTTP/HTTPS
Functionality: Remote command execution, PowerShell remoting
WinRM Features
PowerShell Remoting: Remote PowerShell sessions
Command Execution: Execute commands on remote systems
Event Forwarding: Forward Windows events
Configuration Management: Remote system configuration
Scalability: Manage multiple systems simultaneously
WinRM Configuration
WinRM Enumeration
WinRM Security Issues
Weak Authentication: Basic authentication over HTTP
Configuration: Overly permissive settings
Encryption: Unencrypted HTTP transport
Access Control: Insufficient access restrictions
Credential Exposure: Credentials in scripts and configurations
WMI (Windows Management Instrumentation)
Overview
WMI (Windows Management Instrumentation) is Microsoft's implementation of Web-Based Enterprise Management (WBEM) and Common Information Model (CIM). It provides a standardized way to access management information in an enterprise environment.
Key Characteristics:
Port 135: RPC endpoint mapper
Dynamic Ports: Random high ports for actual communication
Authentication: Windows authentication (NTLM, Kerberos)
Functionality: System information, configuration, monitoring
Access: Local and remote management
WMI Components
WMI Service: Core service providing WMI functionality
WMI Repository: Database storing WMI class definitions
WMI Providers: Components that provide management data
WMI Classes: Object-oriented representation of manageable resources
WQL: WMI Query Language for data retrieval
WMI Configuration
WMI Enumeration
WMI Security Issues
Authentication: Windows authentication bypass
Access Control: Insufficient WMI permissions
Information Disclosure: Sensitive system information
Privilege Escalation: WMI-based escalation techniques
Persistence: WMI event subscriptions for persistence
Advanced Enumeration Techniques
RDP Advanced Enumeration
WinRM Advanced Enumeration
WMI Advanced Enumeration
Practical Examples
HTB Academy Style RDP Enumeration
HTB Academy Style WinRM Enumeration
HTB Academy Lab Questions Examples
Security Assessment
RDP Security Assessment
WinRM Security Assessment
WMI Security Assessment
Enumeration Checklist
RDP Enumeration
WinRM Enumeration
WMI Enumeration
Attack Vectors
RDP Attack Vectors
WinRM Attack Vectors
WMI Attack Vectors
Common Vulnerabilities
RDP Vulnerabilities
CVE-2019-0708: BlueKeep RCE vulnerability
CVE-2019-1181: DejaBlue RCE vulnerability
CVE-2019-1182: DejaBlue RCE vulnerability
CVE-2012-0002: RDP denial of service
CVE-2018-0886: CredSSP authentication bypass
WinRM Vulnerabilities
Configuration Issues: Weak authentication settings
Network Exposure: WinRM accessible from untrusted networks
Authentication Bypass: Weak authentication mechanisms
Privilege Escalation: WinRM-based escalation techniques
WMI Vulnerabilities
WMI Event Subscriptions: Persistence mechanisms
WMI Query Injection: Malicious WQL queries
Access Control: Insufficient WMI permissions
Information Disclosure: Sensitive system information
Tools and Techniques
RDP Tools
WinRM Tools
WMI Tools
Defensive Measures
RDP Hardening
WinRM Security
WMI Security
Best Practices
RDP Best Practices
Change default port: Use non-standard ports
Enable NLA: Require Network Level Authentication
Use strong passwords: Implement password policies
Limit access: Restrict RDP access to authorized users
Monitor connections: Log and monitor RDP sessions
Keep updated: Apply security patches regularly
WinRM Best Practices
Use HTTPS: Enable SSL/TLS encryption
Restrict authentication: Disable basic authentication
Limit access: Configure trusted hosts carefully
Monitor activity: Log WinRM connections and commands
Network security: Use firewall rules and VPNs
Regular audits: Review WinRM configuration regularly
WMI Best Practices
Access control: Set appropriate WMI permissions
Monitor activity: Log WMI queries and changes
Disable if unused: Turn off WMI if not needed
Regular audits: Review WMI configuration and usage
Network security: Restrict WMI network access
Update regularly: Keep WMI components updated
Detection and Monitoring
RDP Monitoring
WinRM Monitoring
WMI Monitoring
Last updated