Skip to content
SOC Analyst Role
  • Loading index…

↑↓ navigate · ↵ open · Esc close

en

Security · Logon

4647 · User initiated logoff

Event 4647 is logged when a user deliberately initiates a logoff from an interactive, RDP or cached interactive session. Unlike 4634, which fires whenever a session is torn down for any reason, 4647 shows a person (or something acting as them) chose to sign out. It is useful for reconstructing the end of a hands-on-keyboard RDP session.

low prioritySecurity logLogon

Where it is logged

Security log on the machine the user was logged on to. Requires Audit Logoff for Success. It is not logged for network (type 3) sessions, and a disconnected RDP session that is never signed out will not produce one.

Key fields to read

FieldWhat it tells you
TargetUserNameAccount that initiated the logoff.
TargetDomainNameDomain of that account.
TargetLogonIdSession ID that links back to the 4624 and forward to the 4634.
TargetUserSidSID of the account.

Sample event

4647 — synthetic example
EventID: 4647
TimeCreated: 2026-03-14T03:02:54.207Z
Computer: NW-FS-02.northwind.local
Channel: Security
Keywords: Audit Success
TargetUserSid: S-1-5-21-3623811015-3361044348-30300820-1104
TargetUserName: adm.jlopez
TargetDomainName: NORTHWIND
TargetLogonId: 0x5B1C0A9

How to triage it

  1. 1Match the TargetLogonId to the 4624 on the same host to get the logon type, source IP and start time.
  2. 2Confirm a 4634 follows with the same logon ID to close out the session.
  3. 3Review process creation (4688 / Sysmon 1) for that logon ID during the session.
  4. 4If the session was suspicious, check whether the user was really at their keyboard at that time, and whether the logoff came right after sensitive activity (log clearing, data staging).

Benign vs suspicious

Usually benign

  • Normal end-of-day sign-outs and admins logging off jump servers.
  • Scripted logoffs by kiosk or shared-workstation software.

Red flags

  • A logoff immediately after defense-evasion activity such as 1102 log clearing or 4719 audit policy changes.
  • Admin account RDP sessions on servers that begin and end outside business hours with no ticket.
  • A pattern of short RDP sessions with logoffs across several servers in sequence, consistent with an operator moving host to host.

Hunt for it: Splunk & KQL

Splunk SPL
index=wineventlog EventCode=4647
| eval hour=tonumber(strftime(_time, "%H"))
| where hour < 6 OR hour > 21
| stats count values(host) AS hosts BY user
Sentinel KQL
SecurityEvent
| where EventID == 4647
| where hourofday(TimeGenerated) < 6 or hourofday(TimeGenerated) > 21
| summarize Logoffs = count(), Hosts = make_set(Computer) by TargetUserName
| order by Logoffs desc

Field names depend on your add-on and table. More translations in the Splunk vs KQL cheat sheet.

Interview question

“Why might you see a 4634 without a 4647, and does it matter?”

✓ Strong answer sketch

4634 fires whenever a session is destroyed, so network logons, service sessions and system-terminated sessions only produce 4634. 4647 only appears when a user actively logs off an interactive or RDP session. So a type 3 session with only a 4634 is completely normal, but an RDP session with no 4647 may simply have been disconnected rather than signed out, which could mean it is still available to reconnect. In an investigation I use 4647 as evidence that someone deliberately ended the session.

More SOC interview questions

Frequently asked questions

What does Event ID 4647 mean?

Event ID 4647 means a user initiated a logoff from an interactive or Remote Desktop session. It is followed by a 4634 when the session is actually torn down.

Does Event ID 4647 log network logoffs?

No. Network (type 3) sessions are ended by the system and only produce 4634. 4647 is limited to sessions where a user can actively sign out, such as interactive and RDP logons.