How it works
Remote Desktop Protocol (RDP) gives a user a full graphical session on another Windows computer. An attacker who holds a domain account's password, and finds a host where that account may sign in through Remote Desktop Services, simply connects. Nothing is exploited. This page covers that plain case: admission with a valid account. Taking over other people's sessions is covered in RDP session hijacking, RDP shadowing and RDPInception.
Admission is decided by a user right, not by a file or service permission:
- Allow log on through Remote Desktop Services (
SeRemoteInteractiveLogonRight). By default, Administrators hold it on domain controllers, servers and workstations. The Remote Desktop Users group also holds it on workstations and member servers, but not on domain controllers. - Deny log on through Remote Desktop Services overrides the allow right for the accounts and groups it names.
- Group membership and nesting. Remote Desktop Users is a local group. Domain groups are added to it by hand, by Restricted Groups or by Group Policy Preferences, often for whole OUs of servers. "Domain Users in Remote Desktop Users" on a terminal server or a jump host is a common finding and means every domain account can log on there.
- The listener. Remote Desktop must be enabled on the host, and a gateway or connection broker in front of it applies its own authorization.
Unlike the other remote administration channels, RDP does not need administrator rights. A member of Remote Desktop Users gets an ordinary desktop with a standard token. That is enough to browse file shares, run tools in the user's context, read data in applications that are installed on the server, and attempt local privilege escalation.
Two properties of the logon matter to both sides:
- It is an interactive logon. With a normal connection the client delivers the user's credentials to the remote host, where they stay in memory for the session. An administrator who uses RDP to reach a compromised server hands their credentials to whoever controls it.
- Restricted Admin mode changes that. The client does not send the credentials, which protects the administrator, but it also means the logon can be completed with only the NT hash. A target that accepts the mode (
DisableRestrictedAdminset to 0 underHKLM\SYSTEM\CurrentControlSet\Control\Lsa) therefore allows Pass-the-Hash over RDP for accounts that are administrators there. Remote Credential Guard is the alternative that keeps credentials on the client and redirects Kerberos requests back to it.
Prerequisites
- Valid credentials for a domain account: a password, or for Restricted Admin mode an NT hash.
- The account holds the allow right on the target and is not covered by the deny right. For Restricted Admin mode the account must be an administrator of the target and the target must accept the mode.
- Network access to the target's RDP listener, TCP 3389 by default, directly or through a gateway.
- Remote Desktop enabled on the target.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Find where the account can log on
The grant is a local group membership, so it is found by reading local groups or the policies that set them. Attack path tools collect it as a "can RDP" relationship between users, groups and computers. From an existing remote session on a host, the local group can be read directly:
Get-LocalGroupMember -Group "Remote Desktop Users"
Get-LocalGroupMember -Group "Administrators"
2. Connect from Windows
:: Standard connection; credentials are entered in the client
mstsc /v:SRV01.corp.example.com
:: Session for administering the server, prompting for credentials
mstsc /v:SRV01.corp.example.com /admin /prompt
:: Restricted Admin mode: credentials are not sent to the remote computer
mstsc /v:SRV01.corp.example.com /restrictedAdmin
With /restrictedAdmin, the client authenticates with the credentials of the current logon session. An attacker who has started a process with a stolen NT hash in that session reaches the target without knowing the password.
3. Connect from Linux
FreeRDP takes the credentials on the command line:
# Password
xfreerdp /v:SRV01.corp.example.com /u:alice /d:CORP /p:'<password>' /cert:ignore
# With clipboard and a local directory redirected into the session, for moving files
xfreerdp /v:192.0.2.20 /u:alice /d:CORP /p:'<password>' /cert:ignore +clipboard /drive:tools,/opt/tools
# NT hash, which uses Restricted Admin mode
xfreerdp /v:192.0.2.20 /u:alice /d:CORP /pth:<nt-hash> /cert:ignore
4. Use the session
Inside the desktop the attacker has the user's mapped drives, saved application sessions, browser profiles and management consoles. On an administrator's jump host this often includes consoles that are already connected to domain controllers, hypervisors or cloud portals. If the account is a local administrator of the host, the next step is usually credential theft from the other sessions on it (LSASS credential dumping).
Impact
The attacker works on the target as the user, with a full desktop. On a session host shared by many users, or a jump server used by administrators, one admitted account puts the attacker next to the credentials of everyone else who signs in there. Where the account is an administrator of the host, the host is fully compromised.
The reverse direction matters too: every privileged account that connects to an attacker-controlled host with a normal RDP logon exposes its credentials to the attacker.
OPSEC and artifacts
- Looks like normal work. RDP by a valid account in working hours from a plausible source is hard to tell from the user. What gives it away is the combination: an account that never used RDP before, a source that is not that user's workstation, or a chain of RDP hops from server to server.
- Destination logon. Event 4624 with logon type 10 on the target, carrying the account, the client address and, in current versions, whether Restricted Admin mode was used. With network level authentication a type 3 logon from the same client can appear first. A reconnect to an existing disconnected session can be recorded as a type 7 logon instead of a new type 10. Event 4672 follows for administrators.
- Failed attempts. Event 4625 on the target for wrong passwords and for accounts that are valid but not allowed to log on this way.
- Session logs that do not depend on audit policy.
Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operationalevent 1149 records a successful network-level authentication with the user and client address.Microsoft-Windows-TerminalServices-LocalSessionManager/Operationalrecords session logon (21), shell start (22), logoff (23), disconnect (24) and reconnect (25) with the session ID and source address. These channels are on by default, so they still hold the session when the Security log has rolled over or was cleared. - Reconnect and disconnect. Events 4778 and 4779 in the Security log record a session being reconnected and disconnected, with the client name and address, where Audit Other Logon/Logoff Events is enabled.
- Restricted Admin. Using a hash through Restricted Admin avoids typing a password, but the 4624 record marks the mode. Onward network access from that session is made as the computer account of the remote host, not as the user.
- Client side. The Windows client keeps a hidden
Default.rdpfile in the user's Documents folder, and saved.rdpfiles land there by default. On a compromised workstation these show where the user, or the attacker, connected. - Disconnecting instead of logging off leaves the session and its processes running, and leaves the credentials in memory for the next administrator of the host to find.
Detection
- New account and host pairs. Baseline which accounts open type 10 sessions on which hosts, and alert on first-time pairs for servers, on service accounts using RDP at all, and on privileged accounts signing in to lower-tier machines.
- RDP chains. A host that receives an RDP logon and within minutes is the source of an RDP logon to another server.
- Source of the session. Server-to-server and workstation-to-workstation RDP is rare in most environments. Connections that bypass the gateway or jump host are worth an alert.
- Restricted Admin logons on hosts where administrators do not use that mode, and any change that sets
DisableRestrictedAdminto 0. - Failure bursts. Many 4625 events with logon type 10 or 3 against the RDP listener from one source is password guessing; see password spraying.
- NTLM by privileged accounts is covered by the Pass-the-Hash rules.
// Remote interactive logons, reconnects and disconnects on one host
WindowsEvent
| where Computer =~ "SRV01.corp.example.com" and Provider == "Microsoft-Windows-Security-Auditing"
| where EventID in (4624, 4778, 4779)
| extend d = EventData
| where EventID != 4624 or tostring(d.LogonType) in ("10", "7")
| project TimeGenerated, Computer, EventID,
Account = coalesce(tostring(d.TargetUserName), tostring(d.AccountName)),
Domain = coalesce(tostring(d.TargetDomainName), tostring(d.AccountDomain)),
LogonId = coalesce(tostring(d.TargetLogonId), tostring(d.LogonID)),
Session = tostring(d.SessionName),
Address = coalesce(tostring(d.IpAddress), tostring(d.ClientAddress)),
RestrictedAdmin = tostring(d.RestrictedAdminMode)
| order by TimeGenerated asc
// Accounts that opened RDP sessions on many hosts in one day
SecurityEvent
| where EventID == 4624 and LogonType == 10
| summarize Hosts = dcount(Computer), HostList = make_set(Computer, 20) by TargetUserName, IpAddress, bin(TimeGenerated, 1d)
| where Hosts >= 5
| order by Hosts desc
A destination behind a gateway or broker can record the intermediate system as the source. Use the gateway's own connection log for the real client address. The account in the event identifies who was admitted, not who was at the keyboard.
Mitigation
- Restrict admission. Review the effective allow and deny rights per server role. Keep only Administrators on domain controllers, and on other servers add named, role-specific groups to Remote Desktop Users instead of broad ones. Remove Domain Users and Authenticated Users wherever they appear. Keep delegated support access time-bounded.
- Deny privileged accounts on lower tiers. Assign Deny log on through Remote Desktop Services to Tier 0 groups on workstations and member servers, so that their credentials are never delivered there. The Active Directory hardening guide covers the tier model.
- Use dedicated administration paths. Administrators connect from privileged access workstations through a gateway or jump host, and servers accept TCP 3389 only from there.
- Protect credentials in the session. Use Remote Credential Guard where it is supported, so that credentials stay on the client. Treat Restricted Admin as a trade: it protects the connecting administrator but allows hash-based logon, so enable it only where reusable NTLM material for those accounts is otherwise controlled. Protect LSASS on session hosts as described in the LSA protection and Credential Guard guide.
- Require network level authentication and multifactor authentication at the gateway for remote access.
- Limit session lifetime. Set time limits for disconnected and idle sessions so that abandoned desktops, and the credentials behind them, do not remain on shared hosts.
- Disable drive and clipboard redirection on session hosts where no workflow needs them.
- Audit. Enable Audit Logon and Audit Other Logon/Logoff Events and collect the two TerminalServices operational channels. See the audit policy guide.
Detection rules for this attack
Log events to collect
FAQ
Who can sign in to a Windows computer over RDP?
Accounts that hold the Allow log on through Remote Desktop Services user right and are not covered by the matching deny right. By default Administrators hold it everywhere, and the Remote Desktop Users group holds it on workstations and member servers but not on domain controllers.
Can RDP be used with an NT hash instead of a password?
Only in Restricted Admin mode. In that mode the client does not send the password to the server, so the logon can be completed with the hash alone. The target must accept the mode and the account must be an administrator there. FreeRDP exposes this with its /pth option.
Why is RDP riskier for the account than WinRM or SMB?
A normal RDP logon is an interactive logon: the user's credentials are delivered to the remote host and kept in LSASS for the life of the session, including after a disconnect. An attacker with administrator rights on that host can take them. Network logons such as SMB and WinRM do not leave reusable credentials there.
Which event shows an RDP logon?
Event 4624 with logon type 10 on the destination, with the account and the client address. The TerminalServices-LocalSessionManager log records the session logon (event 21) and reconnects (event 25), and the RemoteConnectionManager log records successful network-level authentication (event 1149).
References
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.