Sign in Start free

Blue teamFree course

Windows Security Monitoring in Practice

Investigate an Active Directory intrusion from a phishing document to Domain Admin in 60 minutes: event structure and audit policy, logons and Kerberos, Sysmon and PowerShell logging, persistence, LSASS dumping, Kerberoasting after the 2026 RC4 hardening, DCSync, lateral movement and tiering, AD changes and evasion, WEF and SIEM queries, response and hardening.

  • Level Junior → Expert
  • Time 240 min
  • Modules 10
  • Exercises 27 with worked solutions
  • Includes Lab, 5-question quiz, references

What you'll learn

  • Read Windows events and set an audit policy that records attacks
  • Detect password spraying, malicious execution and persistence
  • Detect LSASS dumping, Kerberoasting and DCSync
  • Trace lateral movement and privileged changes in Active Directory
  • Collect events centrally, respond to a domain compromise and harden AD

Each lesson is tagged Junior, Mid or Expert, so you can start where you are. Finish with the lab and the quiz; a score of 4 out of 5 marks the course complete in this browser.

The lessons below are in English for now, because they quote technical names, commands and log fields. An Arabic version is planned.

Course map

Each module moves from fundamentals to applied work to an expert challenge. Exercises have worked solutions: try first, then open the solution. 10 modules · 27 exercises · ~4 hours

  1. 0Start here: what Windows tells youJuniorMidExpert20 min · 2 exercises
  2. 1Event structure and audit policyJuniorMidExpert25 min · 3 exercises
  3. 2Logons and KerberosJuniorMidExpert25 min · 3 exercises
  4. 3Process execution and PowerShellJuniorMidExpert30 min · 3 exercises
  5. 4PersistenceJuniorMidExpert25 min · 3 exercises
  6. 5Credential access: LSASS, Kerberoasting and DCSyncJuniorMidExpert25 min · 3 exercises
  7. 6Lateral movement and tieringJuniorMidExpert25 min · 3 exercises
  8. 7Active Directory changes and defence evasionJuniorMidExpert25 min · 3 exercises
  9. 8Collection, SIEM queries and the timelineJuniorMidExpert20 min · 3 exercises
  10. 9Response, hardening and the enterprise; cheat sheet and assessmentJuniorMidExpert20 min · 1 exercises

No prior experience is needed. Module 0 covers the architecture, installation and configuration, and sets up the project you extend in every module. Each command is labelled with its impact (read-only, changes files, changes the system, uses the network). Work on a computer or virtual machine you control.

0

Start here: what Windows tells you

Goal: Understand the Windows event logs and Sysmon, how attacks on Active Directory usually unfold, ATT&CK for Windows, and the course investigation.

20 min

Event logs, channels and Active Directory

Windows records security activity in event logs. Each event has a provider, an event ID, a time, a computer and named data fields. The Security log records logons, Kerberos, process creation and account changes, but only for what the audit policy enables. Sysmon adds detailed process, network, registry and LSASS-access events, and since 2026 it ships with Windows 11 and Windows Server 2025 as an optional feature. In a domain, the domain controllers see every authentication, so their logs are the most valuable.

Most corporate breaches end in Active Directory: the attacker starts on one workstation (phishing, a stolen password), steals credentials, moves to servers and takes over the domain. Each step produces specific events on specific machines. Knowing which events, and making sure they are recorded and collected, is the difference between seeing an attack in minutes and finding it months later.

