Execution
Microsoft Defender logs and quarantine
Microsoft Defender forensics: Operational events 1116/1117/5001/5007, MPLog files, DetectionHistory, encrypted quarantine, exclusion keys and tampering traces.
- Location
- C:\ProgramData\Microsoft\Windows Defender\Support\MPLog-*.log
- Proves
- Malware was present or ran, what Defender did, and who weakened its settings
- Timestamps
- Event TimeCreated and quarantine time as FILETIME, UTC; 1116 Detection Time in ISO 8601, UTC; MPLog lines ISO 8601, some without zone
- Retention
- Operational log rolls over at max size (weeks on noisy hosts); MPLog files rotated; quarantine purged after a policy-set period
- Access
- Administrator or SYSTEM only; copy the ProgramData folders with robocopy /B; the EVTX is locked live, export it with wevtutil
- Evidence of
- ExecutionAnti-forensics & deletion
- Type
- File / file system
- Windows
- 8 / 8.11011
- KAPE target
- WindowsDefenderWinDefendDetectionHist
- Velociraptor
- Windows.Triage.Targets:WindowsDefenderWinDefendDetectionHist
Tools
Compare all toolsWhat it is
Microsoft Defender Antivirus (formerly Windows Defender) is the built-in antimalware engine of Windows 8 and later. Besides its event log, it keeps plain-text support logs (MPLog), per-detection DetectionHistory files and an encrypted quarantine that still holds the original malware. Because Defender is present on nearly every Windows host, these files often tell you what the attacker dropped, when, from which process, and whether they tried to switch the product off first.
Location
| Source | Path | Notes |
|---|---|---|
| Operational log | Microsoft-Windows-Windows Defender/Operational → C:\Windows\System32\winevt\Logs\Microsoft-Windows-Windows Defender%4Operational.evtx | Detections, actions, configuration changes |
| Support logs | C:\ProgramData\Microsoft\Windows Defender\Support\MPLog-*.log | Plain text (UTF-16 or UTF-8); same folder holds other diagnostic logs |
| Detection history | C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory\<n>\<GUID> | Binary, one file per detection (Windows 10 and later) |
| Quarantine | C:\ProgramData\Microsoft\Windows Defender\Quarantine\Entries\, \ResourceData\, \Resources\ | RC4-encrypted metadata and file contents |
| Command-line log | C:\Windows\Temp\MpCmdRun.log (and the user's %TEMP% when run as a user) | Actions performed with MpCmdRun.exe |
| Exclusions | HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\ (Paths, Extensions, Processes, ...) and HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Exclusions\ | SOFTWARE hive |
| Windows 7 / Security Essentials | C:\ProgramData\Microsoft\Microsoft AntiMalware\Support\ | Older product, same idea |
All of these folders are restricted to administrators or SYSTEM.
What it proves
- Presence and execution of malware: 1116/1117 name the threat, the file path, the process that touched it and the user. A detection with source AMSI points to script content, often PowerShell.
- File existence and hashes: MPLog lines record scanned files with SHA-1/SHA-256 and processes with their image names, even for files Defender did not flag.
- The sample itself: the quarantine stores the full original file with its timestamps, security descriptor and
Zone.Identifierstream. - Defense evasion: 5001, 5007, 5010/5012, 5013 and new exclusion keys show real-time protection being turned off or paths being excluded.
- It does not prove that a detected file ran: many detections happen on write or on download. Check the detection source and correlate with execution artifacts.
Key fields
| Event ID (Operational) | Meaning |
|---|---|
| 1006 / 1116 | Malware or potentially unwanted software detected |
| 1007 / 1117 | Action taken (quarantine, remove, block, allow...) |
| 1008 / 1118 / 1119 | Action failed / critically failed |
| 1009 / 1011 | Item restored from quarantine / deleted from quarantine |
| 1013 | Malware history deleted |
| 1121 | Attack surface reduction rule fired in block mode |
| 5001 | Real-time protection disabled |
| 5007 | Configuration changed (old and new registry values) |
| 5010 / 5012 | Antispyware / antivirus scanning disabled |
| 5013 | Tamper protection blocked a change |
1116/1117 fields: Threat Name, Severity Name, Category Name, Path, Detection Origin, Detection Source (Real-Time, User, System, AMSI, IOAV...), Detection User, Process Name, Action Name, signature and engine versions. In MPLog, look for ProcessImageName lines (process name, number of files scanned, estimated impact), SDN lines (file path with SHA-1 and SHA-256) and DETECTIONEVENT lines. DetectionHistory files hold the threat name, file path, user, process, file size and MD5/SHA-1/SHA-256.
Timestamps
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
Event TimeCreated | Event written | FILETIME, UTC | Event Viewer shows local time |
1116 Detection Time | Moment of detection | ISO 8601, UTC | Can precede the action event (1117) by seconds or more |
| MPLog line timestamps | Line written | ISO 8601 text | Some lines end in Z (UTC), others carry no zone; check the line type before converting |
| Quarantine entry time | File quarantined | FILETIME, UTC | Separate from the original file's creation, access and write times kept in the entry |
| Exclusion subkey last write | Exclusion added or removed | FILETIME, UTC | Applies to the whole Paths or Processes key, not to one value |
Retention and clearing
- The Operational log rolls over at its maximum size; on a noisy host it can cover only a few weeks.
- MPLog files are rotated by Defender, so older activity disappears over time; collect them early.
- Quarantined items are removed after a retention period (configurable by policy) or by a user or attacker action, which produces 1011; clearing detection history produces 1013.
- Classic tampering:
Set-MpPreference -DisableRealtimeMonitoring $true,Add-MpPreference -ExclusionPath,MpCmdRun.exe -RemoveDefinitions -All, stopping the service or editing policy keys. When tamper protection is on, it blocks many of these and logs 5013. The attempts often survive in PowerShell history and 5007 events even when other traces were removed.
Collection
- KAPE targets:
WindowsDefender(Operational log,Supportfolders,MpCmdRun.log, DetectionHistory, Quarantine,Detections.log) andWinDefendDetectionHist(DetectionHistory only). - Velociraptor (
Windows.Triage.Targets):WindowsDefender,WinDefendDetectionHist. - Built-in (elevated): copy the folders with backup semantics, export the log and query the current state.
robocopy "C:\ProgramData\Microsoft\Windows Defender" E:\case\Defender /E /COPY:DAT /DCOPY:T /B /XD "Definition Updates"
wevtutil epl "Microsoft-Windows-Windows Defender/Operational" E:\case\Defender-Operational.evtx
Get-MpThreatDetection | Export-Csv E:\case\mpthreatdetection.csv -NoTypeInformation
Get-MpPreference | Select-Object Exclusion*, DisableRealtimeMonitoring
reg query "HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions" /s
Quarantine files are still live malware once decrypted; handle them in an isolated lab.
Parsing tools
- EvtxECmd (Eric Zimmerman): maps for Defender events including 1116, 1117, 5001 and 5007.
- mplog_parser (Intrinsec, open source): turns
MPLog-*files into CSV. - DHParser (open source): parses DetectionHistory files to JSON.
- Dissect (Fox-IT, open source):
defender.quarantinelists quarantine entries,defender.recoverdecrypts the files,defender.mploganddefender.exclusionsparse logs and exclusions. - Velociraptor: community artifacts
Windows.Applications.DefenderDHParserandWindows.Applications.DefenderHistoryon the artifact exchange.
Investigation tips
- Build a detection timeline from 1116/1117 first, then enrich each hit with the DetectionHistory file and the quarantine entry for the same threat.
- Recover the quarantined sample and read its
Zone.Identifierstream: the Mark of the Web gives the download URL (see Zone.Identifier). - Treat any 5001, 5010, 5012 or 5007 event that adds an exclusion around the intrusion window as anti-forensics, and find the command that caused it in PowerShell logs.
- Search MPLog for tool names and unusual paths even when nothing was detected:
SDNandProcessImageNamelines can prove a file existed or a process ran. - Match SHA-1 values from MPLog or DetectionHistory with Amcache and with
TargetAppIdin WER reports. - A detection with action "Allow" or a failed action (1008/1118) means the malware may still be active.
Related artifacts
- Windows event logs (EVTX)Windows event log cheat sheet: EVTX locations, must-know event IDs for logons, processes, services and log clearing, retention, audit policy and parsing tools.
- PowerShell logs and historyPowerShell forensics: 4103/4104 script block logs, 400/403/800 engine events, PSReadLine ConsoleHost_history.txt, transcripts and logging policy keys.
- Windows Error Reporting (WER)Windows Error Reporting cheat sheet: Report.wer folders, AppPath and SHA-1 fields, Application events 1000/1001/1002, LocalDumps crash dumps and retention.
- Amcache.hveAmcache.hve cheat sheet: file and program inventory keys, SHA-1 hashes, PE metadata, timestamps and why an entry alone does not prove execution.
- Zone.Identifier (Mark of the Web)Zone.Identifier cheat sheet: Mark of the Web ADS, ZoneId 0 to 4, ReferrerUrl and HostUrl per browser, loss and bypass cases, and collection from the $MFT.
- Registry hivesRegistry hives cheat sheet: SYSTEM, SOFTWARE, SAM, SECURITY, NTUSER.DAT, UsrClass.dat, transaction logs, RegBack, LastWrite times and collection.
Glossary terms
- Windows event IDThe number identifying an event type within a given provider; it only has meaning when paired with its provider and log channel.
- Anti-forensicsTechniques used to destroy, hide or falsify evidence, such as log clearing, timestomping, wiping and deleting shadow copies or the USN journal.
- Evidence of executionArtifacts that show a program actually ran on a Windows system, as opposed to merely existing on disk, and how strongly each one supports that claim.
- Mark of the Web (MOTW)The Zone.Identifier alternate data stream Windows adds to downloaded files, recording the security zone and often the source URL.