Fundamentals
T1654Log Sources Overview
A comprehensive guide to the log sources every SOC needs --- Windows Event Logs, Sysmon, firewall logs, DNS, proxy, EDR, cloud audit logs --- and what each reveals during investigations.
View on Graph
Why Logs Are the Foundation and What to Collect
Alerts are signals — they tell you something happened. Logs tell you what exactly, when, where, and how. Without logs, an alert is just noise. Every SOC investigation starts and ends in the logs.
The cardinal rule: log everything, filter later. It is far cheaper to store logs you don’t need than to discover you didn’t log something you do.
Below is a source-by-source breakdown of what each log type captures, the key fields and Event IDs to know, and how analysts use each source.
Windows Security Event Log
The most important single log source for Windows environments. Captures authentication, privilege use, process creation, and policy changes.
Key Event IDs
| Event ID | Name | What It Means |
|---|---|---|
| 4624 | An account was successfully logged on | Successful authentication. Every login generates this — expected for normal activity, critical for tracking lateral movement. |
| 4625 | An account failed to log on | Failed authentication. High volume = brute force or password spray. Track by LogonType to distinguish network vs. interactive. |
| 4634 | An account was logged off | Session termination. Normal. Useful for session duration analysis. |
| 4648 | A logon was attempted using explicit credentials | RunAs or service account impersonation. Critical for detecting pass-the-hash, scheduled task abuse, and lateral movement via WMI/PsExec. |
| 4672 | Special privileges assigned to new logon | Admin-level login (requires SeTcbPrivilege or SeDebugPrivilege). Every admin login generates this — but so does SYSTEM account activity. |
| 4688 | A new process has been created | Process creation. The most important security event for endpoint detection. Captures CommandLine, ParentProcessName, ProcessId. Essential for detecting powershell.exe -EncodedCommand, rundll32.exe abuse, wscript.exe/cscript.exe execution. |
| 4698 | A scheduled task was created | Scheduled task creation. Malware persists via tasks (T1053.005). |
| 4700 | A scheduled task was enabled | Task activation. Check this alongside 4698 to confirm the task ran. |
| 4719 | System audit policy was changed | Attacker covering tracks or disabling logging (T1562.002). This should be rare — any instance is high-priority. |
| 4720 | A user account was created | New user creation. Attackers creating backdoor accounts (T1136.001). Compare with HR onboarding records. |
| 4728 | A member was added to a security-enabled global group | High-value group membership change. Domain Admin group additions are critical (T1098). |
| 4732 | A member was added to a security-enabled local group | Local admin group additions. |
| 4740 | A user account was locked out | Account lockout. Could indicate brute force or user error. Check surrounding 4625 events. |
| 4768 | A Kerberos authentication ticket was requested | TGT request. Volume spikes may indicate Kerberoasting (T1558.003). |
| 4769 | A Kerberos service ticket was requested | ST request. Multiple 4769 for the same service account from different source IPs = Kerberoasting. |
| 4776 | The domain controller attempted to validate credentials | NTLM authentication. Critical for pass-the-hash detection (T1550.002). |
| 4778 | A session was reconnected to a Window Station | RDP session reconnect. Useful for RDP session tracking (T1021.001). |
| 4779 | A session was disconnected from a Window Station | RDP disconnect. |
| 5136 | A directory service object was modified | AD object modification. Tracks changes to user/group attributes. |
| 5140 | A network share object was accessed | SMB share access. Useful for tracking data access patterns. |
| 5145 | A network share object was checked to see whether client can be granted desired access | Share enumeration. May indicate lateral movement staging (T1021.002). |
| 5156 | The Windows Filtering Platform has permitted a connection | Network connection allowed. Useful for outbound connection monitoring. |
| 5157 | The Windows Filtering Platform has blocked a connection | Network connection blocked. Tracks blocked-outbound by Windows Firewall. |
| 5379 | Credential Manager credentials were read | Credential dumping indicator. Tracks when tools like mimikatz or Invoke-Mimikatz read stored credentials (T1003.001). |
Where to find it: Applications and Services Logs > Microsoft > Windows > Security (or forwarded to Windows Event Forwarding collector)
Analyst note: Enable CommandLine logging in 4688 events via GPO (Administrative Templates > System > Audit Process Creation > Include command line in process creation events). This is not enabled by default — and it is the single highest-value log setting you can enable.
Sysmon
Microsoft Sysinternals’ Sysmon sits on Windows endpoints and provides granular telemetry that the built-in security log does not capture. It is the de facto standard for endpoint visibility.
Key Event IDs
| Event ID | Name | What It Means |
|---|---|---|
| 1 | Process creation | Like 4688 but with more fields: Hashes, Image, CommandLine, ParentImage, User. Includes SHA1/SHA256/MD5 hash of the executable — enables immediate file reputation check. |
| 2 | A process changed a file creation time | Timestomping detection (T1070.006). Attackers modify timestamps to blend in with legitimate files. Sysmon catches the original UTC time. |
| 3 | Network connection | Outbound network connections from processes. Critical for detection. Tracks SourceIp, DestinationIp, DestinationPort, Protocol, Image (which process made the connection). Essential for detecting beaconing, data exfiltration, lateral movement. |
| 4 | Sysmon service state changed | Sysmon started or stopped. Stopped = attacker disabling endpoint visibility. Immediate escalation. |
| 5 | Process terminated | Process exit. Useful for process lifetime analysis. |
| 6 | Driver loaded | Kernel driver loading. Malicious or vulnerable drivers circumvent user-mode protections. |
| 7 | Image loaded | DLL loaded into a process. Critical for detecting DLL sideloading, process hollowing, and reflective DLL injection (T1055.001, T1574.002). |
| 8 | CreateRemoteThread | Process injection detected. A process creating a thread in another process’s memory space is a strong lateral movement indicator (T1055). |
| 9 | RawAccessRead | Direct disk read. Mimikatz and other credential dumping tools read LSASS process memory directly (T1003.001). |
| 10 | Process accessed | One process opening a handle to another (OpenProcess). LSASS process access from non-LSASS process = credential dumping indicator. |
| 11 | FileCreate | File creation. Useful for tracking malware drops, especially in suspicious directories (Users/*/AppData, Windows/Temp). |
| 12 | RegistryEvent (Object create/delete) | Registry key creation/deletion. Persistence mechanism detection (T1547). |
| 13 | RegistryEvent (Value set) | Registry value modification. Common persistence technique. |
| 14 | RegistryEvent (Key and value rename) | Registry renaming. Rare — usually indicates sophisticated evasion. |
| 15 | FileCreateStreamHash | Alternate Data Stream (ADS) creation. Attackers hide executables in ADS on NTFS (T1564.004). |
| 16 | Sysmon configuration change | Sysmon config updated. Compare against approved configuration baseline. |
| 17 | Pipe created | Named pipe creation. PsExec and other lateral movement tools create named pipes (T1572). |
| 18 | Pipe connected | Named pipe connection. Tracks which process connects to which pipe. |
| 19 | WmiEventFilter | WMI persistence filter creation. WMI event subscription persistence (T1546.003). |
| 20 | WmiEventConsumer | WMI event consumer creation. WMI event subscription persistence. |
| 21 | WmiEventConsumerToFilter | WMI filter-to-consumer binding. WMI event subscription binding (the actual trigger). |
| 22 | DNSEvent | DNS query. DNS query logging per-process. Tracks QueryName, QueryStatus, QueryResults, ProcessGuid. Essential for DNS tunneling detection and C2 beacon identification. |
Where to find it: Applications and Services Logs > Microsoft > Windows > Sysmon/Operational
Analyst note: Sysmon Event ID 3 (network connections) and Event ID 22 (DNS queries) are the most valuable for network-based threat detection. Ensure your Sysmon config enables both. The default SwiftOnSecurity configuration is an excellent starting point.
Firewall Logs
Firewall logs record allowed and blocked network connections at the network perimeter and between network segments.
What They Capture
- Source IP/Port and Destination IP/Port
- Protocol (TCP, UDP, ICMP)
- Action (Allow, Deny, Drop, Reset)
- Timestamp and Interface
- Packet size and TCP flags (on some platforms)
Analyst Use Cases
- Outbound connection monitoring: Allowed outbound connections to unknown IPs. Cross-reference with threat intelligence feeds.
- Blocked traffic analysis: Dropped inbound connections are normal (internet noise), but blocked outbound traffic from an internal host to an external IP means a policy violation or compromised host attempting C2.
- Port scan detection: High volume of denied connections from a single source IP targeting multiple ports = scanning activity (
T1046). - Data exfiltration: Unusually large outbound packets or persistent outbound connections to a single external IP at regular intervals.
Cloud Firewall Examples
AWS Security Group logs (VPC Flow Logs):
srcaddr,dstaddr,dstport,protocol,action(ACCEPT/REJECT),bytes,packets,start,end- Query:
action = REJECT and dstport not in (443, 80, 53)= unusual blocked traffic
Azure NSG Flow Logs:
FlowDirection(I=inbound, O=outbound),FlowStatus(A=allowed, D=denied),SourcePort,DestinationPort- Query:
FlowStatus = D and FlowDirection = O= outbound traffic blocked
GCP VPC Flow Logs:
- Similar structure.
dest_port,src_ip,dest_ip,bytes_sent,packets
DNS Query Logs
DNS logs are the most underappreciated detection source in most SOCs. Every connection starts with a DNS query. If you can capture all DNS queries from all endpoints, you have a baseline of every domain being accessed.
What They Capture
- Client IP — who asked
- Query name — what domain
- Query type — A, AAAA, CNAME, MX, TXT, ANY
- Response IP — what the domain resolved to
- Response code — NXDOMAIN, NOERROR, SERVFAIL
- Timestamp
Analyst Use Cases
- DGAs (Domain Generation Algorithms): Random-looking subdomain or domain names (e.g.,
a7x9p2z.malware-domain.info). High query-to-NXDOMAIN ratio indicates DGA-based C2 (T1568.002). - DNS tunneling: High volume of TXT or CNAME queries with subdomains > 30 characters. Especially suspicious when it comes from a single host (
T1572). - Newly observed domains (NODs): Domains registered < 30 days ago that appear in your DNS logs. A leading indicator of phishing sites and C2 infrastructure.
- Beaconing: Regular query intervals (every 60 minutes on the dot to the same domain). Time-between-queries (TBQ) analysis works well on DNS logs.
- Fast flux: Rapidly changing A records for a single domain — the domain resolves to different IPs in rapid succession, indicating fast-flux botnet infrastructure.
Example Indicators
| Indicator | What to Look For |
|---|---|
| High TXT query volume | DNS tunneling for C2 or exfiltration |
| Long subdomain (> 30 chars) | Data encoding in DNS queries |
| High NXDOMAIN rate (> 50%) | DGAs or malware checking for C2 domains that don’t exist yet |
| Consistent query intervals (every 60 min ± 5 min) | C2 beaconing |
| Query to domain registered < 30 days | Suspicious domain — needs investigation |
Proxy/Web Filter Logs
Web proxy logs record all HTTP/HTTPS traffic passing through the organization’s proxy. They provide visibility into web-based attacks, policy violations, and C2 traffic.
What They Capture
- Source IP and username (if authenticated proxy)
- URL (full URL for HTTP, hostname for HTTPS)
- User-Agent string
- HTTP method and status code
- Content type and bytes transferred
- Block/Action (allowed, blocked, warned)
Analyst Use Cases
- C2 traffic: Beacons to known C2 infrastructure. Regular intervals, consistent payload sizes, unusual User-Agents.
- Phishing URL visits: Users clicking links in phishing emails. The proxy log confirms the user visited the site.
- Data exfiltration: Large POST requests to external domains (especially cloud storage/file sharing).
- Policy violations: Tor traffic, anonymizer sites, unauthorized cloud services (shadow IT).
- User-Agent anomalies: Empty User-Agent, non-browser User-Agent, or User-Agent matching an outdated browser version = automation tooling or malware.
EDR Telemetry
Endpoint Detection and Response (EDR) logs combine traditional event logging, Sysmon-like telemetry, behavioral analytics, and network visibility into a single platform.
What They Capture
- Process tree — every process, parent process, child process, command line
- File operations — create, modify, delete, rename with full paths
- Registry operations — key create, modify, delete
- Network connections — per-process outbound connections with full IP/port detail
- Memory access — process handle operations, injection detection
- Script execution — PowerShell script block logging, VBS macro detection
- User behavior — logins, privilege changes, authentication patterns
Analyst Use Cases
- Process ancestry analysis:
winword.exe → cmd.exe → powershell.exe= potential macro-based malware (a “living off the land” chain —T1204.002). - Remote thread creation:
explorer.execreating a remote thread insvchost.exe= process injection. - LSASS access alerts: EDR alerting on any process opening a handle to LSASS.
- Beaconing detection: Network connections at regular intervals with consistent payload sizes over a sustained period.
- Fileless malware detection: PowerShell running encoded commands without a parent that justifies scripting.
Cloud Audit Logs
AWS CloudTrail
Records all API calls made to AWS services.
Key events:
ConsoleLogin— AWS console login (geolocation, MFA status, access key vs. password)CreateAccessKey— New access key creation. Could be attacker establishing persistence (T1098).CreateUser/CreateRole— Unexpected IAM resource creation = persistence.CreateInstance/RunInstances— New compute resource launched (cryptocurrency mining, C2 infrastructure).ModifySecurityGroup/AuthorizeSecurityGroupIngress— Security group change opening ports.PutBucketPolicy/GetBucketAcl— S3 access policy changes.AssumeRole— Cross-account role assumption.KMS*operations — Cryptographic operations. Suspicious if from a user who never uses KMS normally.
Azure Activity Log
Records control-plane operations on Azure resources.
Key events:
Microsoft.Network/networkSecurityGroups/securityRules/write— NSG rule modificationMicrosoft.Compute/virtualMachines/extensions/write— VM extension installation (custom script extension = persistence)Microsoft.Authorization/roleAssignments/write— RBAC role assignment changeMicrosoft.ManagedIdentity/userAssignedIdentities/assign— Managed identity assignment for privilege escalation
GCP Cloud Audit Logs
google.iam.admin.v1.CreateServiceAccountorgoogle.iam.admin.v1.CreateKey— Service account key creation outside of automation pipelines.compute.instances.insert— Unexpected VM creation.storage.buckets.setIamPolicy— Bucket permission changes.
Log Correlation — Putting It All Together
A single log source is rarely enough. The power comes from correlation:
| Scenario | Sources Needed |
|---|---|
| User clicked phishing link | Proxy log (proves visit) + DNS log (domain lookup) + EDR (process creation, file download) + Email gateway (original message) |
| Lateral movement | Windows Security 4624/4648 (logon from source) + Sysmon 3 (network connection) + Sysmon 1 (process creation on destination) |
| C2 beaconing | DNS log (query to C2 domain) + Proxy log (HTTP beacon to same domain) + Sysmon 3 (network connection) + Firewall log (allowed outbound) |
| Ransomware execution | EDR (process tree: script → downloader → encryptor) + File operations (mass file modifications + extension changes) + Scheduled task creation (persistence) + DNS (phishing domain visited) |
| Data exfiltration | DNS log (large TXT queries) + Proxy log (large POST requests) + Sysmon 3 (outbound connections) + Firewall log (allowed outbound to unusual port) |
Related
- Active Directory Basics — covers the active directory basics concepts
- Common Ports and Protocols — covers the common ports and protocols concepts
- Cloud Threats — Credential Theft, IMDS Abuse, Hijacking, Privilege Escalation — detection and response for T1525, T1552, T1613 techniques
- Container and Kubernetes Threats — detection and response for T1611, T1525, T1574.002 techniques
- Golden Ticket Attack — detection and response for T1558.001 techniques
