Skip to content
SOC Analyst Role
  • Loading index…

↑↓ navigate · ↵ open · Esc close

en

System · Defense evasion

7040 · The start type of a service was changed

Logged in the System log when a service's start type changes, for example from auto start to disabled. Most changes are routine updates, but attackers and ransomware operators disable Defender, EDR, backup and Volume Shadow Copy services before encryption, making 7040 a useful defense-evasion signal.

medium prioritySystem logDefense evasionMITRE T1562.001

Where it is logged

System log, provider Service Control Manager, on the affected host. No audit policy required. The message parameters hold the service display name, old and new start type, and the service key name; the event's System section carries the SID of the changing user.

Key fields to read

FieldWhat it tells you
param1Display name of the service, e.g. Microsoft Defender Antivirus Service.
param2Previous start type (auto start, demand start, disabled).
param3New start type; disabled on security or backup services is the red flag.
param4Service key name, e.g. WinDefend, VSS, wuauserv.
Security UserIDSID of the account that changed the configuration (often SYSTEM for updates).

Sample event

7040 — synthetic example
Log Name: System
Source: Service Control Manager
EventID: 7040
TimeCreated: 2026-11-21T04:02:33.518Z
Computer: NW-FS-02.northwind.local
Security UserID: S-1-5-21-3623811015-3361044348-30300820-2417
param1: Volume Shadow Copy
param2: demand start
param3: disabled
param4: VSS
Message: The start type of the Volume Shadow Copy service was changed from demand start to disabled.

How to triage it

  1. 1Identify the service from param4/param1 and classify it: security (WinDefend, Sense, EDR agents), backup (VSS, backup agents), update (wuauserv) or ordinary.
  2. 2Check the direction of change: disabled on a protective service is the concern.
  3. 3Resolve the Security UserID SID; a domain user or newly added admin is more concerning than SYSTEM during patching.
  4. 4Pivot to process creation around the timestamp for sc.exe config ... start= disabled, Set-Service or registry edits under HKLM\SYSTEM\CurrentControlSet\Services.
  5. 5Check other hosts for the same change in the same window; multi-host disabling suggests pre-ransomware staging and needs immediate escalation.

Benign vs suspicious

Usually benign

  • Windows Update and installers switching services between auto start and demand start.
  • BITS and similar services toggling start type during normal operation.
  • IT hardening disabling unneeded services via GPO during a change window.

Red flags

  • Defender (WinDefend), Defender for Endpoint (Sense) or third-party EDR services set to disabled.
  • VSS or backup agent services disabled on servers, especially alongside vssadmin delete shadows.
  • The same service disabled on many hosts within minutes by one account.
  • Changes made by a recently created or recently elevated account (see 4720/4728).

Hunt for it: Splunk & KQL

Splunk SPL
index=wineventlog EventCode=7040 Message="*to disabled*"
| rex field=Message "The start type of the (?<svc>.+?) service was changed from (?<old_start>.+?) to (?<new_start>.+?)\."
| search svc IN ("*Defender*", "*Volume Shadow Copy*", "*Windows Update*", "*Backup*", "*Sense*")
| stats dc(host) AS hosts values(host) AS host_list BY svc, new_start
Sentinel KQL
// Sentinel Event table (System log): protective services switched to disabled
Event
| where TimeGenerated > ago(7d)
| where EventLog == "System" and Source == "Service Control Manager" and EventID == 7040
| where RenderedDescription has "to disabled"
| where RenderedDescription has_any ("Defender", "Volume Shadow Copy", "Windows Update", "Backup", "Sense")
| summarize Hosts = dcount(Computer), HostList = make_set(Computer, 50), First = min(TimeGenerated) by RenderedDescription

Field names depend on your add-on and table. More translations in the Splunk vs KQL cheat sheet.

Interview question

“Several servers log 7040 showing Volume Shadow Copy changed to disabled within ten minutes. What do you think is happening?”

✓ Strong answer sketch

Disabling VSS on multiple servers in a short window is a classic ransomware preparation step, because it prevents shadow-copy recovery before encryption. I would immediately check the SID in the event to identify the account, then look at process creation on those servers for sc config, vssadmin delete shadows, wmic shadowcopy delete or bcdedit recovery changes. I would also look for related service installs (7045), security tool tampering and any log clearing. Given the scope and timing I would escalate as a likely active incident and recommend isolating the affected hosts and disabling the operator account.

More SOC interview questions

Frequently asked questions

Does Event 7040 show who changed the service?

Not in the message text, but the event's System section includes the user SID (Security UserID). Resolve it and correlate with process creation for the exact command.

Can Defender be disabled without generating 7040?

Yes. Tamper Protection blocks many service changes, and attackers may instead use registry policy keys or Defender exclusions, so also watch Defender operational events and registry writes (Sysmon 13).