Security Log Analysis

SkillMonitoring & ops

Guides structured security log analysis across authentication, network, endpoint, and cloud audit log sources. Auto-invoked when the user shares log data, asks about suspicious events, needs help interpreting Windows Event IDs or Linux auth logs, or is establishing baselines for anomaly detection. Produces log source taxonomy, anomaly identification, baseline recommendations, and correlation findings mapped to MITRE ATT&CK v16 techniques.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Security Log Analysis skill

What this skill tells your AI

The instructions your AI receives, as published by unitoneai/securityskills in skills/secops/log-analysis/SKILL.md and read by ahel’s review.

Frameworks: MITRE ATT&CK v16, NIST SP 800-92 (Guide to Computer Security Log Management) Role: SOC Analyst, Security Engineer Time: 20-40 min per analysis Output: Log analysis findings, anomaly identification, baseline recommendations, ATT&CK-mapped observations


1. When to Use

If a target is provided via arguments, focus the review on: $ARGUMENTS

Invoke this skill when any of the following conditions are met:

  • Log review -- The analyst needs to examine logs from a specific system, time window, or user to identify suspicious activity.
  • Anomaly investigation -- An unusual pattern has been observed (unexpected logon, unfamiliar process, abnormal network traffic) and requires log-based investigation.
  • Baseline establishment -- The team needs to define what "normal" looks like for a log source to enable future anomaly detection.
  • Event ID interpretation -- The analyst needs to understand what a specific Windows Event ID, Sysmon Event ID, or Linux log entry means in a security context.
  • Log correlation -- Multiple log sources need to be analyzed together to reconstruct a sequence of events or trace an attacker's actions.
  • Post-incident log review -- After an alert or incident, logs need to be systematically reviewed to determine scope, timeline, and impact.
  • Log architecture assessment -- The team is evaluating whether the right log sources are being collected for security monitoring.

Do not use when: The task is writing SIEM detection rules (use siem-rules), triaging a fired alert (use alert-triage), or authoring Sigma rules (use detection-engineering).


2. Context the Agent Needs

Before beginning analysis, gather or confirm:

  • Analysis objective: What question are you trying to answer? (e.g., "Was this account compromised?", "What happened on this server between 2:00 and 3:00 AM?", "Is this outbound traffic malicious?")
  • Time window: The specific time range to analyze.
  • Scope: Which hosts, users, IP addresses, or network segments are in scope?
  • Available log sources: Which logs are available? (Windows Event Logs, Sysmon, EDR, firewall, proxy, DNS, cloud audit, application logs.)
  • Known-good context: What is expected/normal for this environment? (Authorized admin accounts, expected service accounts, normal working hours, approved applications.)
  • Related alerts or incidents: Are there existing alerts, tickets, or incident reports associated with this investigation?
  • SIEM access: Which SIEM platform contains the logs? (Determines query language and table names.)

3. Process

Step 1: Log Source Taxonomy

Understand what each log source provides and which ATT&CK data sources it maps to.

