Forensic ArtifactWindows: Eventlog

System.evtx — System Event Log

The System event log records service state changes, driver loads, system errors, and time changes. Key events: 7034/7036 (service crash/state), 104 (log cleared).

The System event log is the operating system’s heartbeat monitor — every service crash, every new service installed, every event log cleared, and every unplanned shutdown is recorded here. When an attacker installs a persistent backdoor as a Windows service or clears event logs to cover their tracks, System.evtx captures the evidence of both actions.

What Is System.evtx?

System.evtx is one of the three core Windows event logs (alongside Security.evtx and Application.evtx) that exists on every Windows installation from Vista onward. It records events generated by Windows system components: the Service Control Manager (SCM), kernel-mode drivers, the Windows Time Service, the Event Log service itself, and core OS subsystems. Unlike the Security log (which requires audit policy configuration), the System log captures critical events by default with no additional configuration required.

The Service Control Manager writes events whenever a service changes state — started, stopped, crashed, or had its startup type modified. The Event Log service records when any event log channel is cleared. The kernel records driver load events, blue screen parameters, and time synchronization changes. For forensic investigators, these default events provide a reliable baseline of system activity that persists across reboots and survives most cleanup attempts.

System.evtx is stored at C:\Windows\System32\winevt\Logs\System.evtx in the EVTX binary XML format. By default, it operates as a rolling log with a 20 MB maximum size. When the log reaches capacity, the oldest events are overwritten. On busy servers, 20 MB may provide only days of retention; on quiet workstations, it may span weeks or months.

Key Insight

System.evtx requires no audit policy configuration. The Service Control Manager, Event Log service, and kernel components write to it by default. This makes it one of the most reliably available forensic artifacts — even on systems where Security.evtx auditing was never enabled.

Location & Format

File Path

FilePathNotes
System.evtxC:\Windows\System32\winevt\Logs\System.evtxPrimary System event log; present on all Windows Vista+ systems
Archive filesC:\Windows\System32\winevt\Logs\Archive-System-*.evtxArchived logs if “Archive the log when full” is enabled (not default)

EVTX Format

The EVTX format (introduced in Vista, replacing the legacy EVT format) uses a binary XML structure. Each event record contains a header with the record ID, timestamp (FILETIME), and event ID, followed by an XML payload containing the event data. Records are stored in 64 KB chunks, each with its own header and CRC32 checksum. This chunked architecture means that even if portions of the file are corrupted, intact chunks can still be parsed.

Default Configuration

Maximum size: 20,971,520 bytes (20 MB)

Retention method: Overwrite events as needed (circular/rolling)

Archive on full: Disabled by default

To check or modify: wevtutil gl System or Event Viewer → System Properties

Critical Event IDs

The following Event IDs are the highest-value entries in System.evtx for forensic and incident response investigations:

Service Control Manager Events

Event IDSourceDescriptionForensic Value
7034Service Control ManagerService terminated unexpectedly (crashed)Indicates service instability; malware services may crash repeatedly during deployment
7035Service Control ManagerService sent a start/stop controlShows which account initiated a service state change
7036Service Control ManagerService entered running/stopped stateConfirms actual service state transition; pair with 7045 for new service timeline
7040Service Control ManagerService start type changed (e.g., Disabled → Auto Start)Attackers change start type to enable persistence or disable security services
7045Service Control ManagerNew service installed on the systemCritical: records service name, binary path, start type, and account. Primary detection for service-based persistence and lateral movement (PsExec, Cobalt Strike)
High-Priority Event

Event ID 7045 is the single most important event in System.evtx for threat detection. Every service installation is logged here, including PsExec’s PSEXESVC, Cobalt Strike’s service-based execution, and attacker-created persistence services. The event records the service name, the full path to the service binary, the service type, the start type, and the account under which it runs.

Event Log Service Events

Event IDSourceDescriptionForensic Value
104Microsoft-Windows-EventlogEvent log was clearedCritical: records which log was cleared and by which account. Evidence of anti-forensics activity.
6005EventLogEvent Log service startedIndicates system boot; use to reconstruct boot/shutdown timeline
6006EventLogEvent Log service stoppedIndicates clean shutdown; absence followed by 6005 suggests crash or power loss
6008EventLogUnexpected shutdown (dirty shutdown)Records the timestamp of the unexpected shutdown; may indicate forced power-off during incident
6009EventLogOS version information at bootRecords Windows version, build number, and processor architecture at every startup

