Event ID 39: Session was disconnected by another session
Written on the destination when one session disconnects another. When the two session IDs differ, it can indicate a session takeover (one user kicking or hijacking another's session).
- Channel
- Microsoft-Windows-TerminalServices-LocalSessionManager/Operational
- Logged by default
- Yes
- Written on
- Target host
- Volume
- Low
- 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 |
|---|---|
| Session | Session ID that was disconnected |
| Source | Session ID that caused the disconnect. A Source session ID that differs from the disconnected session is the takeover pattern |
Analyst notes
- 01Different Session and Source IDs mean one session acted on another; combined with SYSTEM-level 'tscon' session hijacking this is a classic RDP hijack indicator.
- 02A user disconnecting their own session typically shows the same ID in both roles and is benign.
- 03Confirm the exact XML field names in the event's XML view before building a parser; the two-session relationship is the signal.
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=39)]]" -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 39 mean?
- Written on the destination when one session disconnects another. When the two session IDs differ, it can indicate a session takeover (one user kicking or hijacking another's session). It is written to the TerminalServices LocalSessionManager log (Microsoft-Windows-TerminalServices-LocalSessionManager/Operational).
- Is event 39 logged by default?
- Yes, a default Windows installation records it.
- Where is event 39 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 one session disconnects another. When the two session IDs differ, it can indicate a session takeover (one user kicking or hijacking another's session). Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.