Skip to main content

RDP Lateral Movement Analysis

Trace RDP lateral movement through Windows event logs and on-host triage artifacts.

Task 1: Introduction

Remote Desktop Protocol (RDP) is widely used by system administrators to manage Windows hosts remotely across an environment. However, attackers abuse this same capability for lateral movement, pivoting through stolen credentials and chaining across multiple hosts to reach high-value targets. Sophos's Active Adversary Report for 1H 2024 found that attackers used RDP for internal lateral movement in 90% of the attacks it investigated, and Mandiant's ransomware retrospective reported similar numbers (RDP used for lateral movement in about 85% of the intrusions it investigated). CISA advisories document ransomware operators like BianLian and RansomHub and nation-state actors like Volt Typhoon using RDP. MITRE ATT&CK, a public knowledge base of attacker techniques, lists RDP as sub-technique T1021.001, a more specific entry under its Remote Services technique (T1021).

In this room, we will focus on RDP as a lateral movement technique in Windows environments. We'll learn how to identify, correlate, and reconstruct RDP-based lateral movement during real-world investigations.

Learning Objectives

  • Read RDP-specific event log entries on source and destination hosts and identify malicious sessions by the patterns that distinguish them from legitimate ones
  • Correlate RDP activity between source and destination using IP pivots, account names, and Terminal Services session events
  • Recover RDP-specific on-host artifacts (the Terminal Server Client registry keys and the bitmap cache) when event logs are cleared
  • Apply audit policies, network controls, and detection rules that actually reduce RDP-based lateral movement exposure

Prerequisites

Machine Access

Before proceeding, start the lab by clicking the green Start Machine button. Please wait about three minutes for the machine instance to launch.

We provide access to an analyst workstation preloaded with triage collections for this room: copies of each host's forensic files, collected with the Velociraptor triage tool (its Windows.KapeFiles.Targets collection). Once it's up, a session opens on the right side of the screen; if you don't see it, click the blue Show Split View button at the top of the page. If you prefer using RDP, you can use the following credentials:

Credentials

Only needed if you're using your own machine.

Username
DFIRUser
Password
TryH@cKMe1!433
IP address
MACHINE_IP
Connection via
RDP

On the D:\ drive, you'll find two folders: D:\Walkthrough\ holds the triage we'll use in Tasks 4 and 5, and D:\Challenge\ holds the triage for the hands-on investigation in Task 6. All forensic tools are pre-installed and live in the DFIR Tools folder under C:\Users\DFIRUser\.

Answer the questions below

  1. I have successfully started my analyst workstation instance.

Task 2: How RDP Lateral Movement Works

Remote Desktop Protocol (RDP) is a built-in Windows feature that gives a connecting user a full graphical session on a remote host across the network. When an attacker has acquired valid credentials, this technique allows them to log on interactively to any reachable Windows machine that has RDP turned on and allows that account to log on over RDP, without uploading a binary or running a specialized tool.

When a user double-clicks mstsc.exe (Remote Desktop Connection, the built-in RDP client) and types a hostname into the Computer field, as shown in the screenshot, the client resolves the hostname and opens a connection to TCP 3389 on the destination's Remote Desktop Services (TermService). Once connected, the session can also send data over UDP 3389, next to the TCP connection.

The flow that happens is:

  1. The client opens TCP 3389 to the destination
  2. NLA (Network Level Authentication) pre-authenticates the connection using CredSSP (the Credential Security Support Provider protocol) before any session resources are allocated
  3. The destination validates the credentials against the local SAM (Security Account Manager) database, or against Active Directory (AD) using Kerberos or NTLM
  4. The destination creates the session and starts the Windows shell (explorer.exe) under the user's context
  5. Supporting processes normally start in the session, such as rdpclip.exe (clipboard sharing) and tstheme.exe (theme rendering)
  6. The server streams bitmap data to the client and receives keyboard and mouse input back

Key Components

There's an important thing that we need to understand about RDP, which is that the connection runs a small set of processes and services, and knowing which runs where is one of the clearest ways to tell whether RDP was attempted. We'll cover this in more detail in the artifacts section, but here, generally what we need to understand is:

  • The source host runs the client, mstsc.exe.
  • After successful connection, the destination host runs Remote Desktop Services (TermService, hosted inside svchost.exe) and the session-support processes that normally start when a session is created, such as rdpclip.exe (clipboard sharing) and tstheme.exe (theme rendering).

Answer the questions below

  1. What is the default TCP port used by RDP?

  2. Which RDP feature pre-authenticates users over CredSSP before a session is created?