System Time & Other Critical Events

Event IDSourceDescriptionForensic Value
1Microsoft-Windows-Kernel-GeneralSystem time changedRecords old and new time; detects timestomping at the system level
12Microsoft-Windows-Kernel-GeneralOS started (kernel initialization)Boot timestamp with build version information
13Microsoft-Windows-Kernel-GeneralOS shutdown initiatedClean shutdown timestamp
41Microsoft-Windows-Kernel-PowerKernel-Power critical error (unexpected reboot)BugcheckCode identifies crash type; may indicate kernel exploit or forced reboot
7001Microsoft-Windows-WinlogonUser logon notificationLogon event with SID; supplements Security.evtx 4624
7002Microsoft-Windows-WinlogonUser logoff notificationLogoff event with SID
Event ID Quick Reference

For rapid triage, filter on these five Event IDs first: 7045 (new service), 7040 (service type changed), 104 (log cleared), 7034 (service crashed), and 1 (time changed). These five events cover the most common attacker persistence, anti-forensics, and manipulation techniques.

What It Reveals

System.evtx answers the following categories of investigative questions:

Forensic Use Cases

1. PsExec Lateral Movement Detection

When PsExec is used for lateral movement, it installs a temporary service named PSEXESVC on the remote host. Event ID 7045 records: Service Name: PSEXESVC, Service File Name: %SystemRoot%\PSEXESVC.exe, Service Type: user mode service, Service Start Type: demand start, Service Account: LocalSystem. This event persists even after PsExec completes and removes the service binary. The timestamp of the 7045 event pins the lateral movement to the second.

2. Cobalt Strike Service Execution

Cobalt Strike’s psexec and psexec_psh commands create services with randomized 7-character alphanumeric names (e.g., ab1c2d3) and command lines pointing to cmd.exe /c or powershell.exe -nop -w hidden -encodedcommand. Event ID 7045 captures the full service binary path, making the encoded payload recoverable from the event log alone.

3. Anti-Forensics Detection — Log Clearing

An attacker runs wevtutil cl Security to clear the Security event log after credential theft. Event ID 104 in System.evtx records: The Security log file was cleared. Subject: DOMAIN\compromised_admin. The attacker cannot clear System.evtx’s record of the clearing without generating another Event ID 104 for System.evtx itself — creating an infinite evidence loop.

4. Security Service Tampering

Before deploying ransomware, attackers commonly disable endpoint protection. Event ID 7040 captures: The start type of the WinDefend service was changed from auto start to disabled and The start type of the MsMpSvc service was changed from auto start to disabled. The sequence of security services being disabled immediately before encryption provides a clear pre-ransomware indicator.

5. Boot/Shutdown Timeline Reconstruction

In a corporate espionage case, the investigator needs to establish when a laptop was powered on during a weekend. Events 6005 (boot), 6006 (clean shutdown), 6008 (unexpected shutdown), and 12/13 (kernel start/stop) provide an hour-by-hour power timeline. If the laptop was supposedly off-site but System.evtx shows it booting at 02:30 AM Saturday, the user’s account is contradicted by the evidence.

Acquisition Methods

Collection Warning

System.evtx is locked by the Event Log service on a live system. Direct copy will fail with a sharing violation. Use wevtutil epl, Volume Shadow Copy, or a forensic imaging tool. On a forensic image, the file can be extracted directly.

Live System — wevtutil Export

CMD / ADMIN
:: Export the System log to a new .evtx file (bypasses file lock)
wevtutil epl System C:\Evidence\System_export.evtx

:: Also export Security and Application for cross-correlation
wevtutil epl Security C:\Evidence\Security_export.evtx
wevtutil epl Application C:\Evidence\Application_export.evtx

:: Quick triage: export only Event ID 7045 (new services) from the last 7 days
wevtutil qe System /q:"*[System[(EventID=7045) and TimeCreated[timediff(@SystemTime) <= 604800000]]]" /f:text

Live System — KAPE / Velociraptor

CMD / ADMIN
:: KAPE: Collect all event logs
kape.exe --tsource C: --tdest C:\Evidence\KAPE_Output --target EventLogs

