Event ID 7034 and 7031: a service terminated unexpectedly
Event IDs 7034 and 7031 are written to the System log by the Service Control Manager when a Windows service stops without being asked to: 7034 reports that the service "terminated unexpectedly" and how many times it has done so, and 7031 adds the recovery action Windows will take, such as restarting the service.
What events 7034 and 7031 record
A service that stops on its own, rather than through a stop request, is treated as a crash. The Service Control Manager logs 7034 when the service has no recovery action configured, and 7031 when it has one: "The [service] service terminated unexpectedly. It has done this [n] time(s). The following corrective action will be taken in [n] milliseconds: Restart the service." Both carry the service name and the crash count, which Arcsentry normalises as service_name and event_log_service_crash_count.
Most of these events are mundane: a buggy driver helper, an update replacing files under a running service, a third-party agent that does not handle a sleep or network change. The pattern, the service and the timing decide whether one matters.
When a crashing service is a security concern
- Security tools. Antivirus, EDR, Sysmon, backup and logging agents that crash during an incident window may have been attacked. Attackers kill or crash these services so that their next steps go unrecorded.
- Malicious services. A service that runs a script or command (for example
powershell.exe -File …) instead of a real service program cannot answer the Service Control Manager. Depending on the Windows version, that produces start failures (7000, 7009) or crashes, often immediately after the service is installed (7045). - Exploitation. Repeated crashes of a network-facing service, such as a web server, database or remote management service, can be the side effect of exploit attempts.
- Ransomware preparation. Database, backup and virtualisation services stopped or crashing shortly before files change, so that their files are not locked during encryption.
For each crash in an incident window, find what happened in the seconds before: process creation, a new driver, a logon from another host, or log clearing.
Event 7034 fields
The fields an investigator reads first, what they mean, and where Arcsentry stores them.
| Field | Meaning | Arcsentry field |
|---|---|---|
| Service name | The display name of the service that stopped. | service_name |
| Crash count | How many times the service has terminated unexpectedly. | event_log_service_crash_count |
| Recovery action (7031) | What Windows will do next, and after how long. | event data |
What event 7034 proves, and what it does not
It shows
- That this service stopped without a stop request at this time, and how many times it had done so.
It does not show
- Why it stopped. A crash dump, the Application log and the events before it tell you that.
- That an attacker was involved; most service crashes are software faults.
Attacker activity it reveals
Killing security tools
Terminating or crashing antivirus, EDR or logging services before acting, so that what follows is not recorded. MITRE ATT&CK T1562.001
Script services
A newly installed service whose program is a script or command line, which fails or crashes as soon as it starts but still runs the attacker's code. MITRE ATT&CK T1543.003
Freeing files before encryption
Database and backup services stopped or crashing just before mass file changes.
Finding event 7034 in Arcsentry
Arcsentry parses every channel in Windows\System32\winevt\Logs, whether it comes from an Arcsentry Collector archive, a KAPE or Velociraptor collection, or a disk image. System log records are the event type evtx_system. In Hunt, with that event type selected:
filter event_code in ("7034", "7031", "7045")
select {timestamp, event_code, service_name, event_log_service_crash_count}
sort {timestamp} Service crashes next to service installations, in order. A crash minutes after a new service, or of a security product during the incident, is the one to look at.
Or ask in plain English, for example "show event 7034 on every host, oldest first", and Arcsentry shows the AQL it wrote before it runs. The AQL reference lists the operators used here, and the AI investigator reads the same events, citing each one by its event ID when it reports a finding.
Related event IDs
- Event ID 7036: Service state and start type (7036, 7040)
- Event ID 7045: Service installed
- Event ID 4697: Service installed (Security log)
- Event ID 41: Unexpected shutdown (Kernel-Power)
- Event ID 104: Log cleared (System log)
All events by investigation question: Windows security event IDs for incident response. Logon types in full: Windows logon types. The log files themselves: Windows event logs.
Frequently asked
What does event ID 7034 mean?
A Windows service terminated unexpectedly, without a stop request. The event names the service and how many times it has crashed.
What is the difference between event ID 7031 and 7034?
Both record a service crashing. 7031 is used when the service has a recovery action configured and says what Windows will do next, such as restarting it; 7034 is used when it has none.
How do I find out why a service keeps crashing?
Look in the Application log at the same time for an application error (event 1000) naming the faulting module, check for a crash dump of the service's process, and review recent updates or new software. Repeated crashes of the same service after an update usually point to that update.
Can a crashing service indicate an attack?
Sometimes. Crashes of security or backup services during an incident, or of a service installed minutes earlier that runs a script, deserve investigation. Most crashes are software faults.
Sources
- Microsoft: Service Control Manager event messages (7031, 7034)
- MITRE ATT&CK: T1562.001 Disable or Modify Tools; T1543.003 Windows Service
Checked 2 December 2026 by Venema Labs against Microsoft's audit documentation and, where an example is shown, the named lab case. Field availability varies by Windows version.
Find event 7034 across every host in minutes.
Load your collections, ask what happened, and check every finding against the event behind it. Free for 7 days.
Request a trial