An effective Security Operations Center (SOC) does more than collect logs: it turns them into reliable alerts that drive quick decisions. This article describes a minimal pipeline architecture, enrichment and correlation techniques, and—importantly—three end‑to‑end detection cases with example logs, pseudocode rules, suggested thresholds and verifiable actions.

Why turn logs into actionable alerts

  • Reduce noise: focus attention on events that matter and enable action.
  • Speed response: each alert should carry enough context (host, user, evidence) for immediate decisions.
  • Repeatability: rules and playbooks must produce consistent operational outcomes for the same inputs.

Pipeline architecture: from raw event to alert

  1. Collection and normalization
  • Preserve context: capture key fields (timestamp, source_ip, dest_ip, user, process, file_hash, action, bytes_transferred). Use synchronized timestamps.
  • Normalize names/types (e.g., user.name, host.id, src.ip) to make rules portable.
  1. Enrichment
  • GeoIP for external addresses.
  • Reputation scores for IPs and URLs.
  • Asset tagging: environment, criticality, host role.
  1. Correlation and scoring
  • Correlate multi‑step events (e.g., auth failures + success + privileged action).
  • Apply a composite score for potential incidents: score = sum(weight_i * indicator_i). Define triage thresholds (informational, investigate, immediate response).
  1. Deduplication and rate limiting
  • Group similar events within time windows to avoid alert floods.
  • Example: dedupe within 5 minutes for the same user+host+rule_id.
  1. Alert arrival to the playbook
  • Each alert should include: cause, evidence (raw logs), priority, asset attributes, link to the runbook.

Rules, patterns and tuning: design principles

  • Prefer correlations on multiple attributes rather than single noisy triggers.
  • Start with conservative thresholds and adapt using historical environment data.
  • Monitor alert-quality metrics: precision, time-to-validate, time-to-respond.

Three detection cases (end‑to‑end)

Case A — Account compromise: anomalous authentication followed by privileged action

Scenario and objective

  • Detect when a legitimate account is used by an unauthorized actor from a new context (IP, device, time) and performs a high‑impact action.

Example relevant events

  • 10:01:00 — auth.failure user=alice host=host01 src=10.1.2.3
  • 10:02:30 — auth.success user=alice host=host01 src=93.184.216.34 (new geo)
  • 10:04:00 — svc.create user=alice host=host01 process=net.exe
  • 10:05:10 — file.delete user=alice host=host01 path=/sensitive/dbdump

Correlation rule (pseudocode)

  • WHEN: auth.success AND previous auth.failures(user) >= 5 within 15m AND src.geo != user.home_geo AND subsequent privileged action by user within 10m THEN: create alert (type="possible account compromise")

Thresholds and tuning tips

  • In environments with many legitimate failures (e.g., test AD) raise failure threshold to 10 or extend the window.
  • If geo is often missing, use deviceID or fingerprint change instead.

Minimum playbook

    1. Isolate session/host (scoped containment).
    1. Revoke sessions and rotate credentials.
    1. Preserve raw logs and disk snapshots as evidence.
    1. Investigate: build event timeline, collect involved files.

Case B — Data exfiltration via large transfers

Scenario and objective

  • Detect anomalous data transfers to external destinations or many reads of sensitive files.

Example relevant events

  • application.file.read user=bob host=host05 file=/data/confidential/report.pdf
  • network.conn dest=203.0.113.50 dst_port=443 bytes_out=120000000
  • process curl.exe spawn user=bob

Correlation rule (pseudocode)

  • WHEN: sum(bytes_out per host to external_ip) > 100MB within 30m OR count(file.read where file.sensitivity==high and user not in data_team) >= 25 within 10m AND: dest_ip.reputation_score < threshold OR dest_ip not in allowlist THEN: alert(type="possible data exfiltration")

Thresholds and tuning tips

  • Calibrate bytes_out on normal usage (base value on the 95th percentile of daily bytes_out).
  • Use hold-out windows and whitelists for backups, legitimate syncs and monitoring agents.

Minimum playbook

    1. Block connections to the IP/destination at the firewall pending investigation.
    1. Preserve network captures (pcap) and process logs.
    1. Validate transfers are not scheduled jobs (cron, backup).

Case C — Lateral movement: remote service use and service creation

Scenario and objective

  • Detect lateral movement behaviors: remote administration tools, service creation or scheduled tasks from non‑admin hosts.

Example relevant events

  • 09:12:05 — winrm.connect src=host10 dest=host11 user=svc_backup
  • 09:12:20 — process.create user=svc_backup process=powershell.exe args="-EncodedCommand ..."
  • 09:13:00 — service.create name=updater path=C:\Windows\Temp\updater.exe user=svc_backup

Correlation rule (pseudocode)

  • WHEN: process.create where process in {powershell, wmiexec, psexec} initiated remotely AND service.create OR scheduled_task.create within 5m on same dest host AND: initiating host not in admins subnet THEN: alert(type="possible lateral movement")

Thresholds and tuning tips

  • Whitelist legitimate remote management tools and authorized backup accounts.
  • Narrow the time window if the network is slow to avoid overly broad correlations.

Minimum playbook

    1. Isolate affected hosts from the network.
    1. Take snapshots of logs, process lists and services.
    1. Identify and remove persistence mechanisms if confirmed.

Verification, testing and metrics to maintain alert quality

  • Run scenario tests (tabletop plus ingestion of synthetic logs) for every rule.
  • Metrics to track: false positive rate, estimated false negative rate, MTTR from alert to containment.
  • Periodic review: every 30–90 days review thresholds with business owners.

Repeatable test example

  1. Prepare a test dataset: legitimate logs + simulated malicious logs.
  2. Send logs to SOC ingestion.
  3. Verify each of the three rules fires expected alerts and that alerts include required fields.
  4. Log false positives and update whitelists/thresholds.

Conclusion

A good SOC measures and adapts: clear rules, repeatable pipelines, practical playbooks and a tuning culture. The three presented detection families cover common scenarios but must be adapted to your environment: assets, legitimate traffic and management tools. Alert quality comes from data, testing and continuous review.

Sources