Log (channel)Key eventsNeeds
Security4624/4625 logons, 4672 admin logon, 4688 process, 4698 task, 4720/4728 accounts and groups, 4768/4769/4771 Kerberos, 4662 AD access, 1102 clearedadvanced audit policy (module 1)
System7045 service installed, 104 log clearedon by default
Microsoft-Windows-PowerShell/Operational4104 script block (the decoded script)script block logging
Microsoft-Windows-Sysmon/Operational1 process, 3 network, 10 process access, 11 file, 13 registry, 19-21 WMI, 22 DNSSysmon (built into Windows 11 and Server 2025, off by default)
Microsoft-Windows-Windows Defender/Operational1116 detection, 5001 real-time protection offon by default
Directory Service (DCs)replication, LDAP diagnosticsDC only
WindowsWindowsWindowsPowerShellPowerShellIdentityAzureAzureAgentsWazuhWazuhElastic SecurityElastic SecuritySIEMMicrosoft SentinelMicrosoft SentinelSplunkSplunkOpenSearchOpenSearchAs codeGitHubGitHubGitHub ActionsGitHub ActionsAutomationAnsibleAnsiblePythonPythonResponsePagerDutyPagerDutyThe Windows monitoring toolchain: Windows and PowerShell, identity, telemetry, agents, SIEMs, detection as code, automation and response.

The investigation in this course

On 3 December, a Rimal employee opened a malicious invoice. Sixty minutes later the attacker created a Domain Admin. You will follow the attack through 44 events from three machines (workstation WS-17, file server FS-01, domain controller DC-01) in the JSON shape that Get-WinEvent, Winlogbeat or the Azure Monitor Agent produce, plus one raw XML event, and write the detections that would have caught each step.

PhishingWord → PowerShellFootholdRun key, scheduled taskCredentialsKerberoast, LSASSLateralsvc-sql, PsExecDomainDCSync, new adminEvasionDefender off, logs
StaffWindows 11 workstationsWindowsNEWWS-17lama's workstationWindowsNEWFS-01file serverWindowsNEWDC-01Active DirectoryWindowsNEWAudit policyLogon analyticsProcess + PowerShellPersistenceCredential accessLateral movementAD + evasionWEF / agentsSIEM + SigmaResponseHardeningStage 0: a Windows domain with default auditing; events stay on each machine.
shell
winmon/
├── event_4625.xml, readxml.py      # module 1: the raw format
├── auditpol.txt, auditcheck.py      # module 1: is auditing on?
├── events.jsonl, winlib.py          # 44 events from WS-17, FS-01, DC-01
├── authn.py                         # module 2
├── process.py                       # module 3
├── persist.py                       # module 4
├── creds.py                         # module 5
├── lateral.py                       # module 6
├── evasion.py                       # module 7
└── timeline.py                      # module 8

Quick check: A workstation was compromised. Where do you look for the attacker's Kerberos ticket requests?

Exercise 1Junior

Name the log and event ID for: (a) a new service installed, (b) a decoded PowerShell script, (c) a process opening LSASS.

Worked solution

(a) System 7045 (and Security 4697 if 'Security System Extension' auditing is on). (b) PowerShell/Operational 4104, script block logging. (c) Sysmon/Operational 10 (process access) with TargetImage lsass.exe.

Exercise 2Mid

Why are default Windows settings not enough for security monitoring?

Worked solution

Several key subcategories are off by default (process creation, directory service access, scheduled tasks), 4688 has no command line unless enabled, script block logging is off, Sysmon is off, and the default Security log size holds only hours on a busy server. Without changes, the most important steps of this attack would leave no trace.

Tools in this course

Windows event logging + SysmonOperate

Security, System, PowerShell and Sysmon channels.

Use it for: endpoint and server telemetry

Integrates with: WEF, agents, SIEMs

PowerShellCode

Get-WinEvent, auditpol, AD cmdlets.

Use it for: hunting and response on hosts

Integrates with: WinRM, Defender

Microsoft Sentinel / Defender XDRSecOps

SIEM and XDR with Defender for Endpoint and for Identity.

Use it for: Microsoft-centric SOCs

Integrates with: KQL, AMA, WEF

Splunk / Elastic / WazuhSecOps

SIEMs with Windows add-ons and agents.

Use it for: any SOC

Integrates with: Sysmon, WEF, Winlogbeat

Project step 0

Set up the investigation

Goal: ~/winmon holds the 44 events from 3 December and the tools to analyse them.

1

Event structure and audit policy

Goal: Read a raw Windows event, decode status codes and logon types, check the audit policy for gaps, and configure what is missing.

25 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

2

Logons and Kerberos

