Event ID 24: Remote Desktop session was disconnected
Written on the destination when a session is disconnected but not logged off. The session and its processes keep running in the background.
- Channel
- Microsoft-Windows-TerminalServices-LocalSessionManager/Operational
- Logged by default
- Yes
- Written on
- Target host
- Volume
- Moderate
- Provider
- Microsoft-Windows-TerminalServices-LocalSessionManager
- Needs a SACL
- No
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| User | Account whose session was disconnected |
| SessionID | Session ID; the session can later be reconnected (25) under the same ID |
| Address | Source network address at disconnect time, or LOCAL |
Analyst notes
- 01A disconnect leaves the session live: attacker tools launched in that session keep running after disconnect, which is a common way to hold access quietly.
- 02A 24 followed later by a 25 from a different source Address can indicate the session was picked up from another host.
- 03Correlate with Security 4779 (session disconnected) for the same user.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' -FilterXPath "*[System[(EventID=24)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
Where it shows up
Investigations, attack signals and lateral movement techniques that rely on this event.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Related events
Common questions
- What does Windows event ID 24 mean?
- Written on the destination when a session is disconnected but not logged off. The session and its processes keep running in the background. It is written to the TerminalServices LocalSessionManager log (Microsoft-Windows-TerminalServices-LocalSessionManager/Operational).
- Is event 24 logged by default?
- Yes, a default Windows installation records it.
- Where is event 24 recorded?
- In the Microsoft-Windows-TerminalServices-LocalSessionManager/Operational channel on the target host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWritten on the destination when a session is disconnected but not logged off. The session and its processes keep running in the background. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.