Windows Event Log Analysis for IR

Welcome to the Windows Event Log Analysis for Incident Response Lab!

This lab is designed to provide you with a practical, hands-on experience in capturing, analyzing, and investigating Windows event logs as part of a simulated security incident.

You will learn how to collect Windows event logs from an endpoint, use tools like EvtxECmd and Chainsaw to triage and detect suspicious activity, and apply timeline analysis techniques using Timeline Explorer.

Whether you’re a student, aspiring analyst, or cybersecurity professional, this lab will help you develop essential skills in endpoint-focused threat detection and incident response using real-world tools and techniques.

Task 1: Exporting Windows Event Logs Using wevtutil

Objective

This task involves exporting critical Windows Event Logs from the target system using the built-in wevtutil command-line utility. These logs will be used for later parsing and analysis tasks.

Step 1: Open Command Prompt as Administrator

  1. Click on the Start menu and search for "cmd".
  2. Right-click on "Command Prompt" and select "Run as administrator".

image0

Step 2: Export the Event Logs Using wevtutil

Before exporting, you will need to create/specify a destination. In this lab, an output/destination folder for exports has already been created for you: C:\Users\Administrator\Desktop\Exports\

  1. Use the following commands to export each log into .evtx format:
wevtutil epl Security C:\Users\Administrator\Desktop\Exports\Security.evtx
wevtutil epl System C:\Users\Administrator\Desktop\Exports\System.evtx
wevtutil epl Application C:\Users\Administrator\Desktop\Exports\Application.evtx
wevtutil epl Microsoft-Windows-Sysmon/Operational C:\Users\Administrator\Desktop\Exports\Sysmon.evtx

image5

  1. Navigate to the output folder C:\Users\Administrator\Desktop\Exports\ and confirm the .evtx files are present and correctly named.

image4

You have successfully exported key Windows Event Logs using wevtutil. These .evtx files will be used in the next tasks for parsing and analysis.


Task 2: Parsing Event Logs with EvtxECmd

Objective

Step 1: Navigate to the Tools Directory

image1

  1. Open Command Prompt as Administrator.
  2. Navigate to the folder where EvtxECmd is located.
cd C:\Users\Administrator\Desktop\Tools\EvtxECmd

image2

Step 2: Parse Event Log Files with EvtxECmd

In this lab, we will be limiting our focus to the Security channel and the Sysmon event logs.

  1. Use the -f flag to specify the input .evtx file and the --csv flag to specify the output directory:
EvtxECmd.exe -f C:\Users\Administrator\Desktop\Exports\Security.evtx --csv C:\Users\Administrator\Desktop\Exports\Security
EvtxECmd.exe -f C:\Users\Administrator\Desktop\Exports\Sysmon.evtx --csv C:\Users\Administrator\Desktop\Exports\Sysmon

image14

image19

Step 3: Verify the Parsed Output

Navigate to the directory/folder where you saved the parsed logs and confirm that .csv files have been created for each .evtx input.

image12

You have now successfully parsed the Windows Event Logs into structured CSV format using EvtxECmd. These files will be used in the following tasks for log analysis and timeline construction.


Task 3: Timeline Analysis with Timeline Explorer

Objective

Step 1: Launch Timeline Explorer

  1. Navigate to the folder where Timeline Explorer is located: C:\Users\Administrator\Desktop\Tools\TimelineExplorer\TimelineExplorer\
  2. Double-click on TimelineExplorer.exe to launch the tool.

image16

Step 2: Load a Parsed CSV File

  1. Drag and drop one of the parsed .csv files (e.g., Sysmon.csv) from the C:\Users\Administrator\Desktop\Exports\Sysmon\ directory into the Timeline Explorer window.

image18

  1. The data will load into a table format sorted by the TimeCreated column.

image13

Step 3: Explore the Data

  1. Scroll through the events and examine columns like:
  2. TimeCreated
  3. EventID
  4. Image or CommandLine (if present)

  5. Sort the data by TimeCreated to view the chronological sequence of events.

image8

Step 4: Apply Filters to Identify Key Events

Use the filter bar to narrow down events: - Example: Filter EventID == 1 to show process creation events.

image3

image6

image10

Step 5: Analyze the Timeline

Review the filtered and sorted data to: - Identify logon events and follow-up processes - Detect signs of persistence like scheduled tasks or new services - Correlate activity across multiple logs if merged into one CSV

image9

You have successfully used Timeline Explorer to analyze parsed Windows event logs. This step enables you to visualize attacker behavior and build a coherent timeline of events, which is crucial in incident response investigations.


Task 4: Threat Detection with Chainsaw and Sigma Rules

Objective

Step 1: Navigate to the Chainsaw Directory

image7

Step 2: Identify Input and Rules Directories

image17

Step 3: Run Chainsaw Hunt Against a Log File

.\chainsaw_x86_64-pc-windows-msvc.exe hunt C:\Users\Administrator\Desktop\Exports\Sysmon.evtx -s C:\Users\Administrator\Desktop\Tools\chainsaw_all_platforms+rules\chainsaw\sigma\ --mapping C:\Users\Administrator\Desktop\Tools\chainsaw_all_platforms+rules\chainsaw\mappings\sigma-event-logs-all.yml --csv --output Output\sysmon
image11

This command will scan the Security.evtx log and output any rule matches to a specified folder.

image20

Step 4: Review the Output

image15

You have successfully used Chainsaw and Sigma rules to identify suspicious events in Windows event logs. This automated detection step streamlines the triage process and enhances your ability to spot adversary tactics efficiently.