Skip to content
10 · Audit & LoggingPart 4 of 4Foundation

Windows security event IDs that matter

A practical reference to the Windows event IDs worth collecting and alerting on: logons, failure codes, Kerberos, account changes, persistence and tampering.

Florian Amette9 min read

Windows logs hundreds of event IDs. A few dozen answer almost every investigation question. This reference lists those, what each one means, the fields that matter and the pitfalls that trip up analysts. It complements the audit policy and Sysmon baseline, which covers which audit subcategories to turn on. Here, the focus is on reading and using what they produce.

Unless noted, events are in the Security log. Events from domain controllers are marked DC.

Logon types

Event 4624 (and 4625) carries a Logon Type that tells you how someone logged on. Learn these before anything else:

TypeNameTypical cause
2InteractiveConsole logon, including RunAs
3NetworkSMB share, WinRM, PsExec-style remote execution, most remote admin
4BatchScheduled task
5ServiceService started under an account
7UnlockWorkstation unlocked
8NetworkCleartextCredentials sent in clear to the server, for example IIS Basic authentication
9NewCredentialsrunas /netonly; local identity unchanged, new credentials used on the network
10RemoteInteractiveRDP
11CachedInteractiveDomain logon with cached credentials, no DC reachable

Type 3 logons by admin accounts to workstations, type 10 to servers from non-admin hosts, and type 9 anywhere outside admin workstations are all worth a second look.

Authentication and sessions

IDMeaningFields to read
4624Successful logonLogon Type, Account, Source Network Address, Workstation, Authentication Package, Elevated Token, Logon ID
4625Failed logonStatus and Sub Status, Logon Type, source address
4634 / 4647Logoff / user-initiated logoffLogon ID to match 4624
4648Logon with explicit credentialsProcess, target server, account used
4672Special privileges assigned to new logonAdmin-equivalent session; Logon ID
4740Account locked out (DC)Caller Computer Name: where the bad attempts came from
4767Account unlockedWho unlocked it
4778 / 4779Session reconnected / disconnectedRDP or fast user switching, client name and address

Correlate 4624 and 4672 by Logon ID: that shows which logons were privileged. Authentication Package NTLM with Package Name NTLM V1 should not exist in a modern network. Audit and phase it out as part of your NTLM restriction work.

For 4625, the Sub Status tells you why:

Sub StatusMeaning
0xC0000064Account doesn't exist
0xC000006AWrong password
0xC0000234Account locked out
0xC0000072Account disabled
0xC0000193Account expired
0xC0000071Password expired
0xC0000224Password must change at next logon
0xC000006F / 0xC0000070Outside logon hours / workstation restriction
0xC000015BLogon type not granted (user rights assignment)

Many 0xC0000064 failures from one source mean someone is guessing account names. Many 0xC000006A failures across different accounts from one source mean password spraying. Repeated 0xC000015B for admin accounts on workstations is often your tiering restrictions working as designed.

Domain controllers: Kerberos and NTLM

IDMeaningWhat to look for
4768Kerberos TGT requestedPre-Authentication Type 0: account doesn't require pre-authentication (AS-REP roastable)
4769Kerberos service ticket requestedTicket Encryption Type 0x17 (RC4) for service accounts that support AES: Kerberoasting pattern
4771Kerberos pre-authentication failedFailure code 0x18 wrong password, 0x12 account disabled/locked/expired, 0x17 password expired, 0x25 clock skew
4776NTLM credential validationError 0xC000006A / 0xC0000064; on a member server, it means a local account was used

Encryption types in 4768/4769: 0x11 is AES128, 0x12 is AES256, 0x17 is RC4. As domains move away from RC4, any remaining 0x17 tickets point to accounts or services that need fixing. On Windows Server 2019 and later, and on Server 2016 since the January 2025 cumulative update, 4768 and 4769 also carry MSDS-SupportedEncryptionTypes, Available Keys, Advertized Etypes (what the client offered) and Session Encryption Type. These fields show whether an account or client can do AES before you disable RC4.

Directory and account changes

IDMeaning
4720 / 4726User account created / deleted
4722 / 4725User account enabled / disabled
4723 / 4724Password change attempt by the user / password reset by someone else
4738User account changed (UAC flags, SPN-related changes, password never expires)
4728 / 4729Member added to / removed from a global security group
4732 / 4733Member added to / removed from a local or domain local security group
4756 / 4757Member added to / removed from a universal security group
4741 / 4742Computer account created / changed (DC)
4794Attempt to set the DSRM administrator password (DC)
5136Directory object modified (DC, needs Directory Service Changes and SACLs)
4662Operation performed on a directory object (DC, needs Directory Service Access and SACLs)
4798 / 4799Local group membership enumerated (reconnaissance, noisy)

Alert on 4728, 4732 and 4756 when the group is privileged: Domain Admins, Enterprise Admins, Administrators, Account Operators, Backup Operators, DnsAdmins, Group Policy Creator Owners and your own Tier 0 groups.

DCSync appears as 4662 on a DC where the properties include the replication rights GUIDs 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 (Get-Changes) and 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 (Get-Changes-All), requested by an account that is not a domain controller.

Execution and persistence

IDLogMeaning
4688SecurityProcess created (enable command-line capture)
4697SecurityService installed (Security System Extension subcategory)
7045SystemService installed (Service Control Manager, always logged)
7040SystemService start type changed
4698 / 4702SecurityScheduled task created / updated
4699 / 4700 / 4701SecurityScheduled task deleted / enabled / disabled
106 / 140 / 141Microsoft-Windows-TaskScheduler/OperationalTask registered / updated / deleted (log is often disabled by default; enable it)
4657SecurityRegistry value modified (only with a SACL on the key)
5140SecurityNetwork share accessed (File Share subcategory)

