T1021.001 Microsoft Sentinel · KQL

Detect Remote Desktop Protocol in Microsoft Sentinel

Adversaries may use Valid Accounts to log into a computer using the Remote Desktop Protocol (RDP). RDP is a common feature in Windows that allows interactive graphical sessions on remote systems. Threat actors including Kimsuky, INC Ransom, Volt Typhoon, Wizard Spider, BlackByte, Akira, and FIN7 have all leveraged RDP for lateral movement. Adversaries typically acquire credentials via Credential Access techniques, then use RDP to expand access to additional systems, deploy ransomware interactively, or establish persistence via Accessibility Features.

MITRE ATT&CK

Tactic
Lateral Movement
Technique
T1021 Remote Services
Sub-technique
T1021.001 Remote Desktop Protocol
Canonical reference
https://attack.mitre.org/techniques/T1021/001/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
// Detect suspicious RDP lateral movement patterns
let SensitiveHosts = dynamic(["dc", "domain-controller", "dc01", "pdc"]);
SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4624
| where LogonType == 10  // RemoteInteractive = RDP
| extend TargetHost = tostring(Computer)
| extend SourceIP = tostring(IpAddress)
| where SourceIP !startswith "127." and SourceIP != "-" and SourceIP != ""
// Flag logons to sensitive hosts or from unexpected sources
| extend ToSensitiveHost = TargetHost has_any (SensitiveHosts)
| extend IsPrivilegedAccount = TargetUserName has_any ("admin", "administrator", "svc", "service")
// Join with logon failures to identify brute-force followed by success
| project TimeGenerated, Computer, TargetUserName, TargetDomainName, SourceIP, LogonType, SubjectUserName, ToSensitiveHost, IsPrivilegedAccount
| sort by TimeGenerated desc
| union (
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4625
    | where LogonType == 10
    | where IpAddress !startswith "127." and IpAddress != "-"
    | summarize FailureCount=count(), Accounts=make_set(TargetUserName) by IpAddress, bin(TimeGenerated, 5m)
    | where FailureCount >= 5
    | extend AlertType = "RDP BruteForce", Computer = "", TargetUserName = tostring(Accounts), SourceIP = IpAddress
    | project TimeGenerated, Computer, TargetUserName, SourceIP, FailureCount, AlertType
)
high severity medium confidence

Detects suspicious RDP (LogonType 10) activity using Windows Security Event 4624 (successful logon) and 4625 (failed logon). Flags logins to sensitive hosts (domain controllers), logons from external or unexpected IPs, and brute-force patterns (5+ failures in 5 minutes from the same source IP). Uses SecurityEvent table from Microsoft Sentinel / Log Analytics.

Data Sources

Logon Session: Logon Session CreationNetwork Traffic: Network Connection CreationWindows Security Event ID 4624 (Logon)Windows Security Event ID 4625 (Failed Logon)

Required Tables

SecurityEventDeviceNetworkEvents

False Positives & Tuning

  • IT administrators performing legitimate remote administration of servers and workstations via RDP
  • Help desk staff using RDP to support end users, especially from a central jump server or bastion host
  • Automated monitoring or patch management tools (e.g., SCCM) that connect via RDP for maintenance
  • VPN-connected remote workers whose source IP appears external to network monitoring systems
  • Vendor remote support sessions initiated under approved change tickets
Download portable Sigma rule (.yml)

Other platforms for T1021.001


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1RDP Connection to Remote Host

    Expected signal: Sysmon Event ID 1: Process Create with Image=mstsc.exe, CommandLine='/v:127.0.0.1 /admin'. Sysmon Event ID 3: Network Connection to port 3389. Security Event ID 4624 (LogonType=10) on the target if RDP is enabled. Event ID 1149 in TerminalServices-RemoteConnectionManager log.

  2. Test 2Enable RDP and Create RDP-Accessible User

    Expected signal: Sysmon Event ID 13 (Registry Value Set) for HKLM\System\CurrentControlSet\Control\Terminal Server\fDenyTSConnections. Sysmon Event ID 1 (Process Create) for net.exe with 'Remote Desktop Users' in command line. Security Event ID 4732 (member added to security-enabled local group). Security Event ID 4657 (registry value modified).

  3. Test 3Simulate RDP Brute Force (Authentication Failures)

    Expected signal: Security Event ID 4625 (Logon Failure, LogonType=10) for each failed attempt. Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational Event ID 261. After 6 failures, detection threshold should fire.

  4. Test 4RDP Tunnel via NetSH Port Proxy

    Expected signal: Sysmon Event ID 1: Process Create for netsh.exe with 'portproxy' and 'add' in command line. Registry change at HKLM\SYSTEM\CurrentControlSet\Services\PortProxy. Security Event ID 4688 for netsh.exe. Sysmon Event ID 12/13 for registry modification.

Unlock Pro Content

Get the full detection package for T1021.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections