Security software disabled before the real payload runs.
What gives it awayA transition to 'disabled' for Defender, an EDR agent, or the Windows Event Log service, particularly outside a maintenance window.
ATT&CK T1562.001Nothing matches that yet. Tell us what you were looking for and it goes on the list.
Windows System Log · Event 7040
Something changed whether a Windows service starts automatically, on demand, or not at all. Windows Update and installers do this routinely. So does anyone disabling security software, which is why this quiet informational event is one of the more useful ones in the System log.
Also written as Event ID 70407040 service disabled
A background Windows component was set to start differently. Installing software, running Windows Update, or following a guide that told you to disable something all produce this. It is only interesting if it names something you did not change.
The event records what changed but not who changed it, which is its main limitation — pair it with Security Event 4697 or a 4624 in the same window to attribute it. Alert on transitions to 'disabled' for a named list of services rather than on the event generally: Windows Defender, the Windows Event Log service, Volume Shadow Copy, and any EDR agent. Note that a service can also be neutered by changing its binary path without touching the start type, which produces no 7040 at all.
Sanitised. Addresses come from the RFC 5737 documentation ranges.
The start type of the Windows Defender Antivirus Service service was changed from auto start to disabled. Everything else in the log line is context.
disabledThe service cannot start at all until this is changed back. The value worth alerting on. demand startManual — it will start only when something asks for it. Common and usually benign. auto startStarts with Windows. Normal after an install. delayed auto startStarts shortly after boot to reduce contention. A deliberate performance choice. WinDefend, Sense, WdNisSvcMicrosoft Defender components. Disabling these is a recognised precursor to running something else. EventLogThe Windows Event Log service. Disabling it stops all further logging, including further 7040s. VSS, swprvShadow copy services. Disabling them removes the ability to restore previous versions. BITS, wuauservUpdate-related services. Routinely toggled by update management tooling. Most of the time it is one of these.
What gives it awayA transition to 'disabled' for Defender, an EDR agent, or the Windows Event Log service, particularly outside a maintenance window.
ATT&CK T1562.001What gives it awayVolume Shadow Copy or the backup service set to disabled, usually within minutes of other destructive preparation.
ATT&CK T1490What gives it awayA newly installed service — recorded as Event 7045 — followed by a 7040 setting it to auto start.
ATT&CK T1543.003Get-WinEvent -FilterHashtable @{LogName='System'; Id=7040} -MaxEvents 200 | Where-Object { $_.Message -match 'disabled' } | Select-Object TimeCreated, Message | Format-List Event | where EventLog == 'System' and EventID == 7040 | extend Svc = extract(@'The start type of the (.+?) service was changed', 1, RenderedDescription) | where RenderedDescription has 'disabled' and Svc has_any ('Defender','Event Log','Volume Shadow','Firewall','Sense') | project TimeGenerated, Computer, Svc, RenderedDescription index=wineventlog EventCode=7040 "disabled" | rex "start type of the (?<service>.+?) service was changed" | stats count by service, host | sort -count wevtutil qe System /q:"*[System[(EventID=7040)]]" /c:50 /rd:true /f:text It genuinely does not — the Service Control Manager records the change but not the caller. To attribute it, look at logons around the same minute in the Security log, or at Security Event 4697 if service auditing is enabled. In practice, correlating with the installer or update that was running is faster and answers the question most of the time.
Yes, and common. Every software install, uninstall and Windows Update cycle produces some. The event is informational precisely because the routine case dominates. What makes an instance interesting is the specific service named and the direction of the change.
Because disabling a service is the simplest way to turn a defence off, and it leaves this record. Defender being set to disabled, the Windows Event Log service being disabled, or Volume Shadow Copy being turned off before files start changing are all recorded here. It is one of the few tampering indicators available on a machine with no security tooling installed.
Something is setting it back — Group Policy, a management agent, an optimisation utility, or malware. Check Group Policy first with gpresult, since a policy will silently reapply on every refresh. If no policy accounts for it and no management tool owns the setting, treat the machine as compromised: persistent re-disabling of a security service is not a configuration problem.
Last reviewed 6 September 2026