The task XML in 4698 includes the command the task runs: read it, don't just count events. For process-level detail beyond 4688, see Sysmon deployment and tuning.

Tampering and policy changes

IDLogMeaning
1102SecuritySecurity log cleared
104SystemAnother event log cleared
4719SecuritySystem audit policy changed
4616SecuritySystem time changed
4907SecurityAuditing settings (SACL) on an object changed
5001Microsoft-Windows-Windows Defender/OperationalReal-time protection disabled
5007Microsoft-Windows-Windows Defender/OperationalDefender configuration changed (including exclusions)
5013Microsoft-Windows-Windows Defender/OperationalTamper protection blocked a change
1116 / 1117Microsoft-Windows-Windows Defender/OperationalMalware detected / action taken

Each of these should be rare. 1102, 104 and 4719 outside a change window are strong indicators on their own. Defender events are covered in more depth in Microsoft Defender Antivirus hardening.

Remote access and PowerShell

IDLogMeaning
1149Microsoft-Windows-TerminalServices-RemoteConnectionManager/OperationalRDP network authentication succeeded, with source address
21 / 24 / 25Microsoft-Windows-TerminalServices-LocalSessionManager/OperationalRDP session logon / disconnect / reconnect
4104Microsoft-Windows-PowerShell/OperationalScript block logged
400Windows PowerShellEngine started, with host and engine version

RDP leaves traces in three places (Security 4624 type 10, 1149 and 21). If one is missing, you still have the others. Harden the service itself with the RDP hardening guide. For PowerShell hunting patterns, see detecting malicious PowerShell.

Querying the events

Get-WinEvent with a filter hashtable is fast because filtering happens in the event log service:

PowerShell
# Failed logons in the last 24 hours, grouped by account, source and reason
Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4625; StartTime = (Get-Date).AddDays(-1) } |
  ForEach-Object {
    $d = @{}; ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
    [pscustomobject]@{ Account = $d.TargetUserName; Source = $d.IpAddress; SubStatus = $d.SubStatus }
  } | Group-Object Account, Source, SubStatus | Sort-Object Count -Descending | Select-Object -First 20 Count, Name

To filter on event data fields, use XPath:

PowerShell
# RDP logons
Get-WinEvent -LogName Security -MaxEvents 50 `
  -FilterXPath "*[System[EventID=4624] and EventData[Data[@Name='LogonType']='10']]"

# RC4 service tickets on a DC
Get-WinEvent -LogName Security -MaxEvents 100 `
  -FilterXPath "*[System[EventID=4769] and EventData[Data[@Name='TicketEncryptionType']='0x17']]"

Local queries are for investigation and testing. For detection, send these events to a central store with Windows Event Forwarding or an agent.

What breaks

  • Missing events usually mean the subcategory is off, the log wrapped, or a SACL is missing. auditpol /get /category:* shows the effective policy.
  • Volume: 4624, 4634, 4688, 4769 and 5140 are high-volume on servers and DCs. Collect them, but alert on aggregates and anomalies rather than single events.
  • Misread fields: 4624 on a server lists the server's view; the source address may be a NAT, a proxy or empty for local logons. 4740 appears on domain controllers, not on the client.
  • Localised messages: parse fields from the event XML, not from the rendered message text, which changes with the OS language.

Verify it

On a test machine and a test DC, generate a few events and confirm they are logged and forwarded: a failed logon with a wrong password (4625, 0xC000006A), a test user added to a test group (4732 or 4728), a scheduled task created with Register-ScheduledTask (4698) and a service created with New-Service (7045, 4697). Remove the test objects afterwards. If an event doesn't appear, fix the audit policy before building detections on it. More on the logging stack on the audit and logging topic page.

Checklist

  • Logon types and 4625 sub-status codes known by every analyst
  • Audit subcategories and SACLs in place so each listed event can actually fire
  • Alerts on 1102, 104, 4719, 7045/4697, privileged group changes and Defender 5001/5013
  • Kerberos monitoring on DCs: RC4 tickets, pre-authentication disabled, 4771 spikes
  • DCSync detection via 4662 replication GUIDs from non-DC accounts
  • Task Scheduler Operational log enabled; RDP logs collected
  • Queries parse event XML fields, not rendered messages
  • Test events generated and confirmed end-to-end after every policy change

Frequently asked questions

Why don't I see some of these events on my machines?

Most Security log events only appear when the matching advanced audit policy subcategory is enabled, and some also need an auditing entry (SACL) on the object, such as a registry key or the domain root. Check the effective policy with auditpol /get /category:* and compare it with the baseline before assuming nothing happened.

Which events should I alert on first?

Start with rare, high-signal events: Security log cleared (1102), other logs cleared (104), new services (7045 and 4697), additions to privileged groups (4728, 4732, 4756 for admin groups), Defender protection disabled (5001) and replication rights used by non-DC accounts (4662). They fire seldom and almost always deserve a look.

Is event 4625 alone enough to detect password spraying?

It's the core signal, but you need to aggregate it. Spraying shows up as many different accounts failing from one source with the wrong-password sub-status, spread over time to avoid lockouts. On domain controllers, also watch 4771 with failure code 0x18 and 4776 with 0xC000006A, since the attempt may use Kerberos or NTLM rather than an interactive logon.

Windows security event IDs that matter

Related guides

Audit & Logging

Deploying and tuning Sysmon at scale

Choose a Sysmon configuration, cut noise without creating blind spots, roll out updates safely across thousands of hosts and monitor Sysmon itself.

Intermediate
Audit & Logging

Windows audit policy and Sysmon: a logging baseline

Configure advanced audit policy subcategories, command-line capture, log sizes, Sysmon and Windows Event Forwarding so Windows logs can answer who, what, where and when.

Foundation