Anyone can run the First Look cases free, no account and no watermark. Open a First Look case →First Look cases · free, no account. Open one →

Windows Defender event log: event IDs 1116, 1117, 5001 and 5007

Microsoft-Windows-Windows Defender/Operational is Defender's own account of a host: detections and the action taken, signature updates, scans, an hourly health report and changes to its protection. It dates the definitions a host had at any hour and shows when someone switched protection off.

On a compromised Windows host, Security.evtx and System.evtx get opened first. Defender's Operational log belongs right after them. MsMpEng.exe writes it as SYSTEM, and it holds what Defender detected and did about it, scans, signature updates, an hourly health report, and changes to Defender's own configuration, including the one an intruder makes to turn real-time protection off.

The examples below come from a Windows host in a lab generated for this post (First Look: Accounts and Services in the Logs), read with python-evtx 0.8.1. They're routine background records, none that a case question asks about, and the names are fictional.

Where it is

The file is C:\Windows\System32\winevt\Logs\Microsoft-Windows-Windows Defender%4Operational.evtx. The %4 stands for the slash in the channel name, Microsoft-Windows-Windows Defender/Operational. In Event Viewer it's under Applications and Services Logs > Microsoft > Windows > Windows Defender > Operational. The provider is Microsoft-Windows-Windows Defender, and all 1,200 records in this lab carry UserID S-1-5-18. The Microsoft-Windows-Windows Defender%4WHC.evtx beside it is 69,632 bytes here, an empty log.

The event IDs

Microsoft Learn's "Microsoft Defender Antivirus event IDs and error codes" page documents each one. The ones to know:

1116 and 1117 carry the fields you'll quote: Name (the threat), Severity, Category, Path, Detection Source, User as Domain\User, Process Name, and the Signature Version and Engine Version in force. 1117 adds Action (Clean, Quarantine, Remove, Allow, No action, Block). Read it before you write "Defender handled it": Microsoft notes that an 1117 with Allow means detected and not remediated.

$ python3 defender_log.py ids 'Microsoft-Windows-Windows Defender%4Operational.evtx'
1200 records, EventRecordID 2713 to 3912
oldest 2025-01-23 18:53:59 UTC
  1000    21
  1001     5
  1150   544
  1151   544
  2000    86
The oldest record is number 2713, so the log has wrapped, and 1,088 of 1,200 records are the hourly health pair. No detection, no configuration change: a quiet host.

Versions and updates

Each 2000 names the Current and Previous Signature Version, the Update Type (Full or Delta) and the Current and Previous Engine Version, so updates read as a chain. Don't mix up the three versions: platform (4.18.24090.11, Product Version in 2000), engine (1.1.24090.11) and security intelligence (1.422.x.0).

<EventID Qualifiers="">1150</EventID>
<TimeCreated SystemTime="2025-02-03 11:07:24.366163+00:00"></TimeCreated>
<EventRecordID>3277</EventRecordID>
...
<Data Name="Signature version">1.422.270.0</Data>

<EventID Qualifiers="">2000</EventID>
<TimeCreated SystemTime="2025-02-03 11:29:40.075474+00:00"></TimeCreated>
<EventRecordID>3279</EventRecordID>
...
<Data Name="Current Signature Version">1.422.273.0</Data>
<Data Name="Previous Signature Version">1.422.270.0</Data>
<Data Name="Domain">NT AUTHORITY</Data>
<Data Name="User">SYSTEM</Data>
<Data Name="Signature Type Index">1</Data>
<Data Name="Signature Type">%%800</Data>
<Data Name="Update Type Index">2</Data>
<Data Name="Update Type">%%804</Data>
<Data Name="Current Engine Version">1.1.24090.11</Data>
At 11:07 the hourly 1150 names 1.422.270.0. At 11:29:40 a 2000 moves the host to 1.422.273.0. The 2000 dates the switch exactly.

A second 2000 follows within a millisecond with Signature Type Index 2, so count updates on one index (43 here). python-evtx prints what's stored, so Signature Type and Update Type show references like %%800 and %%804. Read the Index field beside each.

The 1151 written half a millisecond after each 1150 carries protection states and the last scans:

