1. Resources
  2. Identity Threats
  3. Active Directory

RDP Session Shadowing

Also known as: Shadow RDP, RDS shadowing, mstsc /shadow abuse, Remote Desktop shadow session, Remote control of RDP sessions

An attacker with administrator rights on a Windows host uses the built-in Remote Desktop shadowing feature to watch or control another user's live session, and can switch off the consent prompt first.

Platform
Active Directory
Impact
High
Last updated
Attack difficulty
Low
Detection difficulty
Medium
Privileges required: Specific rights or roles
Local administrator on the host that holds the session (or the Remote Control permission on its RDP listener), and network access to it over SMB and RPC.
What the attacker gains
A live view of the victim's desktop, or keyboard and mouse control of it, while the victim stays connected. Without consent when policy allows it.
Threat groups
AxiomNIMBUS MANTICOREAgriusAkiraAPT1APT19APT3APT32APT38APT39APT41APT42APT5Aquatic Pandaand 39 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1563.002, T1021.001, T1112.

How it works

Remote Desktop Services can attach a second connection to a session that is already in use. The feature is called shadowing or remote control, and it exists so that support staff can see what a user sees. The shadower either watches (view) or shares the keyboard and mouse (control). The original user stays connected the whole time.

Two settings on the target decide what is allowed. Both live in the policy "Set rules for remote control of Remote Desktop Services user sessions", stored as the Shadow value under HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services:

Value Meaning
0 No remote control allowed
1 Full Control with user's permission
2 Full Control without user's permission
3 View Session with user's permission
4 View Session without user's permission

When the policy is not set, shadowing is allowed with the user's consent: the user gets a prompt and can refuse.

The abuse follows from who can change that value. An administrator of the machine can write the registry value directly, or a Group Policy can set it for many machines. With Shadow set to 2 or 4, the client option /noConsentPrompt starts the shadow session with no question asked. The victim's screen shows nothing in view mode.

Variants:

  • View only, without consent (4). Silent observation: the attacker reads what the user types into visible windows, watches consoles and sees documents and web sessions.
  • Control, without consent (2). The attacker also sends input. The user sees the mouse move and can fight for it, so operators wait until the user is idle but the session is still active and unlocked.
  • With consent (1, 3). The user must accept. This is the legitimate support flow; it becomes an attack only through social engineering.

Unlike RDP session hijacking with tscon, shadowing does not move or disconnect the session, and it does not go through the normal RDP listener. The shadowing client reaches the target over SMB and RPC, and the target starts RdpSa.exe in the shadowed session to carry the connection. Windows ships a firewall rule for it, "Remote Desktop - Shadow (TCP-In)".

Prerequisites

  • Administrator rights on the target host, or the Remote Control permission on its Remote Desktop listener.
  • A session on the target with a user signed in. Shadowing a disconnected session shows nothing useful.
  • Network access from the attacker's Windows client to the target for SMB and RPC, and the shadow firewall rule enabled on the target.
  • For the silent variants: the Shadow policy value at 2 or 4, already configured or set by the attacker. A domain policy that enforces another value wins at the next refresh.

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 the session

query user /server:SRV01

Note the session ID of the target user and check that the state is Active.

2. Check the remote control policy

reg query "\\SRV01\HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v Shadow

An error that the value was not found means the policy is not configured, so shadowing asks for consent.

3. Remove the consent requirement

With administrator rights on the target, set the value. 2 allows control and 4 allows viewing, both without the user's permission:

reg add "\\SRV01\HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v Shadow /t REG_DWORD /d 2 /f

4. Shadow the session

:: View only
mstsc /v:SRV01 /shadow:2 /noConsentPrompt

:: View and control
mstsc /v:SRV01 /shadow:2 /control /noConsentPrompt

:: Supply other credentials for the connection
mstsc /v:SRV01 /shadow:2 /control /noConsentPrompt /prompt

/shadow: takes the session ID from step 1, /control adds input, and /noConsentPrompt skips the user's approval where the policy permits it. Without that switch the user is asked first.

5. Put the policy back

Restore the previous state so the change does not stand out in a later review. If the value did not exist before, delete it:

reg delete "\\SRV01\HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v Shadow /f

Impact

View access exposes whatever is on the screen: administrative consoles, credentials typed into visible fields, password manager entries when the user opens them, mail and documents. Control access lets the attacker act inside the user's unlocked session with the user's rights, including in applications that were already authenticated with MFA.

When the shadowed user is an administrator working on a server, the attacker gains that administrator's reach without stealing a credential, which makes shadowing a route for lateral movement that credential theft detections do not see. The legitimate nature of the feature also gives cover: an open support ticket explains a shadow session, but only for the operator, target, time and mode the ticket names.

