Skip to content

Lesson 4 of 14 · 15m

The Security.evtx You'll Actually Read

The dozen Windows Security event IDs that carry a shift — logon types, failure substatuses, Kerberos codes, and the 1102 that means the log was cleared.

Your triage life on Windows runs through C:\Windows\System32\winevt\Logs\Security.evtx and its copies forwarded to the SIEM. The log holds thousands of event IDs; a working analyst carries about a dozen of them in memory and knows the fields inside them that change the verdict.

The IDs that pay rent

4624 — logon. The field that matters is Logon Type: 2 interactive console, 3 network (SMB, net use, most lateral movement), 4 batch (scheduled tasks), 5 service, 7 workstation unlock, 9 NewCredentials (runas /netonly — credentials used remotely without local logon), 10 RemoteInteractive (RDP, the one attackers love), 11 CachedInteractive. "A logon happened" means nothing; "a type-10 logon from a workstation that has never RDP'd to the DC before" is a ticket.

4625 — failed logon. Read the SubStatus, not the event ID. 0xC0000064 = username doesn't exist, 0xC000006A = correct username, wrong password, 0xC0000234 = account locked out, 0xC0000072 = account disabled, 0xC0000071 = expired password, 0xC0000133 = clock skew. The shape plus substatus is the verdict: hundreds of 0xC000006A across hundreds of accounts from one source IP with zero 4740 lockouts is password spraying calibrated to dodge your lockout policy. One account with forty 0xC000006A is a different animal.

4648 — explicit credentials. runas, net use with a password on the command line, scheduled tasks with stored creds, psexec with /u — someone used credentials by name. This is lateral movement's fingerprint.

4672 — special privileges assigned: an admin-tier logon. Pair it with 4624 type 3/10 to spot admin activity arriving over the network.

4688 — process creation. Parent image, new process image, and command line — but only the command line if someone enabled it. "Include command line in process creation events" in the Audit Process Creation policy is off by default on a stock Windows box. An empty CommandLine field in your 4688s isn't an attacker hiding; it's an audit policy nobody turned on.

4740 — account locked out. In a spray, lockouts are what the attacker is avoiding; their absence is the signal.

4768/4769/4770/4771 — Kerberos. 4769 service-ticket requests with ticket encryption type 0x17 (RC4) hammering service accounts with SPNs is the Kerberoasting shape — Impacket's GetUserSPNs.py and Rubeus both produce exactly this. 4768 TGT requests with pre-authentication type 0x0 flag accounts set to "do not require Kerberos preauthentication" — AS-REP roasting fodder. 4771 failures carry their own codes: 0x18 wrong password, 0x12 locked/disabled, 0x17 expired, 0x25 clock skew.

4662 — object access. Mostly noise until it's the domain-head object accessed by a non-DC machine with replication GUIDs 1131f6aa / 1131f6ad / 89e95b76 — that's DCSync, someone impersonating a domain controller to pull every password hash in AD.

7045 — a service was installed. It lives in the System log (Service Control Manager), not Security — analysts who only read Security miss it. New service on a server that doesn't deploy software is a persistence check.

1102 — audit log cleared. T1070.001 in ATT&CK. The event records who cleared it and when. A cleared Security log plus a silent stretch means the local record is gone — pivot to the forwarded SIEM copy, because clearing the local file doesn't delete what already shipped. That's the whole reason centralized log shipping exists.

The wrong mental model

"4625 = attack." A mistyped password is a 4625. The event ID is a noun; the fields are the sentence. Reading event IDs without reading substatus, logon type, source, and count-across-accounts produces escalations that bounce. The other failure: assuming the log shows what happened. It shows what audit policy was configured to record — a box without process-command-line auditing produces 4688s with no command line, and the attacker didn't have to do anything to hide.

Reading them fast

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=(Get-Date).AddHours(-2)} |
  Group-Object {$_.Properties[19].Value} | Sort-Object Count -Descending
wevtutil qe Security /q:"*[System[(EventID=4625)]]" /f:text /c:30

In the SIEM it's the same shape: EventCode=4625 | stats dc(TargetUserName) by Source_Network_Address finds the spray in one line. The skill isn't the syntax — it's knowing which field holds the verdict before you run the query.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.