Notes
The logs
Windows splits logs into channels. The Security log is the main one: logons, privilege use, process creation and policy changes. The System log covers services, drivers and the event log service itself. The Application log holds application events. And separate operational logs, especially the PowerShell ones, record script activity. You read them in Event Viewer, or from the command line and scripts with wevtutil and Get-WinEvent, which matter when you automate collection.
- Security log: logons, privilege use, process creation, policy changes
- System log: services, drivers, the event log itself
- Application log: app events
- PowerShell / Operational logs: script activity
- read with Event Viewer or wevtutil / Get-WinEvent
Logon events
The logon events are the ones to know. 4624 is a successful logon, 4625 a failed one. The logon type tells you how: type 2 is someone at the keyboard, type 3 a network logon such as a file share, type 10 remote desktop. 4648 is a logon using explicitly supplied credentials, common in lateral movement. And 4672 means special privileges were assigned, flagging an admin logon. A burst of 4625 then a 4624 is a brute force that worked.
- 4624 successful logon
- 4625 failed logon
- 4634 / 4647 logoff
- logon type matters: 2 interactive, 3 network, 10 remote desktop
- 4648 logon with explicit creds
- 4672 special privileges assigned (admin logon)
Process + changes
Beyond logons, watch what runs and what changes. Event 4688 records a new process; you must enable command-line capture so it includes the full command, not just the program name. 4697 is a new service installed, 4698 a scheduled task created, both classic persistence. 4720 is a new account, and being added to a privileged group shows as 4728 or 4732. And event 1102 means the security log was cleared, almost always an attacker covering tracks.
- 4688 a new process started (enable command-line capture!)
- 4697 a service was installed
- 4698 scheduled task created
- 4720 user account created
- 4728/4732 added to a privileged group
- 1102 the security log was cleared (big red flag)
Defaults log too little
Out of the box, Windows logs too little to catch modern attacks. Turn on the useful parts: process creation with the command line, so you see what ran. PowerShell script block logging, event 4104, which records the scripts attackers run even when obfuscated. A proper audit policy covering logon, account management, privilege use and object access. And Sysmon, a free Microsoft tool adding rich process, network and image-load events. Without these, living-off-the-land attacks are nearly invisible.
- process creation (4688) WITH command line
- PowerShell script block logging (4104) and module logging
- audit policy: logon, account mgmt, privilege, object access
- Sysmon for rich process, network and image-load events
- without this, modern attacks are nearly invisible
Sysmon
Sysmon deserves its own moment. It is a free Microsoft Sysinternals tool that logs process creation with the full command line and parent process, network connections tied to the process that made them, image and DLL loads, and file and registry changes. It is driven by a config file, with excellent community baselines to start from. For most organisations, deploying Sysmon with a good config is the single biggest improvement to Windows detection, because it records what attackers actually do.
- process creation with full command line and parent
- network connections per process
- image / DLL loads
- file and registry changes
- driven by a config (e.g. the community SwiftOnSecurity one)
- the backbone of most Windows detection
Forward it
As with Linux, local logs are evidence an attacker can clear, and event 1102 shows exactly that. So forward everything off the machine, with built-in Windows Event Forwarding or an agent such as Winlogbeat or your SIEM vendor's collector, into a central system. Now the record survives an attacker clearing the local log, and you can hunt across every machine at once, correlating a logon on one host with a process launch on another. Part thirteen builds that pipeline and the detections.
- Windows Event Forwarding (WEF) or an agent (Winlogbeat, the Elastic/Wazuh/Splunk agent)
- send to a SIEM (Part 13)
- so logs survive event-log clearing (ID 1102)
- and you can hunt across every machine at once
High-signal detections
A handful of detections catch a great deal. Failed logons followed by a success. The security log being cleared. A document or browser process spawning PowerShell or the command prompt, a classic sign of a malicious attachment, which you see through process creation and Sysmon parent-child data. Encoded or hidden PowerShell in the script block logs. A new service or scheduled task appearing. And an account suddenly added to the administrators group. Each is rare in normal use and maps to a real attacker step.
- 4625 bursts then a 4624
- event log cleared (1102)
- Office or browser spawning powershell/cmd (4688/Sysmon)
- encoded or hidden PowerShell (4104)
- new service or task (4697/4698)
- account added to admins (4728/4732)
Common mistakes
Mistakes. Running with the default audit policy, which misses most of what matters. Logging process creation without the command line, so you see that PowerShell ran but not what it did. No PowerShell script block logging. No Sysmon. Never forwarding logs, so an attacker clears them. Ignoring event one one zero two when the log is cleared, which is one of the loudest signals there is. And the universal failure: collecting mountains of logs and writing no detections on them.
- default audit policy only
- 4688 without command line
- no PowerShell logging
- no Sysmon
- logs never forwarded
- ignoring 1102 (log cleared)
- collecting logs, writing no detections
Say it like this
In the interview: I use the Security log for logons (4624, 4625, 4672), process creation (4688) with the command line enabled, service and scheduled-task creation, and event 1102 for log clearing. I turn on PowerShell script block logging and deploy Sysmon for rich process and network data, forward everything to a SIEM so it survives log clearing, and alert on high-signal events like document-spawned shells and new admin accounts.
- "The Security log for logons
- (4624/4625/4672), process
- creation (4688) with command
- line, service and task creation, and 1102 for log clearing. I
- enable PowerShell script block
- logging and deploy Sysmon, then forward everything to a SIEM and alert on the high-signal IDs."