Authentication Logs
Log SourcePlatformKey EventsATT&CK Data Source
Windows Security Event LogWindowsLogon (4624), Failed logon (4625), Explicit credential use (4648), Special privilege logon (4672)Logon Session (DS0028)
Azure AD Sign-in LogsCloud (Azure)Interactive and non-interactive sign-ins, Conditional Access results, MFA statusLogon Session (DS0028)
Linux auth logsLinux/var/log/auth.log (Debian/Ubuntu), /var/log/secure (RHEL/CentOS) -- SSH logons, su/sudo usage, PAM eventsLogon Session (DS0028)
AWS CloudTrailCloud (AWS)ConsoleLogin, AssumeRole, GetSessionToken, SwitchRoleLogon Session (DS0028)
Network Flow and Connection Logs
Log SourcePlatformKey EventsATT&CK Data Source
Firewall logsNetworkAllow/deny decisions, source/dest IP and port, protocol, bytes transferredNetwork Traffic (DS0029)
NetFlow/IPFIXNetworkFlow records with src/dst IP, ports, protocol, byte/packet counts, durationNetwork Traffic (DS0029)
Sysmon Event ID 3WindowsOutbound network connections with process context (which process initiated the connection)Network Traffic (DS0029)
VPC Flow LogsCloud (AWS/Azure/GCP)Accept/reject decisions for VPC network interfacesNetwork Traffic (DS0029)
DNS Logs
Log SourcePlatformKey EventsATT&CK Data Source
DNS server query logsNetworkAll DNS resolution requests and responsesNetwork Traffic: DNS (DS0029)
Sysmon Event ID 22WindowsDNS queries made by processes on the endpointNetwork Traffic: DNS (DS0029)
DNS firewall/RPZ logsNetworkBlocked DNS queries matching threat intelligenceNetwork Traffic: DNS (DS0029)
Passive DNSNetworkHistorical DNS resolution dataNetwork Traffic: DNS (DS0029)
Proxy and Web Logs
Log SourcePlatformKey EventsATT&CK Data Source
Web proxy logsNetworkHTTP/HTTPS requests with URL, user agent, response code, bytesNetwork Traffic: HTTP (DS0029)
Cloud proxy (Zscaler, Netskope)CloudWeb traffic with DLP findings, threat categories, user identityNetwork Traffic: HTTP (DS0029)
Web server access logsApplicationInbound HTTP requests with method, URI, status code, source IPApplication Log (DS0015)
Endpoint Logs
Log SourcePlatformKey EventsATT&CK Data Source
Sysmon (Windows)WindowsProcess creation (1), network connection (3), file creation (11), registry (12/13/14), DNS query (22)Process (DS0009), File (DS0022), Windows Registry (DS0024)
Windows Security 4688WindowsProcess creation with command line (requires audit policy)Process (DS0009)
EDR telemetryEndpointProcess tree, file modifications, network connections, loaded modulesProcess (DS0009), File (DS0022), Module (DS0011)
Linux auditdLinuxSyscall logging, file access, process execution, user commandsProcess (DS0009), File (DS0022)
Cloud Audit Logs
Log SourcePlatformKey EventsATT&CK Data Source
AWS CloudTrailAWSAPI calls -- CreateUser, AttachUserPolicy, RunInstances, PutBucketPolicyCloud Service (DS0025)
Azure Activity LogAzureResource operations -- create, delete, modify at the control planeCloud Service (DS0025)
GCP Cloud Audit LogsGCPAdmin activity, data access, system eventsCloud Service (DS0025)
Microsoft 365 Unified Audit LogSaaSExchange, SharePoint, Teams, Azure AD activityApplication Log (DS0015)

Step 2: Critical Windows Event IDs

These Event IDs are the most security-relevant events in the Windows Security Event Log. Analysts should know these by memory.

Authentication Events
Event IDDescriptionSecurity RelevanceATT&CK Mapping
4624Successful logonTracks who logged into what system and how (logon type). Baseline for normal logon patterns.T1078 -- Valid Accounts
4625Failed logonIndicates brute force attempts, password spraying, or credential guessing. High volume from a single source is suspicious.T1110 -- Brute Force
4648Logon using explicit credentials (runas)Indicates a user explicitly provided different credentials. Used in lateral movement and privilege escalation.T1078 -- Valid Accounts
4672Special privileges assigned to new logonIndicates a privileged logon (administrator, backup operator). Every 4672 event represents a session with elevated rights.T1078 -- Valid Accounts

Windows logon types (Event ID 4624 LogonType field):