<EventID Qualifiers="">1151</EventID>
<TimeCreated SystemTime="2025-02-03 11:07:24.366779+00:00"></TimeCreated>
...
<Data Name="AVSignature version">1.422.270.0</Data>
<Data Name="RTP state">%%901</Data>
<Data Name="Last quick scan age">2</Data>
<Data Name="AV signature creation time">2/3/2025 12:50:49 AM</Data>
<Data Name="Last quick scan start time">1/31/2025 5:54:01 PM</Data>
<Data Name="Last quick scan source">2</Data>
<Data Name="Last full scan start time">1/1/1601 12:00:00 AM</Data>
<Data Name="Last full scan source">0</Data>
Text times inside 1151 are UTC in US format. The quick scan is the 1000 and 1001 pair of 31 January (source 2, system initiated); 1/1/1601 is an empty FILETIME, and source 0 means no full scan has run.

What it proves

What Defender saw and did. A 1116 puts a threat at Path, under Process Name, as User; the 1117 says what Defender did. Whether the file ran is a question for Prefetch, Amcache or 4688. Before you call a host clean, look for a 1013: detection history deleted.

Which definitions it had at a given time. Take the last 2000 before your timestamp. Microsoft Learn lists engine and security intelligence versions by release date. On a full image, the SOFTWARE hive's Microsoft\Windows Defender\Signature Updates key (AVSignatureVersion, EngineVersion, SignaturesLastUpdated) should agree with the last 2000.

That it was running. 1150 comes every hour. A gap means MsMpEng.exe wasn't writing, and the System log says why:

$ python3 defender_log.py gaps 'Microsoft-Windows-Windows Defender%4Operational.evtx'
2025-01-31 20:53:59 -> 23:07:24  2:13:25.142902
$ python3 defender_log.py list System.evtx 1074 6006 6005 | grep 2025-01-31
2025-01-31 21:45:24 1074
2025-01-31 21:45:27 6006
2025-01-31 21:58:09 6005
The log's one gap over 61 minutes brackets a restart: shutdown at 21:45, boot at 21:58. The first 1150 came 69 minutes after boot: the heartbeat finds the outage, the System log times it.

That protection was turned off. Set-MpPreference -DisableRealtimeMonitoring $true is a configuration change: look for a 5007 with the old and new value and a 5001 as real-time protection goes off. A real 5007 cited in the product's notes reads HKLM\SOFTWARE\Microsoft\Windows Defender\Features\Controls\278 = 0x0, a registry path and a DWORD. Microsoft says to review an unexpected 5007 as possible malware. With tamper protection on, the change is blocked and a 5013 names the setting. Take the 5001's second to the Security log's process creations to find who did it.

Traps

Reading it

The figures come from a short python-evtx script; its core:

from datetime import datetime, timedelta
import xml.etree.ElementTree as ET
import Evtx.Evtx as evtx

E = "{http://schemas.microsoft.com/win/2004/08/events/event}"

def events(path):
    with evtx.Evtx(path) as log:
        for rec in log.records():
            s = ET.fromstring(rec.xml()).find(E + "System")
            yield (int(s.find(E + "EventRecordID").text), int(s.find(E + "EventID").text),
                   datetime.fromisoformat(s.find(E + "TimeCreated").get("SystemTime")))

On Windows, Get-WinEvent reads a collected file through the Path key:

Get-WinEvent -FilterHashtable @{Path='.\Microsoft-Windows-Windows Defender%4Operational.evtx';
    Id=1116,1117,1013,5001,5007,5010,5012,5013} -Oldest |
    Select-Object TimeCreated, Id, Message

EvtxECmd takes the whole folder (EvtxECmd.exe -d ...\winevt\Logs --csv out); filter the EventId column and read the PayloadData columns.

In the Windows cases

Every Windows host with event logs in Red Herrings 1.18 ships Defender's Operational log beside Security, System, Application and Group Policy's Operational log. Its records follow the host's boots in the System log: the hourly 1150 and 1151, 2000 pairs climbing to the version in the SOFTWARE hive's Signature Updates key, a full update with a 2002 at an engine release, a scan start every 26 hours, and the newest 1,200 records kept. Where someone turns real-time protection off, a 5007 and 5001 follow the command by seconds. Versions follow Microsoft's published release dates, and each student's host, versions and times are their own.

Put a Defender log in front of your class

The First Look cases are free, and a 30-day trial adds a medium and a hard case in each discipline. It runs on your machine and generates a different host for every student.