Task 3: Legitimate vs Malicious RDP Usage

We can't recognize a malicious RDP session without first knowing what a normal one looks like. We'll start with what legitimate RDP looks like in a typical enterprise, then walk through why attackers reach for this technique and the real-world cases where they've used it.

Legitimate RDP Usage

A Windows enterprise can have many legitimate RDP sessions per day, and most of them follow predictable patterns. Knowing the baseline is most of the work.

Source What It Looks Like
IT administrator daily work RDP from a dedicated admin workstation or jump host (a hardened server that admins connect through) to servers, during business hours, with privileged accounts
Helpdesk remote support RDP from helpdesk subnets to user workstations, typically initiated after a ticket is opened
Scheduled maintenance Predictable timing windows, named admin accounts, documented change request
Vendor remote access RDP via a Remote Desktop Gateway (a server that RDP connections pass through, covered in Task 7) with MFA (multi-factor authentication), scoped to specific systems

A legitimate RDP session looks the same every time the same person does it, with the same source workstation, the same destination, the same account, and the same time-of-day window. Every malicious session we'll investigate is going to deviate from this baseline in one or more specific ways.

Real-World Threat Actor Patterns

Below are real-world cases showing how threat actors abuse RDP in their operations.

RansomHub Password Spray and RDP Chaining (intrusion November 2024, report June 2025)

The DFIR Report's June 2025 RansomHub analysis documented operators password-spraying an internet-facing RDP server (trying a few common passwords against many accounts), then using RDP to chain through domain controllers, backup servers, and file servers before deploying ransomware roughly five days (about 118 hours) later.

The chaining pattern, where the same operator uses RDP to hop from each compromised host to the next, is common in modern ransomware operations. The hops themselves need no extra tool: RDP is built into Windows, so each move looks like normal admin traffic. The operators in this case still brought tools for other steps, such as Mimikatz to collect credentials and Rclone to steal data.

Volt Typhoon and BianLian

Advisories from CISA (the US Cybersecurity and Infrastructure Security Agency) on Volt Typhoon (AA24-038A) and BianLian (AA23-136A) both list RDP as a lateral movement method: Volt Typhoon mainly uses RDP with valid administrator credentials, and BianLian uses RDP and PsExec (a Microsoft Sysinternals tool that runs processes on other systems) with valid accounts.

BianLian operators also prepare hosts for RDP before pivoting: CISA describes them adding accounts to the local Remote Desktop Users group, changing firewall rules to allow incoming RDP traffic, and changing the registry to turn off NLA for RDP connections (the UserAuthentication value set to 0).

The excerpt below shows two MITRE ATT&CK IDs. T1021.001 is the RDP sub-technique itself, which this room covers. T1562.004 is a different entry: the firewall change BianLian made so that RDP traffic could get in (MITRE has since moved that entry to T1686).

