Skip to content
WETNav

Lateral movement

RDP lateral movement

mstsc.exeFreeRDP / xfreerdprdesktop

Interactive lateral movement over RDP. Destination logs LogonType 10; the source records which servers it connected to.

Artifacts by host

Every place this technique leaves a trace. Collect all three sides; each one fills gaps the others leave.

Source

Where the operator ran the tool

  • RDP client1024

    The RDP client attempting to connect, recording the destination server name.

  • RDP client1102

    The RDP client session disconnecting from the destination.

  • Registry: HKCU\Software\Microsoft\Terminal Server Client\Default and \Servers

    Most-recently-used list of RDP destinations the user connected to from this host.

  • Bitmap cache: %LOCALAPPDATA%\Microsoft\Terminal Server Client\Cache\*.bin and bcache*.bmc

    Cached fragments of the remote screen that can reconstruct what was displayed.

Destination

The machine being accessed

  • Security4624

    LogonType 10 (RemoteInteractive); with NLA, a LogonType 3 may precede the LogonType 10.

  • RDP connections1149

    User authentication succeeded at the network layer, with the user and source IP.

  • RDP sessions21

    Session logon succeeded, with the account and source address.

  • RDP sessions22

    Shell start notification received (the desktop began loading).

  • RDP sessions24

    Session disconnected, with the account and source address.

  • RDP sessions25

    Session reconnection, indicating a returning session.

  • RDP transport131

    Inbound RDP TCP connection accepted, with the client IP, including connections that never authenticate.

  • Security4778

    A session was reconnected to a window station (RDP reconnect).

  • Security4779

    A session was disconnected from a window station (RDP disconnect).

Domain controller

Authentication records

  • Security4769

    Kerberos service ticket for the destination: ServiceName is the destination computer account (DEST$) for the TERMSRV/<dest> SPN, and IpAddress is the source host. The DC-side record that ties source, account and destination together.

  • Security4768

    TGT request for the account from the source IP, when it had no valid TGT yet (for example right after runas or an explicit-credential logon on the source).

  • Security4776

    NTLM credential validation with Workstation set to the source name, when NTLM was used instead of Kerberos (destination addressed by IP, or pass-the-hash). Domain accounts only; local accounts are validated on the destination.

Fingerprints

Strings and values specific enough to search for directly.

  • 014624 LogonType 10 (RemoteInteractive), or LogonType 3 then 10 when NLA is enabled
  • 02Destination port 3389
  • 03RCM event 1149 with the source IP at network authentication
  • 04LSM 21/22 (logon and shell start) and 24/25 (disconnect and reconnect)
  • 05RDPClient 1024 on the source naming the destination server
  • 06Bitmap cache bcache*.bmc and the Terminal Server Client MRU on the source

How it works

RDP gives an operator a full interactive desktop on the target, which is attractive once valid credentials are held. mstsc.exe or an alternate client connects on port 3389; the destination authenticates the user and starts a session. The canonical destination marker is Security 4624 with LogonType 10 (RemoteInteractive). When Network Level Authentication is enabled the account first authenticates over the network, so you may see a LogonType 3 followed by a LogonType 10 for the same logon. The TerminalServices logs add a session timeline: the LocalSessionManager records logon, shell start, disconnect, and reconnect, and the RemoteConnectionManager records successful authentication with the source IP. Crucially, the source host's RDP client log records which servers the user connected to, which lets you trace movement backwards.

Hunt queries

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624} |
  Where-Object { $_.Message -match 'Logon Type:\s*10' }

Benign look-alikes

  • Routine administrative RDP by IT staff and help desk.
  • Jump hosts and bastion servers that legitimately receive many RDP sessions.
  • Remote workers connecting to their own workstations.

References