Windows event IDs that matter
Stage 5 · Lesson 3 · 20 minutes · Requires Lesson 2
The one-line answer
Windows records security activity as numbered events, and about a dozen of those numbers carry most of the meaning — once you know them on sight, a Windows security log stops being noise and starts being a narrative.
Why you should care
Most corporate environments in India run on Windows. Active Directory holds the accounts, the laptops are Windows, and the servers that matter are Windows. Which means the logs you will actually be handed in an L1 job are Windows logs.
Windows does not write sentences. It writes numbers. 4624 instead of "a user logged in". That feels hostile at first and is actually an advantage: numbers are precise, searchable, and the same on every machine in the world.
You do not need to memorise hundreds. Roughly twelve cover the overwhelming majority of real detections, and five of those do most of the work.
How it actually works
The five you must know cold
| ID | Meaning | Why it matters |
|---|---|---|
| 4624 | Successful logon | Who got in, from where, how |
| 4625 | Failed logon | Brute force, spray, misconfiguration |
| 4688 | Process creation | What actually ran |
| 4672 | Special privileges assigned | An administrative session beginning |
| 4720 | User account created | Common persistence step |
If you learn nothing else from this lesson, learn that 4624 is success and 4625 is failure. That pair appears in more investigations than everything else combined.
The rest of the useful dozen
| ID | Meaning |
|---|---|
| 4634 / 4647 | Logoff / user-initiated logoff |
| 4648 | Logon using explicit credentials — "run as" |
| 4726 | User account deleted |
| 4732 | Member added to a security-enabled local group |
| 4768 / 4769 | Kerberos ticket requested — useful for lateral movement |
| 1102 | The audit log was cleared — always worth an alert |
| 7045 | A new service was installed — a classic persistence method |
1102 deserves special attention. Clearing the Security log is itself logged, and almost nothing legitimate does it. If you build exactly one Windows alert, build that one.
Logon types: the detail that carries the meaning
A 4624 on its own is not interesting — thousands occur daily. The Logon Type field is what makes it interesting:
| Type | Meaning | Reads as |
|---|---|---|
| 2 | Interactive | Someone at the physical keyboard |
| 3 | Network | File share access, remote authentication |
| 4 | Batch | Scheduled task |
| 5 | Service | A service account starting |
| 7 | Unlock | Workstation unlocked |
| 8 | NetworkCleartext | Password sent in clear — worth investigating |
| 9 | NewCredentials | runas /netonly |
| 10 | RemoteInteractive | RDP |
| 11 | CachedInteractive | Logged on with cached credentials, no DC contact |
Type 10 is the one to watch. An RDP session onto a server that nobody should be remoting into is the finding — not the 4624 itself.
Type 3 matters in volume: lateral movement across file shares shows up as a burst of type 3 logons from one source to many destinations.
Putting it together: reading a real sequence
09:14:02 4625 user=spatel src=198.51.100.9 Logon Type 3 Failure
09:14:04 4625 user=rkumar src=198.51.100.9 Logon Type 3 Failure
09:14:06 4625 user=amenon src=198.51.100.9 Logon Type 3 Failure
09:14:09 4624 user=dsingh src=198.51.100.9 Logon Type 3 Success
09:14:11 4672 user=dsingh Special privileges assigned
09:15:40 4688 user=dsingh process=powershell.exe -enc JABj...
09:16:02 4720 user=dsingh new account=svc_backup2Read it as a story:
- 09:14:02–06 — three different accounts fail from one source. Few attempts each: spray-shaped, not brute force.
- 09:14:09 — one succeeds. The attack worked.
- 09:14:11 — 4672 means
dsinghholds administrative privileges. The blast radius just became large. - 09:15:40 — an encoded PowerShell command runs. Encoding exists here to obscure.
- 09:16:02 — a new account appears, named to resemble a service account. That is persistence: a way back in even if
dsinghis reset.
Seven lines, a full intrusion. Each line alone might be explainable; the sequence is not.
Why 4688 needs command-line logging turned on
By default, 4688 records that powershell.exe ran — not what it was asked to do. That is nearly useless, because PowerShell runs legitimately all day.
The setting that changes this is "Include command line in process creation events". With it on, you get the arguments:
powershell.exe -nop -w hidden -enc JABjAGwAaQBlAG4AdAAgAD0A...Now you can see that the window was hidden, the profile skipped and the command Base64-encoded — three choices an administrator rarely makes together.
If you join a SOC and command-line logging is off, suggesting it be turned on is a genuinely valuable first contribution. Sysmon (free, from Microsoft) gives richer detail again, including the parent process.
See it yourself
On any Windows machine, open Event Viewer (eventvwr.msc) → Windows Logs → Security.
Filter to just logons: Right-click the Security log → Filter Current Log → enter 4624,4625 in the Event IDs box.
Click a 4624 and read the detail pane. Find:
- Account Name — who
- Logon Type — how
- Source Network Address — from where
Your own interactive logins will show Type 2 or 7. If you have ever used Remote Desktop, you will find a Type 10.
From PowerShell, which is faster once the log is large:
# The last 20 failed logons
Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4625} -MaxEvents 20 |
Format-List TimeCreated, Message
# Successful logons, grouped by account
Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4624} -MaxEvents 200 |
ForEach-Object { $_.Properties[5].Value } | Group-Object | Sort-Object Count -DescendingThat last one is the Windows equivalent of sort | uniq -c — collapse, then look at the shape. The same technique from Lesson 2, different syntax.
How attackers abuse this
They prefer type 3 and type 10. Network and RDP logons move them between machines without ever touching a physical keyboard. A burst of type 3 logons from one workstation to twenty servers is lateral movement, and it is one of the cleanest detections available.
They create accounts that look like service accounts. svc_backup2, sql_admin_tmp. A 4720 that resembles existing naming is designed to survive a casual review of the user list.
They add themselves to groups rather than creating accounts. A 4732 adding a compromised account to Administrators is quieter than a new account appearing, and achieves the same thing.
They install services for persistence. 7045 — a new service survives reboots and runs as SYSTEM. Legitimate software does install services, so the question is always which one, and did anyone approve it.
They clear logs when they are finished. 1102 is loud but by then the detail is gone. This is the argument for forwarding events off the host to a SIEM as they occur — an attacker can clear the local log, but not the copy that already left.
They use cached credentials (type 11) on machines disconnected from the domain, where the DC never sees the authentication at all.
Common mistakes
Alerting on every 4625. Thousands occur daily from expired sessions, stale credentials in scripts and ordinary typos. Alert on patterns — many accounts from one source, or failures followed by a success.
Ignoring 4624 because it means success. A successful logon is the most interesting event in the log when the logon type, source or hour is wrong for that account.
Reading the event ID without the logon type. 4624 alone tells you almost nothing. 4624 + Type 10 + a server nobody remotes into is an incident.
Assuming 4688 shows the command line. It does not by default. Check before relying on it, and check during an investigation rather than discovering the gap afterwards.
Treating 4672 as routine. It is routine — for administrators. On an account that should never hold privilege, it is the moment the account became dangerous.
Forgetting the log overwrites. The default Security log is small and rolls over quickly on a busy server. On a domain controller it can hold hours, not days. Forwarding events off-host is what makes historical investigation possible at all.
Check yourself
- You see a 4624 with Logon Type 3 at 02:40 for a finance user, sourced from a workstation in the engineering department. Why is this worth investigating even though nothing failed?
- A server shows 4688 events for
powershell.exeroughly every hour, all day, every day. What do you check before deciding whether this is suspicious? - You find a 1102 event at 23:50. The Security log before that timestamp is empty. What has happened, and what do you do?
Answers
- Three things are wrong with the context, though nothing failed. The hour is outside that user's working pattern; the source is a machine in a department they have no relationship with; and type 3 means remote authentication, not someone sitting down at a desk. A successful logon with the wrong shape is more serious than a failure, because the account is now in use. Check what that session did next — 4672, 4688, file share access — and contact the user.
- Whether a scheduled task or management agent accounts for it. Hourly regularity suggests automation rather than a person, and legitimate automation is everywhere. Check the command line (if logging is enabled), the parent process, and whether a scheduled task or service exists on that host matching the interval. If command-line logging is off, that gap is itself the first thing to fix — right now you cannot tell these events apart at all.
- The Security audit log was cleared at 23:50, and almost nothing legitimate does that. Treat it as an incident: assume the activity before 23:50 was worth hiding. Your evidence is now whatever left the host before the clearing — SIEM-forwarded events, domain controller logs for authentications involving that machine, network and proxy logs, EDR telemetry. Isolate the host rather than rebooting it, and preserve it; the local log is gone but memory and disk are not.
Your lab
Challenge 09 — Log file investigation
The technique is identical on Windows events. Collapse, find the change in outcome, then read the sequence as a story.
→ Open Stage 1 labs
Summary in your language
हिन्दी सारांश (Hindi summary)
ज़रूरी Windows Event IDs
Windows वाक्य नहीं लिखता, संख्याएँ लिखता है। "User logged in" की जगह 4624। शुरू में अजीब लगता है, पर फ़ायदा यह है कि संख्याएँ दुनिया भर में एक जैसी हैं।
पाँच जो याद होनी ही चाहिए:
| ID | मतलब |
|---|---|
| 4624 | सफल logon |
| 4625 | असफल logon |
| 4688 | Process शुरू हुआ |
| 4672 | Administrative privileges मिले |
| 4720 | नया user account बना |
और कुछ उपयोगी:
- 1102 — audit log मिटाया गया। इस पर हमेशा alert रखें, क्योंकि कोई भी वैध काम ऐसा नहीं करता।
- 7045 — नई service install हुई (persistence का आम तरीक़ा)
- 4732 — किसी को security group में जोड़ा गया
Logon Type — असली मतलब यहीं है:
| Type | मतलब |
|---|---|
| 2 | Keyboard पर बैठकर |
| 3 | Network (file share) |
| 5 | Service |
| 10 | RDP |
| 11 | Cached credentials |
अकेला 4624 कुछ नहीं बताता। 4624 + Type 10 + ऐसा server जिस पर कोई RDP नहीं करता = finding।
एक पूरी कहानी, सात लाइनों में:
09:14:02 4625 spatel Type 3 ← तीन अलग accounts
09:14:04 4625 rkumar Type 3 ← एक ही source से
09:14:06 4625 amenon Type 3 ← spray जैसा
09:14:09 4624 dsingh Type 3 ← एक सफल हुआ
09:14:11 4672 dsingh ← admin अधिकार
09:15:40 4688 powershell -enc ← छिपा हुआ command
09:16:02 4720 svc_backup2 ← persistenceहर लाइन अकेले समझाई जा सकती है। क्रम नहीं।
4688 के बारे में ज़रूरी बात:
Default में 4688 सिर्फ़ यह बताता है कि powershell.exe चला — क्या चलाया गया, वह नहीं। "Include command line in process creation events" setting चालू कीजिए, वरना यह event लगभग बेकार है।
आम गलतियाँ:
- हर 4625 पर alert — रोज़ हज़ारों आते हैं
- 4624 को नज़रअंदाज़ करना क्योंकि वह "success" है
- Logon Type देखे बिना event ID पढ़ना
- यह मान लेना कि 4688 command line दिखाता है
- यह भूलना कि Security log जल्दी भर कर overwrite हो जाता है
தமிழ் சுருக்கம் (Tamil summary)
முக்கியமான Windows Event IDs
Windows வாக்கியங்கள் எழுதுவதில்லை, எண்களை எழுதுகிறது. "User logged in" என்பதற்குப் பதிலாக 4624. ஆரம்பத்தில் கடினமாகத் தோன்றும், ஆனால் எண்கள் உலகம் முழுவதும் ஒரே மாதிரியானவை.
கண்டிப்பாக மனப்பாடம் செய்ய வேண்டிய ஐந்து:
| ID | பொருள் |
|---|---|
| 4624 | வெற்றிகரமான logon |
| 4625 | தோல்வியுற்ற logon |
| 4688 | Process தொடங்கியது |
| 4672 | Administrative privileges வழங்கப்பட்டன |
| 4720 | புதிய user account உருவாக்கப்பட்டது |
மேலும் சில:
- 1102 — audit log அழிக்கப்பட்டது. இதற்கு எப்போதும் alert வையுங்கள்.
- 7045 — புதிய service நிறுவப்பட்டது (persistence)
- 4732 — security group-இல் ஒருவர் சேர்க்கப்பட்டார்
Logon Type — உண்மையான பொருள் இங்கேதான்:
| Type | பொருள் |
|---|---|
| 2 | நேரடியாக keyboard-இல் |
| 3 | Network (file share) |
| 5 | Service |
| 10 | RDP |
| 11 | Cached credentials |
தனியாக 4624 எதையும் சொல்லாது. 4624 + Type 10 + யாரும் RDP செய்யாத server = கண்டுபிடிப்பு.
ஏழு வரிகளில் ஒரு முழுக் கதை:
09:14:02 4625 spatel Type 3 ← மூன்று வெவ்வேறு accounts
09:14:06 4625 amenon Type 3 ← ஒரே source-இலிருந்து
09:14:09 4624 dsingh Type 3 ← ஒன்று வெற்றி
09:14:11 4672 dsingh ← admin உரிமை
09:15:40 4688 powershell -enc ← மறைக்கப்பட்ட command
09:16:02 4720 svc_backup2 ← persistenceஒவ்வொரு வரியையும் தனித்தனியாக விளக்கலாம். வரிசையை முடியாது.
4688 பற்றி முக்கியமானது:
Default-ஆக 4688 powershell.exe இயங்கியது என்பதை மட்டுமே சொல்லும் — என்ன இயக்கப்பட்டது என்பதை அல்ல. "Include command line in process creation events" அமைப்பை இயக்குங்கள்.
பொதுவான தவறுகள்:
- ஒவ்வொரு 4625-க்கும் alert — தினமும் ஆயிரக்கணக்கில் வரும்
- "success" என்பதால் 4624-ஐ புறக்கணிப்பது
- Logon Type பார்க்காமல் event ID படிப்பது
- 4688 command line காட்டும் என்று நினைப்பது
- Security log விரைவில் நிரம்பி overwrite ஆகும் என்பதை மறப்பது
Want this summary in Malayalam, Telugu, Kannada or another language? Tell us — the most requested languages get added next.
What's next
You can read Linux logs and Windows events. Now the system that brings them into one place, runs rules across them, and gives you the vocabulary to describe what you found.
→ Lesson 4: SIEM basics with Wazuh or Splunk Free