Goal: Understand NTLM and Kerberos authentication, detect password spraying, read logon types and sources, and spot service accounts used from workstations.

25 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

3

Process execution and PowerShell

Goal: Detect malicious execution: Office starting shells, encoded PowerShell, living-off-the-land binaries and discovery commands, with Sysmon, 4688 and script block logging.

30 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

4

Persistence

Goal: Detect the ways attackers make malware survive reboots: Run keys, scheduled tasks, services, WMI subscriptions and startup files.

25 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

5

Credential access: LSASS, Kerberoasting and DCSync

Goal: Detect credential dumping from LSASS memory, Kerberoasting with RC4 tickets, and DCSync replication from non-domain controllers.

25 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

6

Lateral movement and tiering

Goal: Map who logged on where, detect remote execution, and use the tiering model to see why one credential reached the domain controller.

25 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

7

Active Directory changes and defence evasion

Goal: Detect new privileged accounts and group changes, and attempts to disable Defender, change auditing or clear logs.

25 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

8

Collection, SIEM queries and the timeline

Goal: Collect events centrally with Windows Event Forwarding or agents, express detections in KQL, SPL and Sigma, and build the incident timeline.

20 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

9

Response, hardening and the enterprise; cheat sheet and assessment

Goal: Contain a domain compromise in the right order, reset krbtgt correctly, harden Windows and AD, and run Windows monitoring at enterprise scale.

20 min

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

Quick reference (the cheat-sheet lessons and the PDF content)
1

Windows telemetry sources

JuniorMid

The Security log alone is not enough. Add Sysmon and PowerShell logging on every host.

Windowsevent channelsSecurity logLogons, accounts, Kerberos, groupsneeds Advanced Audit PolicySysmonProcess, network, registry, DNSuse a tuned config (e.g. Olaf Hartong)PowerShellScript block 4104, module 4103Operational + Windows PowerShell logsDefender / EDRDetections 1116 / 1117Tamper and config changes 5001 / 5007System logService installs 7045Log cleared 104, time changesTask Scheduler, WMI, RDPTaskScheduler 106, WMI-Activity 5861TerminalServices 1149, 21, 25
2

Advanced Audit Policy: enable at minimum

JuniorMid

Set by GPO: Computer Configuration › Policies › Windows Settings › Security Settings › Advanced Audit Policy.

Category › subcategorySettingGives you
Logon/Logoff › Logon, Special LogonSuccess, Failure4624, 4625, 4672
Account Logon › Kerberos Authentication / Service TicketSuccess, Failure4768, 4769, 4771
Account Logon › Credential ValidationSuccess, Failure4776 (NTLM)
Account Management › User, Security GroupSuccess4720, 4722, 4728, 4732, 4756
Detailed Tracking › Process CreationSuccess + command line4688 with full command line
DS Access › Directory Service Changes / AccessSuccess5136, 4662 (DCSync, GPO edits)
Object Access › Detailed File ShareSuccess, Failure5145 (ADMIN$, C$ access)
Policy Change › Audit Policy ChangeSuccess4719 (someone disabled auditing)
3

Event ID reference by category

JuniorMid
IDLogons and accounts
4624 / 4625Logon success / failure (check logon type)
4634 / 4647Logoff
4648Logon with explicit credentials
4672Admin privileges assigned at logon
4720 / 4726User created / deleted
4722 / 4725User enabled / disabled
4724Password reset by an admin
4728 / 4732 / 4756Added to global / local / universal group
4740Account locked out
4767Account unlocked
IDKerberos and NTLM
4768TGT requested (pre-auth type 0 = AS-REP roastable)
4769Service ticket (RC4 0x17 = Kerberoast signal)
4771Pre-auth failed (password spray on DCs)
4776NTLM credential validation
IDExecution, persistence, evasion
4688Process created
4698 / 4702Scheduled task created / changed
7045 / 4697Service installed
4657Registry value changed (if audited)
5136Directory object changed (GPO, AdminSDHolder)
4662Directory object accessed (DCSync)
1102 / 104Security / System log cleared
4719Audit policy changed
4104PowerShell script block
1116 / 1117Defender detection / action
5001 / 5007Defender real-time off / config changed
IDRemote access
4624 type 10RDP logon
4778 / 4779Session reconnected / disconnected
1149RDP user authenticated (TS-RemoteConnectionManager)
5140 / 5145Network share accessed / checked

