Event ID 7040: Service start type was changed
Written when the start type of an existing service is changed, for example from disabled to automatic.
- Channel
- System
- Logged by default
- Yes
- Written on
- Any host
- Volume
- Low
- Provider
- Service Control Manager
- 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 |
|---|---|
| param1 | Display name of the service whose start type changed |
| param2 | Previous start type (e.g. disabled, demand start) |
| param3 | New start type (e.g. auto start) |
| param4 | Short service (registry) name |
Analyst notes
- 01Re-enabling a service that was disabled for hardening (for example enabling the Remote Registry or WebClient service) is a common pre-attack step.
- 02Setting a security or update service to 'disabled' is a defense-evasion signal; pair with 7036 'stopped' for the same service.
- 03Group Policy and legitimate admin tooling change start types routinely; check param4 against the services an attacker would want.
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 'System' -FilterXPath "*[System[(EventID=7040)]]" -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.
- Attack signalService persistenceA service start type was changed, e.g. a disabled defensive service set to disabled or a dormant service set to auto.
- Lateral movementRemote service creationDestination: Start type change when an existing service is reconfigured rather than newly created.
- InvestigationWhat persistence did the attacker create?Services
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.
Also relevant, depending on field values
Related events
Common questions
- What does Windows event ID 7040 mean?
- Written when the start type of an existing service is changed, for example from disabled to automatic. It is written to the System log (System).
- Is event 7040 logged by default?
- Yes, a default Windows installation records it.
- Where is event 7040 recorded?
- In the System channel on the any host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWritten when the start type of an existing service is changed, for example from disabled to automatic. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.