Answer the questions below

  1. According to MITRE ATT&CK, what is the sub-technique ID for Remote Desktop Protocol under Remote Services? (Answer Format: T####.###)

Task 4: Investigating RDP via Event Logs

We've covered why RDP is so useful for attackers and what makes a session suspicious in the first place. Now we need to understand the event-log artifacts this technique leaves behind, because that's where most of the investigation happens.

RDP is a built-in admin tool, so the presence of an RDP connection is never the finding by itself. What makes a session suspicious are the answers to the following questions:

  • Whose account it was
  • Which workstation it came from
  • Whether the connection was expected
  • What happened during the session

For this walkthrough we'll focus on a single source-to-destination RDP connection, so the artifact split between the two sides is easy to see. In the real world, you might find multi-hop RDP lateral movement, as you will in Task 6.

Now let's see what artifacts RDP leaves on the source and the destination hosts.

Make sure that you follow along with the VM open, so you can apply what you learn directly. You'll find the artifacts in D:\Walkthrough\, one folder per host (THM-MKT-WS, THM-SHR-SRV). There's also a Walkthrough shortcut on the Desktop that opens the same folder. The challenge triage in D:\Challenge\ has a THM-SHR-SRV folder too, from a different intrusion, so for Tasks 4 and 5 use the folders under D:\Walkthrough\.

Opening the Logs

Each host's event logs are in D:\Walkthrough\<host>\uploads\auto\C%3A\Windows\System32\winevt\Logs\. The triage tool keeps each file's original path, writes C: as C%3A, and writes the % in a log's file name as %25. So the Sysmon log, which Windows names Microsoft-Windows-Sysmon%4Operational.evtx, is Microsoft-Windows-Sysmon%254Operational.evtx here, and the Security log is Security.evtx.

Here are the log files you'll need in that folder. The %254 in the file names is how the triage tool wrote the %4 that Windows uses in the real file names:

Evidence Log file in the Logs folder Host
Sysmon Events 1 and 3 Microsoft-Windows-Sysmon%254Operational.evtx Source
RDP client Events 1024/1025 Microsoft-Windows-TerminalServices-RDPClient%254Operational.evtx Source
Logon Event 4624 Security.evtx Destination
Event 1149 Microsoft-Windows-TerminalServices-RemoteConnectionManager%254Operational.evtx Destination
Events 21 to 25 Microsoft-Windows-TerminalServices-LocalSessionManager%254Operational.evtx Destination

Reading Logs with Event Viewer

For the Security and Terminal Services logs, we'll use Event Viewer:

  1. Click Open Saved Log... in the Actions pane and pick the .evtx file (you can paste the full path into the file name box).
  2. Click Filter Current Log... and type the event ID into the Includes/Excludes Event IDs box, for example 4624.
  3. Click an event and read the General tab. Use the Details tab (XML View) when the field you need isn't shown on the General tab.

A 4624 filter will still show you many logons that aren't RDP. On each event's General tab, the Logon Type line tells you which kind it is, and we're after 10. To list only the Type 10 logons in one go, use PowerShell with an XPath filter (XPath is a query syntax for selecting events by their fields):

PS C:\Users\DFIRUser> Get-WinEvent -Path "D:\Walkthrough\THM-SHR-SRV\uploads\auto\C%3A\Windows\System32\winevt\Logs\Security.evtx" -FilterXPath "*[System[EventID=4624] and EventData[Data[@Name='LogonType']='10']]" | Select-Object TimeCreated, Id, Message | Format-List

Sysmon (a logging tool covered just below) is not installed on this analyst VM, so Event Viewer's General tab cannot show the description of Sysmon events. Parse the Sysmon log with EvtxECmd instead:

Parsing the Sysmon Log with EvtxECmd

C:\Users\DFIRUser> cd "C:\Users\DFIRUser\DFIR Tools\EZ Tools\EvtxeCmd"
C:\Users\DFIRUser\DFIR Tools\EZ Tools\EvtxeCmd> .\EvtxECmd.exe -f "D:\Walkthrough\THM-MKT-WS\uploads\auto\C%3A\Windows\System32\winevt\Logs\Microsoft-Windows-Sysmon%254Operational.evtx" --csv "C:\Users\DFIRUser\Desktop" --csvf THM-MKT-WS-sysmon.csv

This writes THM-MKT-WS-sysmon.csv to the Desktop. To read it:

  1. Open the CSV in Timeline Explorer (the TimelineExplorer folder next to EvtxeCmd).
  2. Press Ctrl+F to open the Find window and search for mstsc.exe. You can also type mstsc into the filter row above the Executable Info column.
  3. Look at the Event Id column. Rows with 1 are process creation (Event 1) and rows with 3 are network connections (Event 3).

The CSV doesn't have one column per Sysmon field. UserName holds the User field (written as domain\account), Executable Info holds the process or its command line, and the other Sysmon fields, such as DestinationIp, are spread across the Payload Data1 to Payload Data6 columns. If you can't find a field, widen the columns or select the row and read the Payload or Map Description details.

Tip: Parsing a whole Logs folder at once is faster than doing it log by log. Replace the -f option and its file path with -d and the path of the whole Logs folder, and EvtxECmd will parse every .evtx file in it into one CSV, which you can then filter by the Channel column in Timeline Explorer.

Source Host Artifacts

We'll start at the source side, the workstation where the operator initiated RDP from.

Sysmon Event ID 1 (mstsc.exe Process Creation)

When mstsc.exe runs on the source, Sysmon (System Monitor, a Microsoft tool that logs system activity such as process creation and network connections to the Windows event log) Event 1 captures the process creation with the full command line and confirms the RDP client launched on this workstation. Its User field is the source-side answer to whose account it was: the logged-on user who started the client. That is not always the account the session logs on with at the destination, because the client can send other credentials, typed in or saved for that host. The account that logs on shows in the destination's Event 4624 (below), and in this walkthrough the two are different accounts.

Sysmon Event ID 3 (Outbound TCP 3389)

Sysmon Event 3 records the network connections the Sysmon configuration includes (network logging is off unless the configuration turns it on). When mstsc.exe reaches out to the RDP server, the corresponding Event 3 shows mstsc.exe as the image, DestinationIp set to the RDP server, and DestinationPort=3389. The fact that this fires on the source is the source-side answer to which workstation it came from, and the DestinationIp tells us where the attempt landed.

On the source, the image is mstsc.exe, the process that made the connection, not its parent. Where Sysmon logs network connections on the destination too, the same connection shows there with both IPs and the port, but its image is the process listening on 3389: svchost.exe, which hosts TermService.

TerminalServices-RDPClient Event IDs 1024/1025 (RDP Client Connection)

The TerminalServices-RDPClient Operational channel logs the client's view of each RDP connection:

  • Event 1024 fires on attempt: "RDP ClientActiveX is trying to connect to the server" followed by the server name in brackets
  • Event 1025 fires on success: "RDP ClientActiveX has connected to the server"

The server name in Event 1024 directly records the destination hostname mstsc.exe tried to reach, corroborating the source's view of where the operator was headed. In Event Viewer, filter the RDPClient log for 1024 and read the server name on the General tab.

These come in handy when attackers attempt to clear logs as an anti-forensic technique and we want to trace RDP connections. Attackers sometimes clear only the main log sources, such as the Sysmon and Security logs, and leave the TerminalServices-RDPClient channel behind.

Another benefit of this channel is that it's enabled by default, so these logs will exist without any extra configuration.

Destination Host Artifacts

Now let's move to the destination side, the host that accepted the RDP connection. Most of the evidence for RDP lateral movement exists on the destination.

Security Event ID 4624 (Type 10)

Event 4624 with LogonType 10 (RemoteInteractive) is a successful interactive RDP logon. The TargetUserName field answers whose account it was, IpAddress answers which workstation it came from, and comparing these against your normal baseline would be one way to determine whether the connection was expected.

On the General tab of the event, these fields appear under different headings:

Field Where it appears on the General tab What to read
LogonType Logon Information > Logon Type 10 means RDP
TargetUserName New Logon > Account Name The account that logged on
IpAddress Network Information > Source Network Address The IP the connection came from

Warning: The Subject section at the top of a 4624 also has an Account Name, but it holds the account that asked for the logon (usually the destination's own SYSTEM or computer account), not the person who connected. Always read the account from the New Logon section.

It's important to mention that this isn't the only way to determine whether this session is malicious, but we can combine this with understanding further context about what happened during the session, which would give us a complete picture of this activity.

TS-RemoteConnectionManager Event ID 1149

TS-RemoteConnectionManager Event 1149 (TS is short for TerminalServices, as in the full channel name) fires when the NLA handshake succeeds, recording the user and source network address. It confirms the network leg but not that a session was created, so pair it with the 4624 Type 10.

The fields to look at are the user and the source IP. The General tab shows them as a sentence, and the Details tab shows them as Param1 (user), Param2 (domain) and Param3 (source network address). The user corroborates whose account it was and the source IP corroborates which workstation it came from, the same two questions the 4624 Type 10 answers, now confirmed from a second channel.

TS-LocalSessionManager Event IDs 21, 22, 23, 24, 25

The TS-LocalSessionManager Operational channel records the session lifecycle on the destination:

  • Event 21 is session logon succeeded
  • Event 22 is shell start (the operator received an interactive desktop)
  • Event 23 is logoff, session destroyed
  • Event 24 is disconnect, session preserved on the server
  • Event 25 is reconnect

These don't directly answer one of the four questions, but they confirm the session actually happened end-to-end (the operator got a shell, not just a network handshake) and bracket when the activity occurred.

Below is a diagram of events 21, 22, 23, and 24 from Event Viewer, showing the RDP lifecycle.

Event ID Reference

Below is a summary of source and destination artifacts in event logs that we've discussed in this task:

Host Log Event ID What it tells us
Source Sysmon 1 mstsc.exe started, and by which user
Source Sysmon 3 mstsc.exe connected to a destination IP on TCP 3389
Source TerminalServices-RDPClient 1024 / 1025 RDP connection attempt / success, with the destination name
Destination Security 4624 (Type 10) RDP logon, with the account and source IP
Destination TS-RemoteConnectionManager 1149 NLA handshake succeeded, with the user and source IP
Destination TS-LocalSessionManager 21 / 22 Session logon succeeded / shell started
Destination TS-LocalSessionManager 23 / 24 / 25 Logoff / disconnect / reconnect

The same summary as a diagram:

Use the events above to answer the following.

You'll find the artifacts in D:\Walkthrough\ (the Walkthrough shortcut on the Desktop opens it): THM-MKT-WS is the source workstation the RDP session came from, and THM-SHR-SRV is the destination server.

Answer the questions below

  1. On the source workstation, which user account launched the RDP client (mstsc.exe)?

  2. What is the IP address of the destination the RDP client (mstsc.exe) connected to on TCP 3389?

  3. What destination hostname did the RDP client attempt to connect to?

  4. Which account successfully authenticated at the destination over RDP?

Task 5: Investigating RDP via Forensic Artifacts

Same as the last task, let's follow along on the analyst VM. The triage is in D:\Walkthrough\, and the required tools are in the DFIR Tools folder under C:\Users\DFIRUser\.

Source Artifacts

Let's take a look at the source-side artifacts.

Loading NTUSER.DAT in Registry Explorer

The two registry artifacts below live in each user's NTUSER.DAT (the registry hive holding that user's settings). To read one, we'll use Registry Explorer from Eric Zimmerman's tools (in the EZ Tools folder under DFIR Tools):

  1. Open Registry Explorer and click File > Load hive.
  2. Browse to the user's NTUSER.DAT in the triage and open it. Use the profile folder of the user who ran mstsc.exe on the workstation (the account you found in Task 4).
  3. If Registry Explorer says the hive is dirty (it has changes that were not yet written to the file), let it replay the transaction logs (the .LOG1 and .LOG2 files next to NTUSER.DAT) and save the cleaned hive somewhere on the Desktop when asked.
  4. In the key tree on the left, expand ROOT, then go to Software\Microsoft\Terminal Server Client. Click a key to see its values in the pane on the right.

Registry MRU

Under Software\Microsoft\Terminal Server Client\Default in the user's NTUSER.DAT (in the triage: D:\Walkthrough\<host>\uploads\auto\C%3A\Users\<username>\NTUSER.DAT), MRU0, MRU1 and so on (MRU: Most Recently Used) hold the recently RDP'd-to hosts (the "Recent" list inside mstsc.exe), MRU0 being the most recent. This is the source-side answer to which host the user RDP'd to, preserved on disk even after event logs are cleared.

UsernameHint

Each host the user connected to gets a Software\Microsoft\Terminal Server Client\Servers\<host>\ key, and its UsernameHint value is the username mstsc.exe saved for that host. This is the source-side answer to whose account was used against which target, a per-host record. If the saved username doesn't match the workstation's logged-in user, check it against who normally uses that account; the mismatch also feeds into whether the connection was expected.

Bitmap Cache

The bitmap cache is a unique RDP artifact. It shows what the operator saw on the remote desktop during their session, the source-side answer to what happened during the session. To save bandwidth, the RDP client caches small tiles (typically 64x64 pixels) of the remote screen on the local machine, and those tiles often stay on disk on the source host after the session.

The cache exists at C:\Users\<user>\AppData\Local\Microsoft\Terminal Server Client\Cache\ (files named Cache0000.bin, Cache0001.bin and so on, or bcache*.bmc). Browsing the recovered tiles can reveal literal commands, file browsers, or open documents the operator had on screen during the session.

We can extract the tiles with bmc-tools (you'll find it in the DFIR Tools folder) using a command like the following one (make sure that the output directory, where the BMP (bitmap image) tiles will be dropped, exists):

Extracting the RDP Bitmap Cache

C:\Users\DFIRUser> mkdir "C:\Users\DFIRUser\Desktop\bmc-output"
C:\Users\DFIRUser> python "C:\Users\DFIRUser\DFIR Tools\bmc-tools\bmc-tools.py" -s "D:\Walkthrough\THM-MKT-WS\uploads\auto\C%3A\Users\<username>\AppData\Local\Microsoft\Terminal Server Client\Cache" -d "C:\Users\DFIRUser\Desktop\bmc-output"
[+++] Processing a directory...
[!!!] File '...\Terminal Server Client\Cache\bcache24.bmc' is zero bytes, skipping file.
[+++] Processing a file: '...\Terminal Server Client\Cache\Cache0000.bin'.
[===] <REDACTED> tiles successfully extracted in the end.
[===] Successfully exported <REDACTED> files.

This command writes one BMP file per tile, often thousands of them. bmc-tools prints the number of tiles for each cache file it processes. The walkthrough triage has one non-empty cache file (Cache0000.bin), so the number is in the last lines it prints. The tile files are numbered from 0000, so the last file's number is one lower than the number of tiles.

As seen in the output folder, the thumbnails have fragments that, if combined, can give us important context about the session and what happened in it.

For deeper analysis, we can use RdpCacheStitcher, which stitches tiles into coherent screen reconstructions. Select the output folder with the extracted BMP tiles to import them, then place the tiles with the tool's placement hints (or its autoplace) to rebuild the screen, as in the screenshot below.

This can help us actually view what happened during the session in one image.

Prefetch

On the source, MSTSC.EXE-<hash>.pf in C:\Windows\Prefetch confirms the RDP client launched and gives a run count and the last few launch times. This is the source-side execution proof that ties back to which workstation it came from. We can parse Prefetch using a tool like Eric Zimmerman's PECmd using the following command:

Parsing MSTSC Prefetch with PECmd

C:\Users\DFIRUser\DFIR Tools\EZ Tools> .\PECmd.exe -d "D:\Walkthrough\THM-MKT-WS\uploads\auto\C%3A\Windows\Prefetch" --csv "C:\Users\DFIRUser\Desktop" --csvf THM-MKT-WS-prefetch.csv

This parses every Prefetch file in the folder and writes THM-MKT-WS-prefetch.csv to the Desktop. Open it in Timeline Explorer and type MSTSC into the filter row above the Source Filename column to leave only the RDP client's row. The Run Count column is the number of times it ran, and Last Run is its most recent launch (PECmd shows times in UTC).

Prefetch can be off on Windows servers (none of the servers in this room's triage has a Prefetch folder), so on a server we might need other execution evidence, like Sysmon Event 1.

Generic Execution Artifacts (Corroborating Evidence)

Other artifacts can be valuable too: AmCache, ShimCache/AppCompatCache, UserAssist (in NTUSER.DAT), and Jump Lists each corroborate that mstsc.exe was present or executed on the workstation (ShimCache shows that a file was seen, not that it ran). They aren't RDP-specific, but they can be useful when other artifacts don't exist.

Destination Artifacts

Now let's pivot to the destination host artifacts, of which there are fewer.

Execution Evidence: rdpclip.exe and tstheme.exe

If we're trying to prove whether RDP was used on a host, we need to check for the processes that normally start in RDP sessions (as we mentioned in earlier tasks), such as rdpclip.exe (clipboard sharing) and tstheme.exe (theme rendering).

Finding them in execution artifacts on a host that's not supposed to receive RDP is a strong sign that an RDP session was accepted there, the destination-side anchor that the connection actually landed on this host. The evidence exists in:

  • ShimCache/AppCompatCache entries found in the SYSTEM hive can show the presence of binaries such as rdpclip.exe and tstheme.exe, which may be useful as indicators of RDP activity. However, for those entries to appear correctly in the registry hive on disk, the system typically needs to go through a graceful shutdown or reboot, because ShimCache updates are generally committed from memory to the SYSTEM hive at shutdown time.
  • Prefetch (C:\Windows\Prefetch\RDPCLIP.EXE-*.pf, TSTHEME.EXE-*.pf): This shows the execution timestamps and run counts as we've seen on the source side. It might not be available on servers, where Prefetch can be off (none of the servers in this room's triage has a Prefetch folder).

Use the artifacts above to answer the following questions.

Answer the questions below

  1. How many bitmap cache tiles did bmc-tools recover from the source host?

  2. According to the MSTSC.EXE prefetch, what was the last execution time of the RDP client (PECmd's Last run value)? (Answer Format: YYYY-MM-DD HH:MM:SS)

Task 6: Hands-On Investigation

We've completed our review of how attackers execute RDP lateral movement and how to detect it through event logs and forensic artifacts. Now we've prepared a hands-on practical exercise.

Scenario

You are an incident responder at a security services firm. TryHatMeStudios, a media production company, has reached out suspecting a breach. Their internal security team noticed unusual RDP activity originating from a developer workstation, reaching systems that it shouldn't be reaching.

Triage was collected from the four systems most likely involved, namely a developer workstation (THM-DEV-WS), a file server (THM-SHR-SRV), a SQL server (THM-SQL-SRV), and the domain controller (THM-DC). Your task is to reconstruct and uncover the attack end to end.

The challenge triage collection is in the D:\Challenge\ folder on the analyst VM. All tools needed are in the DFIR Tools folder under C:\Users\DFIRUser.

Use the folders under D:\Challenge\ for these questions. The walkthrough triage has a THM-SHR-SRV folder too, but it holds the walkthrough's intrusion, not this one. Each challenge host's logs are in D:\Challenge\<host>\uploads\auto\C%3A\Windows\System32\winevt\Logs\, the same layout as in the walkthrough.

Following the Chain

This challenge is a chain: the operator reached one host, then used it to reach the next. The method is the one from Task 4, repeated on every host, as in the diagram below.

Answer the questions below

  1. An unusual RDP session landed on a file server from a non-standard subnet. What is the source workstation IP?

  2. What account was used to authenticate that session?

  3. Continuing the trail, what is the hostname of the machine the operator RDP'd to from the file server?

  4. On the final destination, the operator executed a binary from C:\Windows\Temp\. What is the filename?

  5. What scheduled task did the operator create to persist the binary? (Answer Format: the task name without the leading backslash)

Task 7: Prevention and Mitigation Strategies

Now that we've reconstructed an intrusion in the walkthrough and another in the challenge, we'll turn to the prevention layer that makes the next intrusion harder. Prevention for RDP lateral movement is hard because blanket blocking would break IT administration workflows nobody wants to give up, but there's a real list of things we can do, and the ordering matters.

Audit Policy Configuration

The highest-impact change is enabling the audit policies that produce the events we need. By default, process creation auditing with command lines is off.

Audit Policy Category What It Enables Default State
Audit Logon Logon/Logoff 4624/4625 including Type 10 Windows Server 2016 and later: Success and Failure. Windows clients: Success and Failure from Windows 10 version 1809, only Success before that. Verify on the host since hardening profiles can override.
Audit Process Creation, plus the "Include command line in process creation events" setting Detailed Tracking Security Event 4688 (process creation) with the full CommandLine field for mstsc.exe Not configured

Configure these via GPO (Group Policy Object) rather than with auditpol (the built-in command-line audit policy tool) on each host, because when a GPO applies advanced audit policy, it replaces local auditpol /set changes at the next Group Policy refresh. After any audit change, create a test RDP session and confirm the expected events actually fire before trusting the configuration.

The TerminalServices Operational Channel

The TS-LocalSessionManager and TS-RemoteConnectionManager Operational channels are on by default. The TerminalServices-RDPClient Operational channel (the source-side workstation log) is also on by default, but check that it still is on your hosts.

A disabled RDPClient channel means the source keeps no Event 1024 or 1025 record of its RDP connections. If a destination's logs are then cleared, the source's other logs (such as Sysmon) and the registry keys from Task 5 can still show where the user connected, and the bitmap cache what they saw. Verify with wevtutil, the built-in command-line tool for event logs:

Checking the RDPClient Channel

C:\Users\DFIRUser> wevtutil gl Microsoft-Windows-TerminalServices-RDPClient/Operational

Then enable it from an elevated prompt (Run as administrator):

Enabling the RDPClient Channel

C:\Windows\system32> wevtutil sl Microsoft-Windows-TerminalServices-RDPClient/Operational /e:true

To keep it on across every host, deploy the setting via GPO or an endpoint management tool.

Log Forwarding and Retention

  • Forward all three TS Operational channels (LocalSessionManager, RemoteConnectionManager and RDPClient) to the SIEM (Security Information and Event Management platform), not just the Security log. The TS channels are the first-stop evidence source for this technique.
  • Forward source-side workstation logs, not just servers. Operators land on workstations first.
  • The TS Operational channels are small (1 MB each on this room's analyst VM), so they rotate quickly. Increase size or forward aggressively.

Network Controls That Can Actually Be Deployed

  • Deploy a Remote Desktop Gateway (RDG) as the only path for cross-subnet RDP, with MFA enforced at the gateway.
  • Use Just-in-Time admin access, through tools such as Microsoft's Privileged Access Management (PAM), Azure Privileged Identity Management (PIM) or third-party PAM solutions, so admin RDP rights are time-bounded, not standing.
  • Restrict TCP 3389 between user workstation VLANs (separate network segments) and server VLANs at the network layer. A compromised endpoint on the user network shouldn't be able to RDP directly to a server.
  • Block RDP from the internet entirely; never expose 3389 directly.
  • Enforce NLA on every Windows host (Require user authentication for remote connections by using Network Level Authentication GPO setting) to disable non-NLA RDP and reduce brute-force exposure.

Privileged Account Hygiene

The two patterns that make RDP lateral movement harder are tiered administration and per-host random local admin passwords:

  • Tiered Administration: Tier-0 admins, who manage the domain controllers (DCs), cannot interactively log on to user workstations or servers; Tier-1 (server admins) cannot log on to workstations; Tier-2 (workstation admins) cannot log on to servers. This stops cross-tier credential reuse via RDP.
  • LAPS (Local Administrator Password Solution): Randomized per-host local admin passwords mean a compromise on one workstation doesn't unlock every workstation.
  • Restrict Remote Desktop Users group membership: The local Remote Desktop Users group is empty by default. Keep it to the accounts that need RDP on each server, and check that no broad group such as Domain Users was added to it.
  • Session timeout policies: Auto-logoff disconnected sessions after a short window (e.g., 30 minutes). Disconnected sessions hold cached privileged credentials in memory on the server, which makes them a long-lived foothold for any operator with later access to the box.
  • Remote Credential Guard: Prevents RDP from transmitting credentials to the remote host. Instead, it redirects Kerberos authentication requests back to the client. Even if the destination is compromised, the operator can't harvest RDP session credentials from LSASS (the Local Security Authority Subsystem Service, the process that holds logon credentials in memory). Configure on the remote host via GPO Computer Configuration > Administrative Templates > System > Credentials Delegation > Remote host allows delegation of nonexportable credentials, and on the client side via Restrict delegation of credentials to remote servers set to "Require Remote Credential Guard." Requires Kerberos: the remote host must be joined to Active Directory, and the client must be able to reach a DC.

Detection Rules Worth Deploying

Detection Pattern Confidence Why
Security 4624 Type 10 from a non-management subnet to a Tier-0 host High Should never happen; if it does, hunt aggressively
The same source IP, or the same account, producing 4624 Type 10 on three or more destination hosts within 10 minutes High Signature of one source fanning out to many hosts, or of chaining from host to host. The challenge in this room is a chain: one account lands on three hosts in under 6 minutes, each hop coming from the host before. Tune the threshold to your environment.
Same account producing 4624 Type 10 from two different source workstations within a short window Medium "Right account, wrong source" is the baseline deviation described in Task 3. Tune to your IT-admin baseline.
mstsc.exe execution on a non-IT user's workstation Medium Most non-IT users never run mstsc; baseline first
RDP session outside business hours from a workstation Low Many legitimate reasons; rank low but include

MITRE Mitigation Mapping

For analysts mapping these controls into a defensive architecture, the table below ties each mitigation to its MITRE ATT&CK Mitigation ID and the specific RDP attack vector it neutralizes.

Mitigation What It Prevents MITRE Mitigation Implementation
NLA enforcement Unauthenticated session access, brute force at the login screen M1028 GPO: Require NLA
Network segmentation/RDG Unrestricted lateral RDP between subnets M1030 + M1035 Firewall rules on TCP 3389 + RDG with MFA
Just-in-Time admin access Standing admin RDP rights M1026 PAM/PIM solution
Session timeout policies Long-lived cached credentials in disconnected sessions M1028 GPO: Session Time Limits
Remote Desktop Users group restriction Broad credential-based RDP access M1018 Restrict membership; no broad groups such as Domain Users
Tiered administration Cross-tier credential reuse M1018 + M1026 AD logon-rights GPOs per tier
LAPS Local admin credential reuse across workstations M1027 Microsoft LAPS deployment
Remote Credential Guard Credential theft on remote host M1043 GPO on both ends (registry on the remote host only)

Answer the questions below

  1. Which Group Policy setting enforces Network Level Authentication for incoming RDP connections?

Task 8: Conclusion

That's it for the RDP lateral movement technique, from explaining the protocol itself through the source-side and destination-side event-log artifacts, the on-disk forensic artifacts, and the multi-hop RDP chaining pattern that attackers use in real-world attacks.

Takeaways

  • RDP is a built-in administration tool, so the presence of a session is never the finding by itself. What makes one suspicious is the context around it: whose account it used, which workstation it came from, whether it was expected, and what happened during the session.
  • A legitimate RDP session looks the same every time the same person makes it, so malicious sessions stand out by deviating from that baseline. The same account showing up from a workstation it never normally uses is a common deviation and a good starting point for RDP hunts.
  • No single event confirms a malicious RDP session on its own. Correlating the connection and logon events on the destination with the session-lifecycle events is what gives us context and proves an operator reached an interactive desktop, not just a network handshake.
  • When the destination logs are cleared, the source side is what saves the investigation, which is why an RDP investigation should never stop at the destination. Source-side event logs, the Terminal Server Client registry keys, and the bitmap cache survive clearing and can still show where the user connected, as whom, and what they had on screen.
  • No single control stops RDP abuse without breaking the IT workflows that rely on it, but enabling the right auditing and layering controls like tiered administration, LAPS, and Just-in-Time admin access together make RDP lateral movement significantly harder to pull off and easier to spot.

Answer the questions below

  1. Good work! You have successfully finished the RDP Lateral Movement Analysis room.

Back to all walkthroughs
Room Icon

RDP Lateral Movement Analysis

Trace RDP lateral movement through Windows event logs and on-host triage artifacts.

medium

90 min

1,570

User profile photo.
User profile photo.

To access material, start machines and answer questions login.