πŸ–₯️
Windows DFIR
  • Introduction
  • Windows Artifacts
    • Windows Quick Tips
      • Windows Command Line
      • Workstation File/Folder Locations
      • Server File/Folder Locations
    • Account Usage
      • Authentications SAM Artifacts
        • Last Login
        • Last Failed Login
        • Last Password Change
      • Authentications (Windows Event Log)
        • Logon ID
      • Group Membership
        • Event ID: 4798
        • Event ID: 4799
      • RDP
        • Source System Artifacts - Quick Reference
        • Destination System Artifacts - Quick Reference
      • SSH
      • Rouge Local Accounts
      • CrowdStrike Searches
        • Event Name - UserLogon
        • Event Name - UserLogonFailed
        • Event Name - UserLogonFailed2
        • Event Name - SsoApplicationAccess
    • Browser Usage
      • History & Downloads
        • Viewing History Files - DB Browser
        • Transition Types
      • Auto-Complete Data
      • Bookmarks
      • Browser Preferences
      • Cache
      • Cookies
      • Extensions
      • Super Cookies (HTML5 Web Storage)
      • Media History
      • Private Browsing
      • Session Restore
      • Stored Credentials
      • Suggested/Frequent Sites
      • DB Browser Queries
        • Firefox
        • Chrome
        • Media History
      • PowerShell Scripts
        • Browser Extension Finder
        • Browser History Finder
    • Processes
      • at.exe
      • explorer.exe
      • lsass.exe
      • lsaiso.exe
      • PuTTy.exe
        • X11 Forwarding
      • runtimebroker.exe
      • services.exe
      • smss.exe
      • System
      • svchost.exe
        • Services
      • winlogon.exe
      • wininit.exe
    • Cloud Storage
    • Deleted File or File Knowledge
      • WordWheelQuery (Win 7+)
      • ACMRU (Win XP)
      • Internet Explorer file:///
      • Last Visited MRU
      • Thumbs.db (Win XP)
      • Thumbcache
      • Recycle Bin
      • User Typed Paths
      • Windows Search Database
    • File Download
      • Zone.Identifer
      • Open/Save Most Recently Used (MRU)
      • Email
      • Drive By Downloads
        • Malvertising
      • Web Browsing
        • Cache Files
      • CrowdStrike Searches
        • MoTW
    • Folder/File Opening/Creation
      • Recent Files
      • Office Recent Files
      • Shell Bags
      • .lnk Files
      • Jump Lists
        • AppIDs
      • Prefetch
      • Index.dat file://
      • PowerShell Scripts
        • .lnk Files
    • Persistence
      • Registry
        • NTUSER.DAT & HKU\SID
        • Run and Run Once
        • Shell Folders and UserInit Key
        • Services
        • Logon Scripts
        • Office Add-ins
        • Winlogon Shell
        • Image File Execution Options (IFEO)
        • AppInit_DLLs
        • Scheduled Tasks
      • Scheduled Tasks
        • Scheduled Task Destination System Artifacts
        • Scheduled Task Source System Artifacts
      • Startup
      • Tool: AutoRuns
      • Accounts
      • WMI Event Consumers
        • WMI: Source System Artifacts
        • WMI: Destination System Artifacts
        • WMI: PowerShell Analysis
      • PowerShell Scripts
        • Startup Programs
      • CrowdStrike Searches
        • Files Written to Startup Folder
        • Files Written to Startup Folder from the Internet
        • Local Account Creation/Deletion
        • Azure Account Creation/Deletion
        • Scheduled Tasks
    • Physical Location
      • Time zone
      • Wireless SSID
      • Network History (Vista/Win7–11)
      • Cookies
      • Browser Search Terms
    • Program Execution
      • Prefetch
        • Decoding Prefetch Files with Eric Zimmerman's PECmd Tool
      • BAM/DAM
      • CapabilityAccessManager
      • UserAssist
      • Last Visited MRU
      • RunMRU
      • MUI Cache
      • ShimCache
      • Amcache
      • Jump Lists
    • Shadow Copies
      • VSC Permissions
      • Event ID 8193: Volume Shadow Copy Service Error
    • USB Usage
      • Key Identification
      • Drive Letter and Volume Name
      • Connection Timestamps
      • User
      • Volume Name
      • Plug & Play Event Log
    • Windows Services
      • DoSvc (Delivery Optimization)
    • System Information
    • Event IDs
      • Authentication / Account
        • 4624 - Authentication Success
          • Logon Types
        • 4625 - Authentication Failure
          • SubStatus Codes
        • 4634 - Account Logoff
        • 4648 - Explicit Credentials Success
        • 4672 - Special Privileges
        • 4720 - Account Creation
        • 4722 - Account Enabled
        • 4732 - Addition to Local Group
        • 4738 - Account Changed
        • 4776 - Kerberos Authentication Attempt
          • Substatus Codes
        • 4771 - Kerberos Failure
        • 4768
      • File System
        • 1006
        • 4688 - Process Created
        • 4663
        • 4656
        • 6416
        • 20001
        • 20003
  • Windows DFIR & MITTR
    • Initial Access
      • Content Injection
      • Drive-by Compromise
        • Watering Hole Attack
        • Microsoft Files (Payload Execution)
        • Exploit Delivery
        • Viewing Browser History Files
      • Phishing
    • Execution
    • Persistence
    • Privilege Escalation
    • Defense Evasion
    • Credential Access
      • Logon ID
    • Discovery
    • Lateral Movement
    • Collection
    • Command and Control
    • Exfiltration
    • Impact
  • SOC Related
    • Cached Credentials
    • Domain Controller Password Spraying
