An RDP session was disconnected (session remains active). Complements 4778 (reconnect).
Disconnected RDP sessions are targets for session hijacking via tscon.exe. Pattern: 4779 (disconnect from IP-A) + 4778 (reconnect from IP-B) = possible session theft.
Correlate 4779+4778 pairs where reconnect ClientAddress differs. Flag long-lived disconnected sessions (>8 h) on sensitive servers.
SubjectUserNameTargetUserNameLogonTypeIpAddressWorkstationName | Tactic | Technique |
|---|---|
| Lateral Movement | Remote Desktop Protocol (T1021.001) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
SecurityEvent
| where EventID == 4779 // A session was disconnected from a Window Station
| project TimeGenerated, Computer, SubjectUserName, TargetUserName, LogonType, IpAddress, WorkstationName
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Security" EventCode=4779
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# A session was disconnected from a Window Station — add EventData fields: SubjectUserName, TargetUserName, LogonType, IpAddress`
A session was disconnected from a Window Station. An RDP session was disconnected (session remains active). Complements 4778 (reconnect).
Event 4779 is written to the Security channel by Microsoft-Windows-Security-Auditing. Advanced Audit Policy — enable the 'Logon/Logoff' subcategory (Success and/or Failure).
Event 4779 is associated with: Remote Desktop Protocol (T1021.001).
Correlate 4779+4778 pairs where reconnect ClientAddress differs. Flag long-lived disconnected sessions (>8 h) on sensitive servers.