Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 37 ยท Log Collection and Normalization

Windows Event Logs and Sysmon for the SIEM

Learn the Windows Security event IDs a SOC relies on, logon types, process creation and Sysmon basics, and parse sample XML events with Python. All data is invented.

Windows is the most common endpoint in many companies, and its event logs are a rich source of detections. Each event has an ID that says what happened and a set of named fields with the details. This lesson lists the IDs worth knowing and shows how to read them.

All events here are invented for teaching. Collect Windows logs only from systems you administer.

Channels

Channel Holds
Security Logons, account and policy changes, process creation (if audited)
System Services, drivers, startup and shutdown
Application Application errors
Microsoft-Windows-PowerShell/Operational Script block logging
Microsoft-Windows-Sysmon/Operational Detailed endpoint telemetry if Sysmon is installed

Essential Security event IDs

ID Meaning Why it matters
4624 Successful logon Who got in, logon type, source
4625 Failed logon Brute force, password spraying
4634 / 4647 Logoff Session length
4648 Logon with explicit credentials Lateral movement signal
4672 Special privileges assigned Administrator-level logon
4688 Process created Needs audit and command-line logging on
4698 Scheduled task created Persistence
4720 User account created Backdoor accounts
4728 / 4732 Member added to a security group Privilege escalation
4740 Account locked out Spraying or user problem
7045 New service installed (System log) Persistence, remote execution
1102 Audit log cleared Covering tracks

Logon types

The LogonType field in 4624 and 4625 tells how the logon happened:

Type Name Typical meaning
2 Interactive Someone at the keyboard
3 Network File share, remote query
4 Batch Scheduled task
5 Service Service started
7 Unlock Screen unlock
10 RemoteInteractive Remote Desktop

A type 10 logon to a server from the internet is a strong lead; a type 3 from a workstation to another workstation may be lateral movement.

Reading an event

Events can be exported as XML:

XML
<Event>
  <System><EventID>4625</EventID><Computer>DC01</Computer>
    <TimeCreated SystemTime="2026-11-12T10:15:02.000Z"/></System>
  <EventData>
    <Data Name="TargetUserName">alice</Data>
    <Data Name="LogonType">10</Data>
    <Data Name="IpAddress">203.0.113.66</Data>
    <Data Name="Status">0xC000006D</Data>
    <Data Name="SubStatus">0xC000006A</Data>
  </EventData>
</Event>

SubStatus 0xC000006A means the user exists but the password is wrong; 0xC0000064 means the user name does not exist. That difference helps separate a typo from guessing.

Python Parse Windows event XML

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Process creation and command lines

Event 4688 records every new process, but the command line is only included when the policy Include command line in process creation events is on. Command lines expose what a program was asked to do, which is where most malicious behavior shows.

Sysmon (a free Microsoft Sysinternals tool) adds richer events: ID 1 process creation with hashes and parent process, 3 network connection, 11 file created, 13 registry value set, 22 DNS query. It needs a carefully tuned configuration file to avoid huge volume.

Python Flag suspicious parent-child process pairs

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

An Office application starting a shell is a classic suspicious pair, yet it can also be a legitimate macro in your company. Context decides.

Forwarding Windows events

Options include a SIEM agent, Windows Event Forwarding (WEF) where endpoints push to a collector server, or Winlogbeat-style shippers. Collect from domain controllers first: they see all authentication.

Event ID 1102 (Security log cleared) and 104 (System log cleared) deserve a high-priority alert almost everywhere: legitimate clearing is rare.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which event ID is a failed logon?

    4625 is a failed logon; 4624 is a success, 4688 is process creation and 1102 is a cleared audit log.
  2. 2. What does LogonType 10 indicate?

    Type 10 is a remote interactive logon such as RDP.
  3. 3. Which setting is needed to see command lines in event 4688?

    Without that policy only the process name is recorded.
  4. 4. Why alert on event 1102?

    Clearing the Security log is rare in normal operation and common during intrusions.

Summary

  • Know the key IDs: 4624, 4625, 4648, 4672, 4688, 4698, 4720, 4732, 7045 and 1102.
  • LogonType separates interactive, network and remote logons.
  • Command-line logging and Sysmon turn process events into strong detections.
  • Collect domain controllers first and alert on log clearing.

Next: Parsing and Normalization