Patterns library

Logging to a SIEM

Collect the right security logs in one protected place, and make sure someone acts on the alerts.

When to use it

  • You need to detect attacks on a service, not just prevent them.
  • Logs are spread across systems and nobody looks at them.
  • You need evidence for investigations, audits or incident response.

How it fits together

  1. Log sources

    • Identity and sign-in
    • Devices
    • Cloud control plane
    • Applications and network
  2. Collection and storage

    • Accurate time on every source
    • Protected, long-term storage
  3. SIEM and detection

    • Detection rules
    • Threat intelligence
    • Alerts
  4. Response team

    • Triage
    • Incident response
    • Lessons learned
What the diagram shows: Log sources such as identity, devices, cloud services, applications and networks send events securely to collection and protected storage. A SIEM (security information and event management system) analyses them and raises alerts, which go to a response team who triage them, respond and feed lessons back into detection.

The parts

Log sources
The systems that record security events: identity, devices, cloud services, applications and networks.
Collection
Agents or connectors that send logs securely and reliably.
Protected storage
Storage that administrators of the monitored systems cannot change or delete.
SIEM
The security information and event management system that searches, correlates and raises alerts.
Response team
The people who triage alerts and handle incidents, in-house or through a provider.

Main risks

  • Important sources, such as sign-in or cloud administration logs, not collected.
  • Attackers changing or deleting logs to hide their tracks.
  • So many alerts that real ones are missed.
  • Nobody responsible for watching or responding.
  • Logs collecting more personal data than needed.

Usual controls

  • Start from the attacks you want to detect, then choose sources.
  • Collect identity, administrator and cloud control plane logs first.
  • Keep accurate time on every source.
  • Protect stored logs with separate access and, where possible, immutable storage.
  • Write a triage guide for each alert and tune noisy rules.
  • Check regularly that every source is still sending, and test detections.

What it maps to

NCSC Cyber Assessment Framework principles

NCSC guidance

Templates

GOV Assured tools

Common mistakes

  • Collecting everything and using none of it.
  • Alerts with no named owner.
  • Letting the administrators being monitored also manage the logs.
  • Not noticing when a source stops sending.
  • Forgetting cloud administration and sign-in logs.

All patterns