Service start type modified. ServiceName, OldStartType, NewStartType are key. Start types: Automatic, Manual, Disabled.
Disabling security service auto-start ensures it won't restart after reboot. Attackers change AV or EDR services from Automatic to Disabled to prevent recovery after reboot. Also: changing malicious service from Manual to Automatic = persistence.
Alert: security services changed to Disabled or Manual. Alert: unknown services changed to Automatic. This change survives reboots — high persistence indicator.
param1param2Computer | Tactic | Technique |
|---|---|
| Persistence | Windows Service (T1543.003) |
| Defense Evasion | Disable or Modify Tools (T1562.001) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
Event
| where EventLog == "System" and EventID == 7040 // The start type of a service was changed
// EventData holds: param1, param2, Computer
| project TimeGenerated, Computer, RenderedDescription
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:System" EventCode=7040
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# The start type of a service was changed — add EventData fields: param1, param2, Computer`
The start type of a service was changed. Service start type modified. ServiceName, OldStartType, NewStartType are key. Start types: Automatic, Manual, Disabled.
Event 7040 is written to the System channel by Service Control Manager / Kernel. Logged by default in the System channel; no audit policy required.
Event 7040 is associated with: Windows Service (T1543.003), Disable or Modify Tools (T1562.001).
Alert: security services changed to Disabled or Manual. Alert: unknown services changed to Automatic. This change survives reboots — high persistence indicator.