Logon types (4624 / 4625)

2Interactive3Network4Batch5Service7Unlock8Cleartext9NewCredentials (runas /netonly, PtH)10RDP11Cached

Failure codes (4625 / 4771)

0xC000006Abad password0xC0000064no such user0xC0000234locked out0xC0000072disabled0xC0000193expired0x18Kerberos bad password
4

Detecting Active Directory attacks

MidExpert
AttackATT&CKWhat to look for
Password sprayT1110.003Many 4625 / 4771 across many users from one source in a short window
KerberoastingT1558.003One account requesting many 4769 tickets with encryption type 0x17 (RC4)
AS-REP roastingT1558.0044768 with pre-authentication type 0
DCSyncT1003.0064662 on the domain object with replication GUIDs 1131f6aa-… / 1131f6ad-… from a non-DC account
Pass-the-hashT1550.0024624 type 9 with logon process seclogo; NTLM 4776 from unusual hosts
Golden ticketT1558.0014769 with no matching 4768; odd ticket lifetimes; krbtgt not rotated
Privileged group changeT10984728 / 4732 / 4756 for Domain Admins, Enterprise Admins, Administrators
GPO or AdminSDHolder editT1484.0015136 on groupPolicyContainer or AdminSDHolder
LSASS accessT1003.001Sysmon 10 with TargetImage lsass.exe from a non-security tool
Log clearedT1070.0011102 or 104, especially on a DC
5

Lateral movement fingerprints

MidExpert

Each technique leaves evidence on both ends. Correlate source and destination by time and account.

Attacker on host ATarget host B4648 explicit creds · Sysmon 1 psexec.exePsExec7045 PSEXESVC service · 5145 ADMIN$ · 4624 type 3Sysmon 1 wmic.exe / Invoke-WmiMethodWMIWmiPrvSE.exe spawns process · 4624 type 3Sysmon 3 to port 5985 / 5986WinRM / PS Remotingwsmprovhost.exe child process · WinRM log 91Sysmon 3 to port 3389 · mstsc.exeRDP4624 type 10 · TS-RCM 1149 · TS-LSM 21 / 25schtasks.exe /S remoteScheduled task4698 task created · TaskScheduler 106SOURCE EVIDENCEDESTINATION EVIDENCElateral movement
6

SIEM queries

MidExpert

Field names depend on your connector and add-on. Test on 30 days of data before alerting.

KQL · Sentinel · Kerberoasting
SecurityEvent
| where EventID == 4769
| where TicketEncryptionType == "0x17"
| where ServiceName !endswith "$"
| summarize Tickets = dcount(ServiceName)
    by Account, IpAddress, bin(TimeGenerated, 1h)
| where Tickets > 5
KQL · privileged group changes
SecurityEvent
| where EventID in (4728, 4732, 4756)
| where TargetUserName in ("Domain Admins",
    "Enterprise Admins", "Administrators")
| project TimeGenerated, SubjectUserName,
    MemberName, TargetUserName, Computer
SPL · new service installed
index=wineventlog EventCode=7045
| table _time, host, Service_Name,
        Service_File_Name, Service_Account
| where NOT match(Service_File_Name, "(?i)program files")
SPL · encoded PowerShell
index=wineventlog EventCode=4688
  New_Process_Name="*powershell*"
  (Process_Command_Line="*-enc*"
   OR Process_Command_Line="*-EncodedCommand*")
| table _time, host, Account_Name, Process_Command_Line
7

LOLBins worth a watchlist

JuniorMid

Legitimate tools attackers abuse. Alert on unusual parents and command lines, not on the binary alone.

rundll32runs DLL exportsregsvr32scriptlets /i:httpmshtaHTA from the webcertutil-urlcache downloadbitsadminbackground downloadwmicremote processmsbuildinline C#installutilbypasses app controlcscript / wscriptJS / VBSbcdedit / vssadminshadow copy delete = ransomwarentdsutilcopy NTDS.ditschtaskspersistence

