Windows Log File Locations: A SOC Analyst Guide to Event Logs
Windows stores its main event logs as.evtx files in C:\Windows\System32\winevt\Logs\. The most important for investigations are Security.evtx (logons, process creation, account changes), System.evtx (services, drivers), Application.evtx, Microsoft-Windows-PowerShell%4Operational.evtx, Microsoft-Windows-Sysmon%4Operational.evtx if Sysmon is installed, and the Defender, Task Scheduler and RDP operational logs.
Topic: SOC & Blue Team in Cybersecurity & Ethical Hacking · Explainer
Also covers: Cyber Threats, Scams & Online Safety, Incident Response & Digital Forensics, Active Directory & Identity Security
Learning path: SOC Analyst, lesson 4 of 16
Quick answer: Windows stores its main event logs as .evtx files in C:\Windows\System32\winevt\Logs\. The most important for investigations are Security.evtx (logons, process creation, account changes), System.evtx (services, drivers), Application.evtx, Microsoft-Windows-PowerShell%4Operational.evtx, Microsoft-Windows-Sysmon%4Operational.evtx if Sysmon is installed, and the Defender, Task Scheduler and RDP operational logs. Key event IDs include 4624 and 4625 (logon success and failure), 4688 (process created), 4720 (account created), 7045 (service installed) and 1102 (Security log cleared). Query them read-only with Get-WinEvent or wevtutil, and work from copies.
Key takeaways
- All modern event logs live under System32\winevt\Logs as .evtx files.
- Many useful events only appear if audit policy enables them.
- Sysmon adds process, network and file detail that native logs lack.
- Log clearing (1102, 104) is itself a strong signal.
- Collect logs to a SIEM; CERT-In directions require 180-day retention.
Table of Contents
- Where Are Windows Event Logs Stored?
- Which Event IDs Matter Most to a SOC?
- What Does Sysmon Add?
- Where Else Do Persistence and Execution Traces Hide?
- How Do You Query Logs Safely?
- Which Audit Settings Must Be Enabled?
- How Long Should Logs Be Kept?
- References
Where Are Windows Event Logs Stored?
| Log file (in C:\Windows\System32\winevt\Logs) | What it records |
|---|---|
| Security.evtx | Logons, privilege use, process creation, account and policy changes |
| System.evtx | Service installs and failures, drivers, shutdowns |
| Application.evtx | Application errors and messages |
| Microsoft-Windows-PowerShell%4Operational.evtx | Script block logging (4104) |
| Microsoft-Windows-Sysmon%4Operational.evtx | Sysmon events, if installed |
| Microsoft-Windows-Windows Defender%4Operational.evtx | Detections and protection changes |
| Microsoft-Windows-TaskScheduler%4Operational.evtx | Scheduled task activity |
| Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx | RDP session logon and logoff |
Which Event IDs Matter Most to a SOC?
| Event ID | Log | Meaning | Why it matters |
|---|---|---|---|
| 4624 | Security | Successful logon | Logon type 3 (network) and 10 (RDP) show lateral movement |
| 4625 | Security | Failed logon | Bursts suggest password guessing or spraying |
| 4688 | Security | New process created | Enable command line logging to see arguments |
| 4720 | Security | User account created | Unexpected accounts can mean persistence |
| 4732 | Security | Member added to a local group | Watch the Administrators group |
| 4698 | Security | Scheduled task created | Common persistence method |
| 7045 | System | New service installed | Services are used for persistence and remote execution |
| 1102 | Security | Audit log cleared | Possible anti-forensics |
| 4104 | PowerShell Operational | Script block logged | Reveals decoded script content |
Field descriptions are in Microsoft’s pages for 4624, 4625, 4688, 4720 and 1102. MITRE maps log clearing to T1070.001 and malicious services to T1543.003. System log event 104 records other logs being cleared.
What Does Sysmon Add?
Sysmon is a free Sysinternals tool that logs detailed activity driven by a configuration file. Useful IDs: 1 (process creation with hashes and parent), 3 (network connection), 7 (image loaded), 10 (process access, for example to lsass.exe), 11 (file created), 13 (registry value set) and 22 (DNS query). Tune the configuration to control volume.
Where Else Do Persistence and Execution Traces Hide?
- Registry Run keys: HKLM and HKCU
\Software\Microsoft\Windows\CurrentVersion\Runand RunOnce. - Startup folders:
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startupand the ProgramData equivalent. - Scheduled tasks:
C:\Windows\System32\Tasks\. - Prefetch:
C:\Windows\Prefetch\shows programs run (when enabled). - Amcache:
C:\Windows\AppCompat\Programs\Amcache.hverecords executables present. - IIS web logs:
C:\inetpub\logs\LogFiles\on web servers.
How Do You Query Logs Safely?
These commands only read data. Run them in an elevated PowerShell on the host or against an exported copy, using Get-WinEvent and wevtutil:
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 50
Get-WinEvent -FilterHashtable @{LogName='System'; Id=7045} -MaxEvents 20 | Format-List TimeCreated, Message
Get-WinEvent -Path .\Security-copy.evtx -FilterXPath '*[System[EventID=1102]]'
wevtutil qe Security /q:"*[System[(EventID=4720)]]" /c:10 /f:text /rd:true
wevtutil epl Security C:\Cases\Security-copy.evtx
The last command exports a copy for analysis. Record hashes and timestamps to preserve the chain of custody, as covered in our incident response in digital forensics guide.
Which Audit Settings Must Be Enabled?
Default settings miss many events. Enable advanced audit policy for logon, process creation, account management and security group management; turn on Include command line in process creation events; enable PowerShell script block logging; and increase log sizes so events are not overwritten. Check current settings with auditpol /get /category:*.
How Long Should Logs Be Kept?
Forward logs to a SIEM so an attacker clearing local logs does not erase evidence. In India, CERT-In’s April 2022 directions require ICT system logs to be kept for 180 days within India and incidents reported within 6 hours. Reading these logs well is a core skill listed in our SOC analyst skills guide. For hands-on log analysis labs, see our SOC analyst training.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0