OPSEC and artifacts

  • View mode over control. View-only shadowing changes nothing on the victim's screen. It is still recorded: the target's Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational log writes event 20503 ("Shadow View Session Started") and 20504 (stopped), with the shadowing user, their computer, the shadowed user and the session ID. Control sessions write 20506 and 20507.
  • No consent, no consent event. With consent the same log records the user's decision: 20508 (view permission granted), 20509 (view permission denied) or 20510 (control permission granted). A start event with no permission event before it is a session that was not approved by the user.
  • Changing the policy by registry. The write to Shadow is visible to Sysmon event 13 and, with a SACL on the key, to event 4657. A remote reg add also needs the Remote Registry service and an authenticated SMB session to the target: event 4624, type 3, for the attacker's account.
  • Restoring the value. Putting the policy back hides it from a configuration review, not from the logs: the two registry writes bracket the shadow session.
  • Processes. On the target, RdpSa.exe starts in the victim's session for the duration of the shadow. On the attacker's client, mstsc.exe runs with /shadow: on its command line (event 4688 with command line auditing).
  • Not on port 3389. Network monitoring that only looks at RDP connections misses shadowing, which arrives over SMB and RPC from the shadower's machine.

Detection

  • Shadow sessions on servers. Collect the RemoteConnectionManager operational log from session hosts, jump servers and administrative workstations, and alert on 20503 and 20506 where the shadowing user is not in the support group, or where no permission event precedes the start:
Event
| where EventLog == "Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational"
| where EventID in (20503, 20504, 20506, 20507, 20508, 20509, 20510)
| project TimeGenerated, Computer, EventID, RenderedDescription
| order by TimeGenerated asc
  • The consent policy being weakened. A change of Shadow to 2 or 4 outside a Group Policy rollout, especially when it is changed back soon after:
DeviceRegistryEvents
| where RegistryKey has @"Policies\Microsoft\Windows NT\Terminal Services"
| where RegistryValueName =~ "Shadow"
| project Timestamp, DeviceName, ActionType, RegistryValueData, PreviousRegistryValueData,
    InitiatingProcessAccountName, InitiatingProcessFileName, InitiatingProcessCommandLine
  • The client side. mstsc.exe with /shadow and /noConsentPrompt on a machine that is not a helpdesk workstation.
  • RdpSa.exe on hosts where nobody is supported. The process should not appear on domain controllers or Tier 0 servers at all.
  • Fleet configuration. Report every machine where Shadow is 2 or 4, and check which policy set it.

Legitimate helpdesk shadowing produces the same events. Match the operator, the target and the mode against the support record, and treat control without consent as an exception that needs its own approval.

Mitigation

  • Set the remote control policy centrally. Configure "Set rules for remote control of Remote Desktop Services user sessions" (Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Connections) by Group Policy: "No remote control allowed" on servers and privileged workstations, and a with-permission option where the helpdesk needs it. A domain policy overwrites a local registry change at the next refresh. The gpresult and RSoP guide shows how to confirm the effective setting on a machine.
  • Never allow the no-permission options broadly. If a kiosk or training scenario needs them, scope the policy to those machines only.
  • Disable the shadow firewall rule ("Remote Desktop - Shadow (TCP-In)") on hosts that are never supported this way, and limit SMB and RPC to servers from management networks.
  • Reduce who is administrator on session hosts, jump servers and workstations of privileged users. Shadowing, like session hijacking, is available to every local administrator. Tier separation and privileged access management keep high-value sessions off machines that lower-tier administrators control; see the Active Directory hardening guide.
  • Protect the policy source. Whoever can edit a GPO linked to these machines can set Shadow for all of them; see GPO abuse.
  • Use a support tool with its own audit trail for helpdesk work, and require a ticket that names operator, target and mode.

Log events to collect

FAQ

What is RDP shadowing?

Shadowing is a Remote Desktop Services feature that attaches a second person to an existing session so they can watch it or control it together with the user. It is meant for helpdesk support. It works on Remote Desktop sessions and on the console session of current Windows versions, and it is started with mstsc /shadow.

Does the user see that they are being shadowed?

By default, yes: Windows asks the user for permission before the shadow session starts. The prompt is controlled by the policy Set rules for remote control of Remote Desktop Services user sessions. An administrator of the machine can set it to full control or view without the user's permission, and then no prompt is shown.

How is shadowing different from tscon session hijacking?

Hijacking with tscon moves the session to the attacker and disconnects the victim. Shadowing leaves the victim connected and adds the attacker as a second viewer or controller. Shadowing needs an active session with a user in front of it, while tscon also works on disconnected sessions.

Which events show a shadow session?

The Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational log on the target records event 20503 and 20504 when a view session starts and stops, 20506 and 20507 for a control session, and 20508, 20509 and 20510 for the user's consent decision. Each start event names the shadowing user, their computer and the shadowed user.

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.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.