7031 System log · Service Control Manager medium severity low volume

System Event ID 7031 — The service terminated unexpectedly

A service terminated unexpectedly. Failure count and action taken (restart/none) are key.

Why event 7031 matters

Unexplained service crashes of security tools indicate possible tampering, exploitation, or resource-based attacks. Services configured to not restart after failure = attacker disabled them via crash.

How to detect it

Alert: unexpected termination of AV, EDR, SIEM agents, or backup services. Alert: services configured 'take no action' after crash — they won't recover without manual intervention.

Log source
System
Logged by default in the System channel; no audit policy required.
Fields to pivot on
param1param2Computer

MITRE ATT&CK mapping

Tactic Technique
Defense Evasion Disable or Modify Tools (T1562.001)

Detection queries

Starting points — adapt the log source, projected fields and thresholds for your environment.

Sentinel / Defender KQL
Event
| where EventLog == "System" and EventID == 7031   // The service terminated unexpectedly
// EventData holds: param1, param2, Computer
| project TimeGenerated, Computer, RenderedDescription
| sort by TimeGenerated desc
Splunk SPL
index=* sourcetype="WinEventLog:System" EventCode=7031
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count   `# The service terminated unexpectedly — add EventData fields: param1, param2, Computer`
Hunt event 7031 in Sentinel/Defender →
Build a KQL query for this event in the KQL Query Builder.
Search all event IDs →
Open the interactive Windows Event ID lookup.

Related Service Control Manager events

7000 The service failed to start due to the following error 7001 The service depends on another service 7009 A timeout was reached while waiting for service to connect 7022 The service hung on starting 7023 The service terminated with an error 7024 The service terminated with a service-specific error 7026 The following boot-start or system-start driver failed to load 7034 The service terminated unexpectedly and will be restarted 7035 The service was successfully sent a start or stop control 7036 The service entered the stopped/running state 7038 The service was unable to log on as the configured account 7040 The start type of a service was changed

Frequently asked questions

What is System Event ID 7031?

The service terminated unexpectedly. A service terminated unexpectedly. Failure count and action taken (restart/none) are key.

Which log records event 7031?

Event 7031 is written to the System channel by Service Control Manager / Kernel. Logged by default in the System channel; no audit policy required.

What MITRE ATT&CK techniques map to event 7031?

Event 7031 is associated with: Disable or Modify Tools (T1562.001).

How do you detect activity around event 7031?

Alert: unexpected termination of AV, EDR, SIEM agents, or backup services. Alert: services configured 'take no action' after crash — they won't recover without manual intervention.