What is Log Analysis?
Hands-On Lab: Put this into practice with the Hayabusa Lab and the Domain Log Review Lab.
Overview
Log analysis is the process of reviewing records generated by systems, applications, and network devices to understand what happened, when it happened, and who (or what) made it happen. For a SOC analyst, logs are the primary source of evidence. Alerts tell you something might be wrong — logs tell you what actually occurred.
Good log analysis lets you:
- Detect malicious activity such as brute-force attempts, malware execution, and lateral movement
- Investigate alerts by reconstructing the sequence of events
- Scope an incident by figuring out which users, hosts, and data were affected
- Prove or disprove a hypothesis ("Did this account actually log in from that IP?")
Anatomy of a Log Entry
Almost every log entry, regardless of the source, answers the same basic questions. On Windows, each event contains these core fields:
| Field | What It Tells You | Example |
|---|---|---|
| TimeCreated | When the event happened (stored in UTC) | 2026-03-14T02:17:44Z |
| Provider / Source | Which component wrote the event | Microsoft-Windows-Security-Auditing |
| Event ID | The type of event | 4625 |
| Computer | Which host generated it | WS-FINANCE-07 |
| Level / Keywords | Severity, or Audit Success / Audit Failure | Audit Failure |
| Event Data | The details: account names, IPs, process names, status codes | TargetUserName: jsmith |
Tip: Always pay attention to time zones. Windows stores events in UTC but Event Viewer displays them in local time. When you combine logs from multiple systems, normalize everything to UTC first.
Where Windows Logs Live
Windows organizes events into channels. The ones you will use most as an analyst:
| Channel | What It Contains |
|---|---|
| Security | Logons, logoffs, account changes, privilege use, process creation (if audited) |
| System | Service installs, driver loads, system startup and shutdown |
| Application | Errors and info from installed applications |
| Microsoft-Windows-PowerShell/Operational | PowerShell script block logging (Event ID 4104) |
| Microsoft-Windows-Sysmon/Operational | Detailed process, network, file, and registry activity (if Sysmon is installed) |
| Microsoft-Windows-TaskScheduler/Operational | Scheduled task creation and execution |
The raw files are stored as .evtx files in C:\Windows\System32\winevt\Logs\.
Key Windows Security Event IDs
These are the event IDs you should know by heart.
Logon and Authentication
| Event ID | Meaning | Why It Matters |
|---|---|---|
| 4624 | Successful logon | Who got in, how (logon type), and from where |
| 4625 | Failed logon | Brute force, password spraying, mistyped passwords |
| 4634 / 4647 | Logoff | Helps define the length of a session |
| 4648 | Logon using explicit credentials | runas, or an attacker using stolen credentials |
| 4672 | Special privileges assigned to new logon | An admin-level account just logged on |
| 4740 | Account locked out | Often the end result of brute forcing |
Account and Group Changes
| Event ID | Meaning | Why It Matters |
|---|---|---|
| 4720 | User account created | Attackers create accounts for persistence |
| 4722 | User account enabled | Re-enabling a dormant account |
| 4724 | Password reset attempt | An admin (or attacker) reset someone's password |
| 4728 / 4732 / 4756 | Member added to a global / local / universal security group | Privilege escalation (for example, added to Domain Admins) |
Process, Persistence, and Tampering
| Event ID | Meaning | Why It Matters |
|---|---|---|
| 4688 | New process created | What ran on the box (enable command-line logging to see arguments) |
| 4697 / 7045 | Service installed (Security / System log) | Common with PsExec and malware persistence |
| 4698 | Scheduled task created | A very common persistence technique |
| 4670 | Permissions on an object changed | Someone modified access control on a file or object |
| 1102 | Security audit log cleared | Huge red flag: someone is covering tracks |
Note: Event 4688 does not include the command line by default. Turn it on with the Group Policy setting Administrative Templates > System > Audit Process Creation > Include command line in process creation events.
Logon Types
Event 4624 includes a Logon Type field, which tells you how the user logged in. This is one of the most useful fields in all of Windows logging.
| Logon Type | Name | What It Usually Means |
|---|---|---|
| 2 | Interactive | Someone at the keyboard |
| 3 | Network | Accessing a share, or remote tools like PsExec |
| 4 | Batch | Scheduled tasks |
| 5 | Service | A service starting under an account |
| 7 | Unlock | Workstation unlocked |
| 8 | NetworkCleartext | Credentials sent in clear text (for example, IIS basic auth) |
| 9 | NewCredentials | runas /netonly, also seen with pass-the-hash tools |
| 10 | RemoteInteractive | RDP |
| 11 | CachedInteractive | Logon with cached domain credentials (for example, a laptop off the network) |
Example: A logon type 10 for a service account at 3:00 AM from an unfamiliar IP is far more suspicious than a type 5 for the same account.
Failed Logon Status Codes
When you investigate Event 4625, the Status and Sub Status codes tell you why the logon failed.
| Code | Meaning | What to Think |
|---|---|---|
0xC000006A |
Wrong password | Valid username, so a guess may be getting close |
0xC0000064 |
Username does not exist | Username enumeration or a typo |
0xC0000234 |
Account locked out | Brute forcing has already triggered lockout |
0xC0000072 |
Account disabled | Someone is trying an old or terminated account |
0xC0000071 |
Password expired | Usually a legitimate user |
0xC000006F |
Outside of allowed logon hours | Off-hours access attempt |
The Log Analysis Workflow
Effective log analysis follows a repeatable process.
1. Know What "Normal" Looks Like
You can't spot an anomaly without a baseline. Learn the typical logon times, the usual admin accounts, which servers talk to each other, and which processes run every day.
2. Filter the Noise
A single domain controller can generate millions of events per day. Narrow down by:
- Time window: start with the time of the alert
- Event ID: only pull the IDs relevant to your question
- Account or host: focus on the user or system involved
# All failed logons in the last 24 hours
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=(Get-Date).AddHours(-24)}
3. Correlate Events Over Time
A single event rarely tells the whole story. Look for sequences:
4625 x 300 (failed logons, same source IP)
→ 4624 (successful logon, logon type 3)
→ 4672 (admin privileges assigned)
→ 7045 (new service installed)
That sequence reads as: brute force → success → admin access → persistence or lateral movement. Tools like Hayabusa make this much easier by building a single timeline from many logs.
4. Flag Anomalies
Common patterns worth investigating:
| Pattern | What to Look For |
|---|---|
| Brute force | Many 4625s against one account, often ending in a 4740 lockout |
| Password spraying | A few 4625s against many accounts from one source |
| Unusual logon times | Successful logons outside business hours |
| Unusual logon types | RDP (type 10) to servers that are normally only accessed over the network |
| New admin access | 4728/4732 adding accounts to privileged groups |
| Log tampering | 1102: security log cleared |
5. Document What You Find
Write down timestamps, hosts, accounts, and event IDs as you go. A clear timeline is the most valuable thing you can hand to the next analyst or incident responder.
Check Your Understanding
- A host shows 500 Event ID 4625 entries for 500 different usernames, all from the same IP, within ten minutes. What attack is this most likely?
- What logon type would you expect to see for an RDP session?
- You find Event ID 1102 on a domain controller at 2:00 AM. Why is this concerning, and what would you look at next?
- Why might Event ID 4688 be missing the command line of a suspicious process?
Answers
- Password spraying: few attempts per account, many accounts, one source.
- Logon type 10 (RemoteInteractive).
- Someone cleared the Security log, likely to hide activity. Check the events immediately before the clear (if forwarded to a SIEM), the account that cleared it, and other logs (System, Sysmon) on the same host.
- Command-line auditing is not enabled by default and must be turned on through Group Policy.