:: Velociraptor: Collect System.evtx via artifact
:: Artifact: Windows.EventLogs.EvtxHunter
:: Or: Windows.KapeFiles.Targets with target "EventLogs"

Forensic Image — Direct Extraction

BASH / FORENSICS
# Mount forensic image read-only
mount -o ro,noexec,nodev /dev/sdb1 /mnt/evidence

# Copy all event logs
cp -r /mnt/evidence/Windows/System32/winevt/Logs/ /analysis/evtx/

# Or extract only System.evtx
cp /mnt/evidence/Windows/System32/winevt/Logs/System.evtx /analysis/evtx/

Parsing Tools & Analysis

ToolAuthorLicenseOutputNotes
EvtxECmdEric ZimmermanFreeCSV/JSONFast EVTX parser with built-in event maps; outputs structured CSV for Timeline Explorer
ChainsawWithSecureOpen sourceText/JSONSigma-rule-based hunting across EVTX files; excellent for rapid threat hunting
HayabusaYamato SecurityOpen sourceCSV/JSONHigh-speed Sigma-based log analysis with built-in detection rules
Get-WinEventMicrosoftBuilt-inPowerShell objectsNative PowerShell cmdlet; supports XPath filtering on live and offline logs
Event ViewerMicrosoftBuilt-inGUINative GUI tool; supports custom views and XPath filters
python-evtxWill BallenthinOpen sourcePython APIProgrammatic parsing for custom analysis scripts

Parsing with EvtxECmd

CMD / FORENSICS
:: Parse System.evtx to CSV with event maps
EvtxECmd.exe -f C:\Evidence\System.evtx --csv C:\Analysis\System_Output --csvf System_parsed.csv

:: Parse all EVTX files in a directory
EvtxECmd.exe -d C:\Evidence\evtx\ --csv C:\Analysis\AllLogs_Output

Hunting with Chainsaw

CMD / FORENSICS
:: Hunt across all EVTX logs using Sigma rules
chainsaw hunt C:\Evidence\evtx\ -s sigma/rules/ --mapping mappings/sigma-event-logs-all.yml

:: Search for specific Event IDs
chainsaw search C:\Evidence\System.evtx -e 7045
chainsaw search C:\Evidence\System.evtx -e 104

PowerShell Queries (Live or Offline)

POWERSHELL / ANALYSIS
# Find all new service installations (Event ID 7045)
Get-WinEvent -FilterHashtable @{LogName='System';Id=7045} |
    Select-Object TimeCreated, @{N='ServiceName';E={$_.Properties[0].Value}},
        @{N='ImagePath';E={$_.Properties[1].Value}},
        @{N='ServiceType';E={$_.Properties[2].Value}},
        @{N='StartType';E={$_.Properties[3].Value}},
        @{N='AccountName';E={$_.Properties[4].Value}}

# Find all log clearing events (Event ID 104)
Get-WinEvent -FilterHashtable @{LogName='System';Id=104} |
    Select-Object TimeCreated, @{N='ClearedLog';E={$_.Properties[0].Value}},
        @{N='SubjectUser';E={$_.Properties[1].Value}}

# Find service start-type changes (Event ID 7040)
Get-WinEvent -FilterHashtable @{LogName='System';Id=7040} |
    Select-Object TimeCreated, Message | Format-List

# Query an offline .evtx file
Get-WinEvent -Path 'C:\Evidence\System.evtx' -FilterXPath "*[System[(EventID=7045)]]"

Retention & Persistence

PropertyDefault SettingRecommendation
Maximum log size20 MBIncrease to 256 MB – 1 GB for servers; 128 MB for workstations
Retention methodOverwrite as needed (circular)Keep circular; forward to SIEM for long-term retention
Survives rebootYes
Survives OS reinstallNo — destroyed with the OS partitionForward to SIEM; include in regular forensic image backups
Effective retention at 20 MBDays to weeks (activity-dependent)High-activity DCs may retain only 2–3 days at default size
Sizing Recommendation

On domain controllers and critical servers, the default 20 MB System log may retain only 2–3 days of events during active periods. Increase to at least 256 MB (wevtutil sl System /ms:268435456) and forward all events to a SIEM with long-term retention. The cost of additional disk space is negligible compared to the cost of lost evidence.

Anti-Forensics Resilience

System.evtx has strong anti-forensics resilience for most attacks, with one critical exception: direct log clearing by an administrator-level attacker.

