Network & remote access
RDP connection artifacts
RDP forensics cheat sheet: target-side event IDs (4624 type 10, 1149, 21–25, 131) and source-side traces (Terminal Server Client keys, Default.rdp, 1024).
- Location
- C:\Windows\System32\winevt\Logs\Microsoft-Windows-TerminalServices-*.evtx
- Proves
- Who connected over RDP, from which IP, when, and which hosts a user connected to
- Timestamps
- Event SystemTime in UTC; client Servers and Default key LastWrite as FILETIME, UTC; Default.rdp $SI modification, UTC
- Retention
- RDP Operational channels are small and roll over on busy servers; MRU and Servers keys persist until the user removes them
- Access
- Administrator to export EVTX (locked live: wevtutil or KAPE EventLogs-RDP); client keys in NTUSER.DAT, locked while logged on
- Evidence of
- Network & remote access
- Type
- Event log
- Windows
- Vista / 78 / 8.11011
- KAPE target
- EventLogs-RDPRegistryHivesUser
- Velociraptor
- Windows.Triage.Targets:EventLogs-RDPRegistryHivesUser
Tools
Compare all toolsWhat it is
Remote Desktop Protocol (RDP) sessions leave traces on both ends. On the target (the machine being connected to), several event log channels record the network connection, the authentication and the session lifecycle. On the source (the machine the user connected from), the Remote Desktop client (mstsc.exe) keeps a history of servers and user names, and its own client log. Together they are the main evidence of interactive lateral movement.
Location
Target side (event logs in C:\Windows\System32\winevt\Logs\):
| Channel | Events |
|---|---|
Security | 4624 (logon type 10, or 7 on reconnect/unlock), 4625, 4634/4647, 4778 (session reconnected), 4779 (session disconnected) |
Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational | 1149: user authentication succeeded for a network connection (user, domain, source IP) |
Microsoft-Windows-TerminalServices-LocalSessionManager/Operational | 21 logon, 22 shell start, 23 logoff, 24 disconnected, 25 reconnected (each with source address) |
Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational | 131: server accepted a new TCP connection (client IP and port) |
Source side:
| Location | Content |
|---|---|
NTUSER.DAT\Software\Microsoft\Terminal Server Client\Default | MRU0…MRU9: recent servers typed in the client |
NTUSER.DAT\Software\Microsoft\Terminal Server Client\Servers\<host> | UsernameHint (account used), CertHash |
C:\Users\<user>\Documents\Default.rdp (hidden) | Settings of the last connection, including full address |
Microsoft-Windows-TerminalServices-RDPClient/Operational | 1024: client trying to connect to a server; 1102: client initiated a multi-transport connection to an IP |
%LOCALAPPDATA%\Microsoft\Terminal Server Client\Cache\ | RDP bitmap cache |
What it proves
- Target side: an account authenticated over RDP from a source IP at a given time, and how long the session lasted (logon → disconnect/logoff).
- Source side: a user of this machine connected (or tried to connect) to these hosts, with which account name.
- 1149 alone proves successful authentication of a network connection, not a full interactive logon; confirm with 4624 type 10 and LocalSessionManager 21/22.
Key fields
| Field | Where | Meaning |
|---|---|---|
LogonType | 4624 | 10 = RemoteInteractive; 7 = unlock/reconnect (logon types) |
IpAddress, WorkstationName | 4624 / 4625 | Source of the connection (workstation name is the client's NetBIOS name) |
TargetLogonId | 4624 | Links the logon to later events of the same session |
User, Session ID, Source Network Address | LocalSessionManager 21–25 | Session lifecycle per user |
UsernameHint | Servers key | Account the user typed for that host |
Timestamps
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
Event SystemTime | Event logged | UTC | Viewers show local time; normalize before correlation |
Servers\<host> key LastWrite | First connection or settings change for that host | FILETIME, UTC | Not updated on every connection |
Default key LastWrite | MRU list updated | FILETIME, UTC | Dates only the most recent MRU0 |
Default.rdp $SI modification | Client saved its last settings | NTFS, UTC | Last connection only |
Retention and clearing
- The RDP-related Operational channels are small and roll over on busy servers; Security may roll even faster.
- Users can remove servers from the client's history, which deletes the
MRUvalue and theServerssubkey;Default.rdp, the RDPClient log and the bitmap cache may still remain. - Clearing logs produces 1102 / 104; check SIEM copies and shadow copies.
Collection
- KAPE target:
EventLogs-RDP(Security, System and the RDP channels) andRegistryHivesUserfor the client keys;RDPCacheandRDPLogsexist for related files. - Velociraptor (
Windows.Triage.Targets):EventLogs-RDPandRegistryHivesUser;Windows.EventLogs.RDPAuthandWindows.Registry.RDPparse them live. - Built-in:
Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' | Where-Object Id -in 21,22,23,24,25
Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational' | Where-Object Id -eq 1149
reg query "HKCU\Software\Microsoft\Terminal Server Client" /s
Parsing tools
- EvtxECmd (Eric Zimmerman): maps for all RDP channels; filter by event ID in Timeline Explorer.
- Hayabusa / Chainsaw: built-in RDP logon summaries and Sigma rules.
- Registry Explorer / RegRipper (
tsclientplugin): the Terminal Server Client keys. - Velociraptor:
Windows.EventLogs.RDPAuth,Windows.Registry.RDP.
Investigation tips
- Build a per-session table on the target: 131 (TCP) → 1149 (auth) → 4624 type 10 → 21/22 → 24/25 → 23; missing steps often tell you what failed.
- Source IPs from 1149 and 21 point to the next machine to examine; on that source host, confirm with the
Serverskey,mstsc.exein UserAssist and the mstsc Jump List. - Logons from
127.0.0.1or::1suggest RDP tunnelled through a local port forward (for example via SSH or a reverse proxy). - The client's bitmap cache can show what the user actually saw on the remote screen.
- Service accounts or newly created local accounts using RDP are a strong lead; check account creation (4720) in SAM and user accounts.
Related artifacts
- RDP bitmap cacheRDP bitmap cache cheat sheet: bcache*.bmc and Cache*.bin files on the RDP client, what screen tiles reveal, timestamps, and rebuilding screens with bmc-tools.
- Windows event logs (EVTX)Windows event log cheat sheet: EVTX locations, must-know event IDs for logons, processes, services and log clearing, retention, audit policy and parsing tools.
- Jump ListsJump Lists cheat sheet: AutomaticDestinations and CustomDestinations, AppIDs, DestList entries with last access, access count and pin status, and JLECmd.
- UserAssistUserAssist cheat sheet: NTUSER.DAT GUID keys, ROT13 value names, run count, focus time and last run FILETIME for programs a user launched from Explorer.
- SAM hive and user accountsSAM hive cheat sheet: local accounts, RIDs, last logon and password change times, logon counts, group membership, ProfileList, and account-related event IDs.
- Windows Firewall LogsWindows Firewall cheat sheet: pfirewall.log format and defaults, rule change events 2004-2006, WFP audit 5156/5157, rules in the registry and netsh abuse.
- OpenSSH Server and ClientOpenSSH on Windows cheat sheet: sshd event log, sshd_config and host keys, authorized_keys persistence, known_hosts, client traces and reverse tunnels.
- DPAPI and Credential ManagerDPAPI and Credential Manager cheat sheet: master keys, Windows Vault, what secrets they hold, offline decryption requirements and credential-theft traces.
- Remote access tools (RMM)RMM and remote access tool cheat sheet: AnyDesk, TeamViewer, ScreenConnect and more, their log files, connection IDs, IPs and timestamps, and how to hunt abuse.
Glossary terms
- Logon typeThe numeric field in logon events 4624 and 4625 that says how an account logged on: console, network, service, RDP, cached and more.
- Lateral movementAn attacker moving from one compromised host to others in the network, using RDP, SMB, PsExec, WMI, WinRM or remote tasks and services.
- Windows event IDThe number identifying an event type within a given provider; it only has meaning when paired with its provider and log channel.
- NTUSER.DATThe per-user registry hive stored in each Windows profile and loaded as HKEY_CURRENT_USER, rich in user activity and persistence traces.