RDP
Remote Desktop Protocol
Look for terminal servers in a domain:
PS > Get-ADComputer -LDAPFilter "(&(objectClass=computer)(memberOf=CN=Terminal Server License Servers,CN=Builtin,$((Get-ADRootDSE).rootDomainNamingContext)))" | select dNSHostNameTerminal Services API
qwinsta
Enable RDP
With meterpreter:
meterpreter > run getgui -eWith reg.exe:
Cmd > reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /fWith PowerShell:
Manually add firewall rule (if necessary):
Restricted Admin
RDP with PtH: RDP needs a plaintext password unless Restricted Admin mode is enabled.
Check / enable / disable with PowerShell:
Check / enable / disable with Impacket:
Enable with CME:
Usage:
Remote Credential Guard
Smart Card Authentication
Disable enforced smart card authentication during interactive logon:
Emulating PIV
NLA
Disable NLA:
Hijack RDP Sessions
Run Task manager as LocalSystem to hijack other users' sessions:
The same can be achieved with tscon.exe:
Tools
Tools
SharpRDP
SharpRDPHijack
TakeMyRDP
Last updated