LogonTypeNameDescriptionSecurity Context
2InteractivePhysical console logon or KVMNormal for workstations; unusual for servers
3NetworkAccess to shared resource (SMB, mapped drive)Expected for file servers; lateral movement indicator on workstations
4BatchScheduled task executionExpected for automation; unexpected batch logons warrant investigation
5ServiceService start under a service accountExpected for known services; new service logons are suspicious
7UnlockWorkstation unlockNormal for workstations
8NetworkCleartextLogon with plaintext credentials over networkSecurity concern -- credentials exposed; legacy protocol indicator
9NewCredentialsCaller cloned token with new credentials (runas /netonly)Lateral movement technique; always investigate
10RemoteInteractiveRDP logonExpected for designated jump servers; suspicious on workstations or non-RDP servers
11CachedInteractiveLogon with cached domain credentialsNormal when DC is unreachable; suspicious if DC is available
Process and Service Events
Event IDDescriptionSecurity RelevanceATT&CK Mapping
4688New process createdTracks every process execution including command line (if enabled). Foundation for endpoint detection.T1059 -- Command and Scripting Interpreter
4698Scheduled task createdAdversaries create scheduled tasks for persistence and execution. New tasks on servers should be investigated.T1053.005 -- Scheduled Task
7045Service installed (System log)New service installation is a common persistence and privilege escalation mechanism. New services on production servers are high-priority.T1543.003 -- Windows Service
Account Management Events
Event IDDescriptionSecurity RelevanceATT&CK Mapping
4720User account createdNew account creation outside of HR provisioning workflow is suspicious. Adversaries create accounts for persistence.T1136.001 -- Local Account
4728Member added to security-enabled global groupPrivilege escalation via group membership change. Monitor additions to Domain Admins, Enterprise Admins.T1098 -- Account Manipulation
4732Member added to security-enabled local groupMonitor additions to local Administrators group.T1098 -- Account Manipulation
4756Member added to security-enabled universal groupMonitor additions to high-privilege universal groups.T1098 -- Account Manipulation
Defense Evasion Events
Event IDDescriptionSecurity RelevanceATT&CK Mapping
1102Audit log clearedAdversaries clear event logs to remove evidence. Log clearing on a production system is almost always malicious.T1070.001 -- Clear Windows Event Logs
4657Registry value modifiedRegistry modifications can indicate persistence (Run keys), defense evasion, or configuration changes.T1112 -- Modify Registry

Step 3: Critical Sysmon Event IDs

Sysmon (System Monitor) provides enhanced endpoint telemetry beyond native Windows logging.

Sysmon EIDDescriptionSecurity Use
1Process creationFull command line, parent process, hashes -- primary detection source
3Network connectionOutbound connections with process context -- C2 detection
7Image loadedDLL loading -- detect DLL side-loading, injection
8CreateRemoteThreadThread injection into another process -- code injection detection
10ProcessAccessProcess accessing another process -- credential dumping (LSASS access)
11FileCreateFile creation with full path -- malware dropping, staging
12/13/14Registry eventsRegistry create, set value, rename -- persistence detection
15FileCreateStreamHashAlternate data stream creation -- hiding data
22DNSEventDNS queries with process context -- C2 domain resolution
23FileDeleteFile deletion with archiving -- anti-forensics detection
25ProcessTamperingProcess image change -- process hollowing/herpaderping

Step 4: Linux Authentication Log Patterns

/var/log/auth.log and /var/log/secure Patterns

Successful SSH login:

Jan 15 14:23:01 webserver01 sshd[12345]: Accepted publickey for admin from 10.1.2.3 port 54321 ssh2: RSA SHA256:AbCdEf...
Jan 15 14:23:01 webserver01 sshd[12345]: pam_unix(sshd:session): session opened for user admin(uid=1000) by (uid=0)

Failed SSH login:

Jan 15 14:23:05 webserver01 sshd[12346]: Failed password for invalid user test from 203.0.113.50 port 22222 ssh2
Jan 15 14:23:05 webserver01 sshd[12346]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=203.0.113.50 user=test

Sudo usage (successful):

Jan 15 14:25:00 webserver01 sudo: admin : TTY=pts/0 ; PWD=/home/admin ; USER=root ; COMMAND=/usr/bin/cat /etc/shadow

Sudo usage (failed):

Jan 15 14:25:10 webserver01 sudo: developer : user NOT in sudoers ; TTY=pts/1 ; PWD=/home/developer ; USER=root ; COMMAND=/usr/bin/passwd root

Account creation:

Jan 15 14:30:00 webserver01 useradd[12400]: new user: name=backdoor, UID=1001, GID=1001, home=/home/backdoor, shell=/bin/bash

Key Linux log analysis patterns:

PatternIndicatesATT&CK Mapping
Multiple Failed password from same source IPBrute force attackT1110 -- Brute Force
Failed password for invalid userUsername enumeration or sprayT1110.003 -- Password Spraying
Accepted password from unusual IP or at unusual timePotential compromised credentialsT1078 -- Valid Accounts
sudo command to sensitive files (/etc/shadow, /etc/passwd)Credential access or reconnaissanceT1003.008 -- /etc/passwd and /etc/shadow
useradd or usermod outside change managementPersistence via new accountT1136.001 -- Local Account
su to root from non-admin userPrivilege escalation attemptT1548 -- Abuse Elevation Control Mechanism
session opened for user root by (uid=XXX) where XXX is non-zeroPrivilege escalation successT1548 -- Abuse Elevation Control Mechanism
sshd.*Did not receive identification stringPort scanning or reconnaissanceT1046 -- Network Service Discovery

