Which Windows event IDs matter most?
Some of these only appear if the audit policy enables them: process creation (4688), for example, is off by default, and its command line needs a separate setting. If an event you expect is missing, check the audit policy before concluding that nothing happened.
Logon events: 4624, 4625 and the logon type
| ID | Event | What to look at |
|---|---|---|
| 4624 | Successful logon | Account, logon type, source IP address and workstation. |
| 4625 | Failed logon | Status and sub-status codes, source IP. Bursts mean brute force or password spraying. |
| 4634 / 4647 | Logoff / user-initiated logoff | Closes the session that a 4624 opened, matched by Logon ID. |
| 4648 | Logon with explicit credentials | Someone used runas or similar with other credentials. Common in lateral movement. |
| 4672 | Special privileges assigned | An administrative account logged on. Correlate with the 4624 right before it. |
Logon types in 4624 and 4625
| Type | Meaning |
|---|---|
| 2 | Interactive: at the keyboard |
| 3 | Network: shared folders, many remote tools |
| 4 | Batch: scheduled tasks |
| 5 | Service: a service started under an account |
| 7 | Unlock: the workstation was unlocked |
| 8 | NetworkCleartext: credentials sent in clear, for example basic authentication |
| 9 | NewCredentials: runas /netonly |
| 10 | RemoteInteractive: Remote Desktop |
| 11 | CachedInteractive: cached domain credentials, no domain controller reachable |
Status codes in 4625
| Code | Meaning |
|---|---|
| 0xC000006A | Correct user name, wrong password |
| 0xC0000064 | The user name does not exist |
| 0xC0000234 | The account is locked out |
| 0xC0000072 | The account is disabled |
| 0xC000006F | Logon outside the allowed hours |
| 0xC0000071 | The password has expired |
Processes, services and scheduled tasks
| ID | Log | Event |
|---|---|---|
| 4688 | Security | A process was created. Includes the command line if that audit setting is on. |
| 4697 | Security | A service was installed. |
| 7045 | System | A service was installed. Often enabled when 4697 is not. |
| 4698 | Security | A scheduled task was created. |
| 4702 | Security | A scheduled task was updated. |
Services and scheduled tasks are two of the most common persistence methods, so a new service or task on a workstation, outside a software deployment window, is worth a look.
Accounts, groups and Kerberos
| ID | Event |
|---|---|
| 4720 | A user account was created |
| 4722 | A user account was enabled |
| 4724 | An attempt was made to reset an account's password |
| 4728 / 4732 / 4756 | A member was added to a security-enabled global / local / universal group |
| 4740 | A user account was locked out |
| 4768 | A Kerberos authentication ticket (TGT) was requested |
| 4769 | A Kerberos service ticket was requested. Many requests with RC4 encryption can point to Kerberoasting. |
| 4771 | Kerberos pre-authentication failed |
| 4776 | The computer attempted to validate the credentials of an account (NTLM) |
An account created and added to the Administrators group within minutes (4720 followed by 4732) is a classic sequence to alert on.
Signs that someone is covering their tracks
- 1102: the Security audit log was cleared.
- 104 (System log): another event log was cleared.
- 4719: the system audit policy was changed.
None of these happen often in normal operation, which makes them some of the most valuable alerts you can have.
