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
Log sources
- Identity and sign-in
- Devices
- Cloud control plane
- Applications and network
- send events securely
Collection and storage
- Accurate time on every source
- Protected, long-term storage
- analysed by
SIEM and detection
- Detection rules
- Threat intelligence
- Alerts
- alerts go to
Response team
- Triage
- Incident response
- Lessons learned
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
- CAF C1 Security monitoring (opens in a new tab)
- CAF D1 Response and recovery planning (opens in a new tab)
- CAF B3 Data security (opens in a new tab)
NCSC guidance
- NCSC 10 Steps: logging and monitoring (opens in a new tab)
- NCSC introduction to logging for security purposes (opens in a new tab)
- NCSC building a security operations centre (opens in a new tab)
- NCSC 10 Steps: incident management (opens in a new tab)
Related templates and tools
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.