Step 5: Anomaly Detection Patterns

Identify deviations from established baselines that may indicate malicious activity.

Anomaly categories:

CategoryBaseline MetricAnomaly IndicatorExample
TemporalNormal working hours for user/systemActivity outside established hoursDomain admin logon at 3:00 AM on a holiday
VolumetricAverage daily event count per sourceSignificant deviation from mean (> 2 std dev)500 failed logons from a host that averages 5
GeographicNormal logon locationsLogon from new country or impossible travelUS-based user authenticates from Eastern Europe
BehavioralNormal processes, commands, and network destinationsFirst-time process execution, new outbound destinationPowerShell on a server that has never run PowerShell
RelationalNormal user-to-resource access patternsAccess to resources outside normal scopeFinance user accessing engineering source code repository
ProtocolExpected protocols on network segmentsUnexpected protocol usageDNS over HTTPS (DoH) from a workstation, or SMB on an internet-facing interface

Step 6: Baseline Establishment

NIST SP 800-92 alignment: NIST SP 800-92, Section 4.2, recommends establishing baselines for log data to enable anomaly detection. Baselines should be built from a minimum of 30 days of clean (non-compromised) data.

Baseline construction process:

  1. Select the log source and the specific metric to baseline (e.g., daily count of Event ID 4625 per source IP).
  2. Collect 30-90 days of historical data during a known-clean period.
  3. Calculate statistics: mean, median, standard deviation, 95th percentile, 99th percentile.
  4. Identify recurring patterns: daily cycles (business hours vs. off-hours), weekly cycles (weekday vs. weekend), monthly cycles (month-end processing).
  5. Set thresholds: Define anomaly thresholds at mean + 2 standard deviations for moderate alerts and mean + 3 standard deviations for high-priority alerts.
  6. Document exclusions: Record known legitimate outliers (patch Tuesday, quarterly audits, penetration tests) that should not trigger anomaly alerts.
  7. Review and update baselines quarterly or after significant environment changes.

Baseline metrics to establish:

MetricLog SourceGranularityPurpose
Failed logon count by source IPAuthentication logsPer hourBrute force detection
Distinct hosts accessed per userAuthentication logsPer dayLateral movement detection
Process creation count by hostEndpoint logsPer dayMalware/tool execution detection
Outbound bytes by hostNetwork flowPer hourData exfiltration detection
DNS query count by hostDNS logsPer hourC2 beaconing detection
New user accounts createdAccount management logsPer dayPersistence detection
Privileged logon countAuthentication logs (4672)Per dayPrivilege abuse detection

Step 7: Log Correlation Techniques

Combine data from multiple log sources to reconstruct attack sequences and increase detection confidence.

Correlation strategies:

StrategyDescriptionExample
Temporal joinEvents from different sources occurring within a defined time windowFailed logons (4625) followed by successful logon (4624) from same source within 15 minutes
Entity pivotStart from one entity and trace its activity across all log sourcesFrom a suspicious IP, find all authentication, DNS, proxy, and firewall entries
Kill chain reconstructionMap events to ATT&CK tactics in chronological orderPhishing email -> malicious attachment execution -> C2 callback -> discovery commands -> lateral movement
IOC sweepSearch for known indicators across all log sourcesSearch all logs for a specific IP, domain, hash, or user agent string
Statistical correlationIdentify events that co-occur more frequently than expectedHosts that generate both DNS queries to DGA domains and outbound connections on unusual ports

Cross-source correlation example -- Compromised Account Investigation:

Step 1: Start with the suspicious event
  -> Authentication log: Successful logon (4624) from unusual IP at 2:15 AM

Step 2: Pivot on user identity
  -> Authentication log: Check all logon events for this user in the past 7 days
  -> Azure AD: Check sign-in logs for MFA status, Conditional Access results
  -> Previous alerts: Any prior alerts for this user?

Step 3: Pivot on source IP
  -> Threat intelligence: Is this IP in any TI feeds?
  -> Firewall log: What other internal hosts did this IP connect to?
  -> DNS log: What domains were resolved from this IP?
  -> Proxy log: What URLs were accessed from this IP?

