Skip to content

Execution

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.

Location
C:\Windows\System32\winevt\Logs\*.evtx
Proves
Logons, process creation, service and task installs, log clearing, and much more
Timestamps
TimeCreated SystemTime as FILETIME, UTC (Event Viewer shows local time); some EventData fields hold local-time strings
Retention
Circular by default, oldest overwritten at max size (about 20 MB for Security, System, Application on 7+); clearing leaves 1102/104
Access
Administrator; .evtx files locked by the Event Log service: export with wevtutil epl, or copy via raw NTFS or VSS (KAPE EventLogs)
Type
Event log
Windows
XPVista / 78 / 8.11011
KAPE target
EventLogs
Velociraptor
Windows.Triage.Targets:EventLogs

What it is

Windows records events from the OS, services and applications in event logs. Since Windows Vista they are binary XML files (.evtx), one per channel: the classic Security, System and Application logs plus hundreds of Microsoft-Windows-*/Operational channels. They are the backbone of most intrusion timelines: authentication, process creation, persistence, remote access and the attacker's attempts to clear their tracks.

Location

Windows versionPathFormat
XP / Server 2003C:\Windows\System32\config\AppEvent.Evt, SecEvent.Evt, SysEvent.EvtEVT (legacy binary)
Vista / 7 / 8 / 10 / 11C:\Windows\System32\winevt\Logs\*.evtxEVTX

Channel Microsoft-Windows-TerminalServices-LocalSessionManager/Operational becomes the file Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx (/ is written as %4). The configured path and size of each log are in SYSTEM\CurrentControlSet\Services\EventLog\<log> and SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels.

What it proves

Depending on the audit policy and installed components, event logs show who logged on, from where and how, which processes ran (with command lines), which services and scheduled tasks were created, RDP and PowerShell activity, Defender detections, USB connections and log clearing. They rarely show file contents or file access unless object-access auditing is configured.

Key fields

FieldMeaning
EventIDNumeric event ID, meaningful only together with the provider
Provider / ChannelSource and log the event belongs to
TimeCreated SystemTimeWhen the event was logged
EventRecordIDSequential record number within the log
ComputerHost name
Security UserIDSID of the account that generated the event (when present)
EventDataEvent-specific fields (TargetUserName, LogonType, IpAddress, NewProcessName, CommandLine…)

Must-know events:

LogIDMeaning
Security4624 / 4625Successful / failed logon (see logon type)
Security4634 / 4647Logoff / user-initiated logoff
Security4648Logon with explicit credentials (runas, lateral movement tools)
Security4672Special privileges assigned to a new logon (admin-level session)
Security4688 / 4689Process created / exited (requires process-creation auditing)
Security4697Service installed (requires security-system-extension auditing)
Security4698 / 4702Scheduled task created / updated (requires object-access auditing)
Security4720 / 4726User account created / deleted
Security4732Member added to a security-enabled local group (e.g. Administrators)
Security1102Security log cleared
System104A log (other than Security) cleared
System7045New service installed
System7036Service entered running / stopped state
System6005 / 6006Event Log service started / stopped (boot / clean shutdown)

Channel-specific IDs are covered on the RDP, PowerShell, scheduled tasks, Defender and USB pages.

Timestamps

TimestampSet whenFormatPitfalls
TimeCreated SystemTimeEvent written by the providerFILETIME, UTCEvent Viewer displays it in the viewer's local time zone; exported CSVs may too
Fields inside EventDataProvider-specificVariesSome providers log local-time strings
.evtx $SI timesFile changesNTFS, UTCSay nothing about individual events

Retention and clearing

  • Each log has a maximum size and, by default, overwrites the oldest events when full. On Windows 7 and later the default is about 20 MB for Security, System and Application; busy servers or domain controllers can roll over the Security log in hours.
  • Clearing a log leaves 1102 (Security) or 104 (System) behind, with the account that did it.
  • Gaps in EventRecordID, a log starting long after the last boot, or a stopped Event Log service (missing 6005/6006 pairs) point to tampering.
  • Many useful events require audit policy (auditpol) or GPO settings: 4688 needs Audit Process Creation, and the command line needs Include command line in process creation events.

Collection

  • KAPE target: EventLogs (all .evtx, plus .evt on legacy systems); EventLogs-RDP for an RDP-focused subset.
  • Velociraptor (Windows.Triage.Targets): EventLogs; Windows.EventLogs.Evtx and Windows.Sigma.EventLogs query them live.
  • Built-in (administrator):
wevtutil epl Security E:\case\Security.evtx
wevtutil gl Security
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624,4625} -MaxEvents 50
auditpol /get /category:*

Parsing tools

  • EvtxECmd (Eric Zimmerman): EvtxECmd.exe -d E:\case\Logs --csv E:\out normalizes events with maps into CSV for Timeline Explorer.
  • Chainsaw (WithSecure) and Hayabusa (Yamato Security): fast Sigma-based hunting over folders of EVTX files.
  • python-evtx (Willi Ballenthin) and Velociraptor Windows.EventLogs.Evtx: scripted access.
  • Event Viewer: fine for a handful of events; use Filter Current Log and Save Filtered Log File As.

Investigation tips

  • Start with authentication: 4624 by logon type, source IP and workstation name; type 3 and type 10 logons from unexpected hosts are the classic lateral movement trail.
  • Chain 4624 → 4672 → 4688 by TargetLogonId / SubjectLogonId to see what an elevated session did.
  • Hunt persistence with 7045 / 4697 (services) and 4698 (tasks) around the intrusion window.
  • Treat 1102 and 104 as high-priority evidence of anti-forensics, then look for surviving copies in shadow copies, SIEM forwarding and backups.
  • Always normalize to UTC before merging with other artifacts in a super timeline.

Related artifacts

Glossary terms

Guides

All artifacts on one page: cheat sheet