Sysmon event IDs

1Process create3Network connect6Driver loaded7Image load8CreateRemoteThread10Process access11File create12-14Registry15Alternate data stream17-18Named pipes19-21WMI events22DNS query23 / 26File delete25Process tampering
8

Suspicious parent → child processes

JuniorMid

The fastest Tier 1 win on Windows: alert on these pairs from 4688 or Sysmon 1.

winword.exe / excel.exepowershell.exe / cmd.exeMacro or exploit documentoutlook.exemshta.exe / wscript.exeMalicious attachment or linkw3wp.exe / httpd.execmd.exe / powershell.exeWeb shell on IIS or Apachewmiprvse.exepowershell.exeRemote WMI executionservices.exebinary in Temp or ProgramDataMalicious serviceexplorer.exerundll32.exe with no DLL pathFileless loadersqlservr.execmd.exexp_cmdshell abusePARENTSUSPICIOUS CHILDUSUALLY MEANS
9

PowerShell red flags

JuniorMid

Command-line patterns

  • -enc, -EncodedCommand, -w hidden, -nop
  • IEX, Invoke-Expression, DownloadString
  • Add-MpPreference -ExclusionPath (Defender exclusions)
  • Set-MpPreference -DisableRealtimeMonitoring
  • PowerShell v2 started (-Version 2) to dodge logging
10

Logging gaps to close

Junior

Check every host

  • Command-line auditing on for 4688
  • Sysmon deployed with a maintained config
  • PowerShell script-block logging on; v2 removed
  • Security log at least 1 GB, forwarded in near real time
  • DC logs collected from every domain controller
11

Ransomware early-warning signals

JuniorMidExpert

Most ransomware crews spend days inside before encrypting. These signals are your chance to stop it.

SignalWhere you see itTypical lead time
Shadow copies deleted (vssadmin delete shadows, wmic shadowcopy delete)4688 / Sysmon 1Minutes before encryption
Recovery disabled (bcdedit /set recoveryenabled no, wbadmin delete catalog)4688 / Sysmon 1Minutes
Defender turned off or exclusions added5001, 5007, 4104Minutes to hours
Same service pushed to many hosts (PsExec, GPO)7045 on many hosts, 5145 ADMIN$Minutes to hours
Bulk data upload (rclone, MEGA, WinSCP)Sysmon 1 / 3, proxy logsHours to days (double extortion)
New domain admin or GPO edit4728 / 4732 / 4756, 5136Hours to days
Network scanning and AD discovery toolsSysmon 1 / 3 (AdFind, SharpHound, Advanced IP Scanner)Days
Mass file renames or writes from one processSysmon 11, EDREncryption in progress
Try it free threatai.net/soc-gap maps your Windows log sources and Sigma rules to ATT&CK and lists your blind spots.

Key terms

Event ID
The number that identifies the type of a Windows event, such as 4624 for a successful logon.
Sysmon
System Monitor: detailed process, network, registry and LSASS-access events; built into Windows 11 and Server 2025.
Kerberoasting
Requesting service tickets and cracking them offline to recover service account passwords.
DCSync
Abusing replication rights to ask a domain controller for password hashes.
Tiering
Separating identity systems, servers and workstations so credentials never cross upward.
krbtgt
The account whose key signs all Kerberos tickets; reset twice after a domain compromise.

Hands-on lab

Premium This part is included in the Premium and Pro plans. Sign in or see the plans to continue.

Knowledge check

Answer all five questions, then check your answers. Each answer comes with a short explanation.

1Word starts powershell.exe with -EncodedCommand. This most likely means:
2Which event shows a Kerberos service ticket request?
3Sysmon event 10 with TargetImage lsass.exe and GrantedAccess 0x1010 suggests:
44662 with replication GUIDs from a user account means:
5After a DCSync, krbtgt should be:

Further reading

Put it into practice

Use these ThreatAI tools to apply what you learned to your own environment.