Step 4: Pivot on host
  -> Endpoint log (Sysmon/EDR): What processes were created on the host after logon?
  -> Network log: What outbound connections were made from the host after logon?
  -> File log: What files were created, modified, or accessed after logon?

Step 5: Build timeline
  -> Combine all findings into a chronological sequence
  -> Map each event to an ATT&CK technique
  -> Identify gaps in visibility (log sources not available)

4. Findings Classification

SeverityLabelDefinitionSLA
P1CriticalLog analysis confirms active compromise: credential theft, data exfiltration, or destructive activity observed in logs.Escalate to IR team immediately.
P2HighLog analysis reveals high-confidence anomalies consistent with an intrusion: unusual privileged logons, new persistence mechanisms, or C2 communication patterns.Escalate within 1 hour.
P3MediumLog analysis identifies suspicious patterns requiring further investigation: behavioral anomalies, first-seen activity, or partial kill chain indicators.Investigate within 4 hours.
P4LowLog analysis reveals informational findings: minor policy deviations, logging gaps, or baseline drift without immediate threat indication.Document and review within 24 hours.

5. Output Format

Produce log analysis findings in this structure:

## Security Log Analysis Report
**Date:** [YYYY-MM-DD]
**Skill:** log-analysis v1.0.0
**Frameworks:** MITRE ATT&CK v16, NIST SP 800-92
**Analyst:** [Name or AI-assisted]

### Analysis Objective
[1-2 sentences describing what question this analysis is answering]

### Scope
| Field | Value |
|-------|-------|
| Time Window | [Start -- End, UTC] |
| Systems | [Hostnames, IPs, or network segments] |
| Users | [Usernames or "all users"] |
| Log Sources | [List of log sources analyzed] |

### Findings Summary
| # | Finding | Severity | ATT&CK Technique | Log Source | Evidence |
|---|---------|----------|-------------------|------------|----------|
| 1 | [Description] | [P1-P4] | [T1078 or N/A] | [Source] | [Key event reference] |
| 2 | [Description] | [P1-P4] | [T1078 or N/A] | [Source] | [Key event reference] |

### Detailed Findings
#### Finding 1: [Title]
**Severity:** [P1-P4]
**ATT&CK Mapping:** [Technique ID -- Name]
**Log Source:** [Source]
**Evidence:**
[Relevant log entries, timestamps, and entity details]

**Analysis:**
[Interpretation of the evidence -- why is this significant or benign?]

### Timeline
| Timestamp (UTC) | Source | Event | ATT&CK Technique | Assessment |
|-----------------|--------|-------|-------------------|------------|
| [HH:MM:SS] | [Source] | [Description] | [T-ID] | [Suspicious / Benign / Confirmed malicious] |

### Baseline Observations
[Any baseline deviations noted, with comparison to established norms]

### Visibility Gaps
[Log sources that were not available but would have provided relevant data]

### Recommendations
- [ ] [Action 1]
- [ ] [Action 2]

6. Framework Reference

MITRE ATT&CK v16

For log analysis, ATT&CK provides the mapping between adversary techniques and the data sources that reveal them. The ATT&CK "Data Sources" knowledge base (https://attack.mitre.org/datasources/) defines 40+ data sources with specific data components, enabling analysts to understand exactly which logs provide visibility into which techniques.

Key ATT&CK Data Sources for log analysis:

Data SourceIDKey Components
Logon SessionDS0028Logon Session Creation, Logon Session Metadata
ProcessDS0009Process Creation, Process Access, Process Termination
FileDS0022File Creation, File Modification, File Deletion
Network TrafficDS0029Network Connection Creation, Network Traffic Flow, Network Traffic Content
Windows RegistryDS0024Registry Key Creation, Registry Key Modification
CommandDS0017Command Execution
User AccountDS0002User Account Creation, User Account Modification
Cloud ServiceDS0025Cloud Service Modification
Scheduled JobDS0003Scheduled Job Creation
ServiceDS0019Service Creation, Service Modification

NIST SP 800-92 -- Guide to Computer Security Log Management

Shortened here. Read the whole file on GitHub.

Signals

GitHub stars
63
Forks
130
Last commit
Jun 2026
Advanced
Catalog kind
skill
Gateway key
log-analysis-unitoneai
Source
github.com/unitoneai/securityskills