Skip to content
WETNav
Shell-CorePersistence

Event ID 9708: Finished execution of a Run or RunOnce command

Written by Explorer after it starts a command from a Run or RunOnce key, recording the command line and the process ID of the process it created. Closes the matching 9707.

Channel
Microsoft-Windows-Shell-Core/Operational
Logged by default
Yes
Written on
Any host
Volume
Low
Provider
Microsoft-Windows-Shell-Core
Needs a SACL
No

Key fields

Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.

CommandCommand line from the Run or RunOnce value; matches the Command in the preceding 9707
PIDProcess ID of the process Explorer started for this command, in decimal. Use it to find the matching process creation (Sysmon 1 ProcessId, or 4688 NewProcessId, which is hexadecimal)
Have one of these events? Paste it into the decoder

Analyst notes

  • 01The PID is what makes 9708 useful: it links a Run key entry to a concrete process, so you can follow that process's network connections, child processes and file writes in Sysmon or EDR data.
  • 02Process IDs are reused. Match on the PID together with the timestamp and the image named in Command, not on the PID alone.
  • 03Do not assume 9708 is the time the program exited; confirm process lifetime with Security 4689 or Sysmon 5.

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-Shell-Core/Operational' -FilterXPath "*[System[(EventID=9708)]]" -MaxEvents 50 |
  Select-Object TimeCreated, Id, MachineName, Message

-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.

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.

Common questions

What does Windows event ID 9708 mean?
Written by Explorer after it starts a command from a Run or RunOnce key, recording the command line and the process ID of the process it created. Closes the matching 9707. It is written to the Shell-Core Operational log (Microsoft-Windows-Shell-Core/Operational).
Is event 9708 logged by default?
Yes, a default Windows installation records it.
Where is event 9708 recorded?
In the Microsoft-Windows-Shell-Core/Operational channel on the any host.

Written by Explorer after it starts a command from a Run or RunOnce key, recording the command line and the process ID of the process it created. Closes the matching 9707. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.