Windows event log analysis for incident response: a practical method
A practical method for Windows event log analysis in an incident: which logs to collect, audit policy gaps, key event IDs by question, and a real example.
Windows event log analysis is the part of an investigation most teams can start on straight away: every Windows computer keeps logs, the formats are documented, and the right events answer the core questions of an intrusion. Who logged on and from where, what ran, what was set to run again, and whether anyone tried to hide it. It is also where investigations most often go wrong, because the logs record less than people assume, roll over faster than expected, and are easy to read out of context.
This article is a working method for analysing Windows event logs during an incident. It covers which logs to collect and how long they survive, the gaps in the default audit policy, which event IDs answer which question, a worked example across two hosts from our own lab, and the mistakes that lead to wrong conclusions. Each event ID links to a page in our Windows event ID reference with its fields and attacker patterns.
Step 1: know what you have
Before reading a single event, establish three things for each host.
Which logs exist. Each channel Windows logs to is a separate .evtx file under C:\Windows\System32\winevt\Logs. The ones that matter most in an intrusion are Security, System, Microsoft-Windows-PowerShell/Operational, the TerminalServices and RDP client logs, Task Scheduler, Windows Defender, and Sysmon if it is deployed. The EVTX guide describes the format and where each file lives.
How far back each one goes. Each log has a maximum size, and once it is reached new records replace the oldest ones; the default limits are small. Read the first and last record of each log you hold and write the range down. A Security log that starts at 09:14 this morning cannot tell you who logged on last week, and saying "no suspicious logons" without that caveat is a common reporting error.
What was being audited. The Security log only contains what the audit policy asked for. On a collected host, the fastest check is to count event IDs: if there are thousands of logons but no 4688 process creation events, process auditing was off, whatever anyone believes the policy to be.
Step 2: understand the default gaps
On current Windows without extra Group Policy, logons, logoffs, account management and the System log are recorded. Several of the most useful sources are not:
| Source | Default | What you lose without it |
|---|---|---|
| Process creation (4688) | Off | Every program run, with parent and account |
| Command lines in 4688 | Off, a separate policy | What each program was told to do |
| PowerShell script block logging (4104) | Partial: only blocks Windows considers suspicious | The decoded PowerShell code |
| Scheduled task auditing (4698) | Off | Task creation in the Security log (the Task Scheduler log still has it) |
| Security-log service installs (4697) | Off | Who installed a service (the System log's 7045 is always on) |
| File share auditing (5140, 5145) | Off | Admin share access and files touched over SMB |
| Other Logon/Logoff (4778, 4779) | Off | RDP reconnects and disconnects (the RDP operational logs still have them) |
Two consequences follow. First, an investigation of a host with the defaults leans heavily on the System log, the operational logs and non-log artifacts such as Prefetch, Amcache and the USN Journal. Second, the most valuable thing to do before the next incident is to turn on process creation with command lines and PowerShell script block logging, and to raise the Security log's size.
Step 3: ask the questions in order
Reading events from the top of a log is slow and misses connections. It is faster to ask the questions an intrusion raises, in the order you need the answers, and pull the events that answer each one.
| Question | Start with | Then |
|---|---|---|
| Who logged on, from where, how? | 4624 by logon type, 4625 failures | 4648 explicit credentials, 4672 admin rights |
| Did anyone guess passwords? | 4625 grouped by source and account | 4740 lockouts; 4771 and 4776 on domain controllers |
| Did they use Remote Desktop? | 4624 type 10 and the RDP logs (21, 25, 1149) | 4778 and 4779, the RDP client log on the source |
| What ran? | 4688 or Sysmon 1 | 4104 PowerShell, then Prefetch where logging was off |
| What will run again? | 7045 services, 4698 tasks | 4697, Run keys in the registry |
| Which accounts changed? | 4720 created, 4732 added to a group | 4722, 4724, 4738 |
| Did they reach other hosts? | On the source host: 4648 and the RDP client log | 4624 type 3 or 10 on the destination, 5140 shares |
| Did they hide anything? | 1102 and 104 logs cleared | 4719 audit policy changed, gaps in record numbers |
Each answer produces leads for the next question: an address from 4625 becomes a filter for 4624; the Logon ID of a suspicious 4624 becomes the filter for every process in that session; a service name from 7045 becomes an indicator to sweep across hosts.
Step 4: follow sessions, not events
The single most useful habit in event log analysis is to group events by logon session. Every 4624 carries a Logon ID, and the same ID appears on the 4672, 4688, 4648, 4698 and logoff events that session produced. Pull one Logon ID and you have one account's activity from logon to logoff, with its source address and logon type at the top.
This turns "a process ran at 22:09" into "the account that guessed its way in over the network from 10.211.55.2 started a Remote Desktop session at 22:05 and, inside that session, created a new administrator at 22:09". The second sentence is a finding; the first is a fact without context.
A worked example: two hosts, ten minutes
In our Halden Freight lab case an attacker compromised two Windows workstations. Reading the Security, System, PowerShell and RDP logs by question gave this sequence on HF-WS01 (all times UTC):
| Time | Event | What it answered |
|---|---|---|
| 22:02:58 to 22:04:20 | 35 × 4625 from 10.211.55.2 | Password guessing against five accounts; a.berg took 15 attempts |
| 22:05:03 | 4624 type 3, a.berg, from 10.211.55.2 | The guess succeeded |
| 22:05:05 | 4624 type 10; RDP log event 25 at 22:05:06 | Remote Desktop, taking over a.berg's logged-on console session |
| 22:08:48 | 4688 curl.exe with a URL on 10.211.55.2 | A script downloaded into ProgramData |
| 22:09:40 and 22:09:45 | 4720, 4732 | Local account svc_backup created and added to Administrators |
| 22:09:56, 22:10:02 | Scheduled task HFUpdateCheck; 7045 HF Update Service | Two persistence mechanisms pointing at the same script |
| 22:10:09 | 4104 Compress-Archive | Finance documents archived into q4-close.zip |
| 22:10:54 to 22:10:59 | 4688 cmdkey and mstsc; 4648 for HF-WS02\m.lund | Credentials stored and an RDP connection to the second host |
The second host confirmed the hop from its own side: a 4624 for m.lund from HF-WS01's address at 22:10:59. HF-WS01 then recorded a type 3 logon for svc_backup coming back from HF-WS02 at 22:12:18. The two hosts held 1,483,734 events between them; fewer than fifty were needed to tell the story, and every one of them was found by asking a question rather than by scrolling.
Step 5: corroborate outside the logs
Event logs are strong evidence, but each finding is safer with a second, independent source. A 4688 for a download is confirmed by the file's creation in the USN Journal; a 7045 service is confirmed by its key in the SYSTEM hive; a 4624 type 10 is confirmed by the RDP operational logs, which roll over on a different schedule. Where logs are missing or cleared, the same artifacts become the main evidence. The evidence of execution comparison covers which artifacts prove a program ran.
Collecting Windows event logs
- Copy the files, not an export. Collect the
.evtxfiles themselves, from a live host or an image, rather than CSV exports from Event Viewer, which lose fields and structure. - Collect every channel. Operational logs that seem irrelevant (Task Scheduler, WMI-Activity, BITS, Defender) often hold the one record that matters, and they are small.
- Collect early, and widely. Take logs from every host involved, from each machine those hosts talked to, and from all domain controllers. Logs roll over while you decide.
- Record hashes. As with any evidence, hash what you collected and note when and how.
Arcsentry Collector picks up all event log channels as part of its Windows triage collection, whether the source is a running machine or a disk image, and hashes each file with SHA-256.
Tools for analysing event logs
Event Viewer is fine for one event on one host and impractical for an investigation. PowerShell's Get-WinEvent with a filter hash table, and wevtutil qe, can query exported .evtx files on any Windows machine. Free command-line tools parse logs at scale and apply detection rules (EvtxECmd from Eric Zimmerman's tools, Hayabusa and Chainsaw are widely used), and SIEMs hold forwarded logs for longer than hosts do. Whatever the tool, the method above is the same: establish coverage, ask questions in order, follow sessions, corroborate.
Arcsentry parses every channel from every collected host into one searchable case, rebuilds logon sessions automatically, and lets the AI investigator work through the questions above while citing each event it relies on.
Mistakes that lead to wrong conclusions
- Treating absence as proof. No 4688 means nothing if process auditing was off; no 4624 means nothing if the log starts after the event.
- Ignoring time zones. Events are stored in UTC; Event Viewer shows local time. Mixing the two across hosts in different zones scrambles the sequence.
- Reading event IDs without the provider. Event 1102 in the Security log means the log was cleared; event 1102 in the RDP client log means something else entirely. Always note the channel.
- Counting 4624 type 3 as "a login". Network logons happen constantly for file shares, printers and management tools. They matter in context, not in bulk.
- Stopping at the first host. Every lateral movement hop is recorded on the source and the destination. A finding on one host is a lead for the next.
Frequently asked questions
Where are Windows event logs stored?
Under C:\Windows\System32\winevt\Logs. Each channel has its own file: Security.evtx, System.evtx, and operational channels such as Microsoft-Windows-PowerShell%4Operational.evtx, where %4 stands in for the slash in the channel name. Policy can move a channel elsewhere, and events received from other computers go to ForwardedEvents.evtx.
What are the top Windows event IDs to monitor?
For logons: 4624, 4625, 4648 and 4672. For execution and persistence: 4688, 4104, 7045 and 4698. For accounts: 4720 and 4732. For Remote Desktop: 21, 25 and 1149 in the RDP operational logs. For tampering: 1102 and 104. Domain controllers add the Kerberos and NTLM events 4768, 4769, 4771 and 4776.
How do I analyse Windows event logs?
Establish which logs you have and how far back they go, check what the audit policy recorded, then ask the investigation's questions in order (logons, execution, persistence, account changes, lateral movement, clean-up), group events by Logon ID to follow sessions, and confirm each finding with a second source.
What does event code 7040 mean?
Event 7040 in the System log records that a service's start type changed, for example from disabled to automatic. Attackers use it to re-enable services they need or to disable security tools, so changes to security services deserve a look.
How long are Windows event logs kept?
Each log keeps events until it fills up to its size limit; from then on, every new event replaces the oldest one. Default sizes are small, so a busy host may keep only days of Security events. Check the oldest record of each log and collect early.
How we wrote this
Drafted with AI from evidence in our own lab, with Laura Pompeu responsible for the article. The evidence comes from Halden Freight office intrusion (Windows, two hosts), built and investigated in our lab, so every example can be checked against real records.
Sources
- Microsoft Learn: Advanced security audit policy settings, Microsoft
- Microsoft Learn: Get-WinEvent, Microsoft
- Microsoft Learn: wevtutil, Microsoft
- ASD, NSA, CISA and partners: Best practices for event logging and threat detection (2024), Australian Signals Directorate and partners
See it on your own evidence. Free for 7 days.
Tell us what you want to investigate. A person replies within one business day with the download and a trial licence.
Request a trial