MethodClears System.evtx?Detection
wevtutil cl SystemYes — clears all entriesEvent ID 104 is written before the clear completes, but on a quiet system the new log may show only the 104 event
CCleanerOptional — if Event Logs module is selectedIf cleared, Event ID 104 records the action; CCleaner process execution recorded in other artifacts
Deletion of .evtx fileNot possible while service is runningEvent Log service locks the file; requires stopping the service first (which generates Event ID 7036)
Stopping Event Log serviceDoes not clear; stops recordingEvent ID 7036 records the service stopping; absence of subsequent events is itself suspicious
Log size overflowOldest events overwrittenNot an attack per se, but natural evidence loss; increase log size to mitigate
Timestomping system clockNo — but corrupts timelineEvent ID 1 (Kernel-General) records old and new time; cross-reference with network time sources
The 104 Paradox

When an attacker clears any event log, Event ID 104 is recorded in System.evtx. If they then clear System.evtx, a new Event ID 104 is written to the freshly cleared System.evtx. The attacker can never fully erase the evidence of clearing without disabling the Event Log service first — which itself generates events (7036, 7034). This creates a forensic trail that is extremely difficult to fully eliminate.

MITRE ATT&CK Detection Mapping

System.evtx provides direct detection capability for the following MITRE ATT&CK techniques:

TechniqueNameSystem.evtx Evidence
T1543.003 T1543.003Create or Modify System Process: Windows ServiceEvent ID 7045 records every new service installation with binary path and account
T1569.002 T1569.002System Services: Service ExecutionEvents 7035/7036 record service start commands and state transitions
T1070.001 T1070.001Indicator Removal: Clear Windows Event LogsEvent ID 104 records which log was cleared and by which account
T1562.001 T1562.001Impair Defenses: Disable or Modify ToolsEvent ID 7040 when security service start types change to Disabled
T1070.006 T1070.006Indicator Removal: TimestompEvent ID 1 (Kernel-General) records system time changes with old and new values
T1014 T1014RootkitDriver load events record kernel-mode driver installations that may indicate rootkit deployment

Related Artifacts & Cross-References

Complementary Artifacts

ArtifactRelationship to System.evtxCross-Correlation Value
Security.evtxProcess creation (4688), logon events (4624/4625), privilege use (4672)Security.evtx provides the “who logged in”; System.evtx provides the “what services changed”
PowerShell OperationalScript block logging (4104) reveals commands behind service creationIf a service was created via PowerShell, the script content is in the PowerShell log
SysmonProcess creation (Event 1), network connections (Event 3)Sysmon provides the process tree and command line; System.evtx provides service context
SYSTEM registry hiveContains the current service configurationRegistry shows current state; System.evtx shows historical state transitions
PrefetchConfirms execution of service binariesPrefetch provides run count; System.evtx provides service installation timeline
Shimcache/AmcacheRecords file metadata for executed service binariesFile hash and compilation timestamp for service binaries identified in 7045 events

References

  1. Eric Zimmerman, “EvtxECmd — EVTX Parser” — https://ericzimmerman.github.io/
  2. WithSecure, “Chainsaw — Rapid EVTX Hunting” — https://github.com/WithSecureLabs/chainsaw
  3. Yamato Security, “Hayabusa — Windows Event Log Analyzer” — https://github.com/Yamato-Security/hayabusa
  4. SANS Institute, “Windows Event Log Reference” — https://www.sans.org/posters/windows-forensic-analysis/
  5. Microsoft, “Service Control Manager Events” — https://learn.microsoft.com
  6. JPCERT/CC, “Tool Analysis Result Sheet — PsExec” — https://jpcertcc.github.io/ToolAnalysisResultSheet/
  7. SigmaHQ, “Sigma Detection Rules” — https://github.com/SigmaHQ/sigma

Mjolnir Security — Digital Forensics & Incident Response

Mjolnir Security provides 24/7 incident response, digital forensics, and expert witness testimony. Our DFIR team specializes in Windows event log analysis, service-based persistence detection, and enterprise-scale log hunting across thousands of endpoints.

Digital ForensicsIncident ResponseExpert WitnessEvent Log AnalysisPersistence DetectionThreat Hunting

mjolnirsecurity.com — 24/7: +1 833 403 5875