Event ID 4778: session reconnected to a window station
What Event ID 4778 (session reconnected to a window station) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.
Event ID 4778 is logged when a user reconnects to an existing Windows session, typically an RDP session that was disconnected rather than logged off. It is often more useful than 4624 for RDP investigations because it records the client computer name and address of the reconnecting machine.
The fields that matter
| Field | What it tells you |
|---|---|
| Subject > Account Name | The user reconnecting. |
| Session Name | RDP-Tcp#N for RDP, Console for the local screen. |
| Client Name | The name of the computer the user connected from. |
| Client Address | Its IP address. |
| Logon ID | Links to the original 4624 for the session. |
What is normal
Admins reconnecting to servers from their usual workstations or jump hosts.
When Event ID 4778 is suspicious
- Reconnects from a client name or address the account has never used.
- Client Address from the internet on a server that should only be reached through a VPN or gateway.
- Reconnects to a session belonging to another, more privileged account.
Common false positive: Fast user switching on shared workstations also logs 4778 with Session Name Console.
Find Event ID 4778 with PowerShell
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4778; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
ForEach-Object {
$d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
[pscustomobject]$d
} | Format-List
Microsoft Sentinel (KQL)
SecurityEvent
| where TimeGenerated > ago(7d) and EventID == 4778
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc
Related events
- Event ID 4779: Session disconnected from a window station
- Event ID 4624: Successful logon
- RDP Event ID 1149: RDP authentication succeeded
- Event ID 4647: User-initiated logoff
FAQ
Why does a reconnect not always create a 4624 type 10?
Reconnecting to an existing session can log a 4624 with logon type 7 (unlock/reconnect) instead, which is easy to miss. 4778 is the clearer record.
Windows Event Triage reads a CSV, EVTX-to-JSON or XML export in your browser and flags brute force, new admins, suspicious services and log clearing.
IOC Triage, our free browser extension: right-click it for a verdict from 15 threat-intel sources, then copy a ready ticket note.