Powered by GitBook
On this page
  • Key Points
  • Considerations
  • Technical Explanations
  • Event Log Tracking
  • Source Host Artifacts
  • Destination Host Artifacts
  • Alternate Remote Access Tools
  • Security Settings
  • Example Logs
  • Example Command Lines

Was this helpful?

  1. Windows Artifacts
  2. Account Usage

RDP

Key Points

  1. Remote Desktop Protocol (RDP) Artifacts: RDP is a proprietary protocol developed by Microsoft which allows a user to connect to another computer over a network connection. Key artifacts include event logs, registry entries, and file system traces.

  2. RDP-Related Processes:

    • Source Host: The process mstsc.exe is launched when initiating an RDP connection.

    • Destination Host: Processes like svchost.exe and termsrv.dll are involved in handling incoming RDP connections.

  3. Important Registry Key:

    • On the Source Host, the key NTUSER\Software\Microsoft\Terminal Server Client\Servers records recent RDP connections.

  4. Event Log Analysis:

    • Essential for tracking RDP sessions, with specific Event IDs (4624, 4778, 4779) providing detailed information about RDP activities.

Considerations

  • Security Implications: Unauthorized RDP access is a common method for lateral movement in cyber attacks.

  • Log Centralization: Centralizing logs aids in quickly identifying malicious patterns across all endpoints.

  • Tool Usage: Attackers often use the same tools as network administrators for lateral movement.

Technical Explanations

Event Log Tracking

  • Event IDs:

    • 4624: Logs RDP logons (Logon Type 10 – Remote Interactive).

    • 4778: Tracks RDP session reconnections.

    • 4779: Records session disconnections.

  • Locations:

    • Security Event Logs: %SYSTEMROOT%\System32\winevt\logs\Security.evtx.

    • RDP-specific Logs:

      • Microsoft-Windows-RemoteDesktopServices-RDPCoreTS/Operational

      • Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational

      • Microsoft-Windows-TerminalServices-LocalSessionManager/Operational

Source Host Artifacts

  • Registry Entries:

    • Recent Connections: NTUSER\Software\Microsoft\Terminal Server Client\Servers.

    • RegRipper Plugin: rdphint for parsing RDP registry keys.

  • File System Traces:

    • Default RDP Connection File: Default.rdp in the user profile.

    • RDP Bitmap Cache Files: Fragments can be reassembled using bmc-tools.py.

    • Jump List Data: Traces from mstsc.exe.

security.evtx:

  • Current logged-on User Name

  • Alternate User Name

  • Destination Host Name/IP

  • Process Name

  • Remote desktop destinations are tracked per-user

    • NTUSER\Software Microsoft\Terminal Server Client\Servers

    • mstsc.exe Remote Desktop Client

    • mstsc.exe Remote Desktop Client

    • mstsc.exe

    • mstsc.exe Remote Desktop Client execution

    • Last Time Executed

    • Number of Times Executed

  • RecentApps – NTUSER.DAT

    • mstsc.exe Remote Desktop Client execution

    • Last Time Executed

    • Number of Times Executed

    • RecentItems subkey tracks connection destinations and times

    • {MSTSC-APPID}- automaticDestinations-ms

    • Tracks remote desktop connection destination and times

    • mstsc.exe-{hash}.pf

  • Bitmap Cache – C:\USERS<USERNAME> AppData\Local\Microsoft\Terminal Server Client\Cache

    • bcache##.bmc

    • cache####.bin

Destination Host Artifacts

  • Event Log IDs: 4624 (Type 10), 4778, 4779.

  • Specialized Logs:

    • Microsoft-Windows-TerminalServices-RDPClient/Operational for tracking attacker movement from the source system.

Alternate Remote Access Tools

  • VNC:

    • Event Log ID 4624 (Type 2 – Console logon).

    • Application-specific logs and registry entries.

  • TeamViewer:

    • Source System: TeamViewerX_Logfile.log in C:\Program Files\TeamViewer\VersionX.

    • Target System: Connections_incoming.txt.

Security Settings

  • Active Directory Settings: β€œDeny log on through Remote Desktop Services” for sensitive accounts.

  • Host Level Settings: Disabling RDP service, configuring Windows Firewall to deny inbound RDP connections.

Example Logs

  • Event ID 4624:

    Log Name: Security
    Event ID: 4624
    Logon Type: 10
    Account Name: [Username]
    Source Network Address: [IP Address]
  • Event ID 4778:

    Log Name: Security
    Event ID: 4778
    Account Name: [Username]
    Session Reconnected to: [Target Machine Name]
  • Event ID 4779:

    Log Name: Security
    Event ID: 4779
    Account Name: [Username]
    Session Disconnected from: [Target Machine Name]

Example Command Lines

  • Starting RDP Session:

    mstsc.exe /v:[TargetHost]
  • Using VNC:

    vncviewer.exe [TargetHost]
  • Launching TeamViewer:

    TeamViewer.exe
PreviousEvent ID: 4799NextSource System Artifacts - Quick Reference

Last updated 1 year ago

Was this helpful?

– Logon specifying alternate credentials

Microsoft-WindowsTerminalServicesRDPClient%4Operational.evtx - Destination Host Name Event ID 1102 - Destination IP Address

– SYSTEM

– SYSTEM – Last Time Executed

– First Time Executed

– NTUSER.DAT

– C:\Users<Username> AppData\Roaming\Microsoft\Windows Recent\AutomaticDestinations\

– C:\Windows\Prefetch

Event ID 4648
Event ID 1024
ShimCache
BAM/DAM
AmCache.hve
UserAssist
Jumplists
Prefetch