What to log, where to keep it, and how long

Unit 1 of 5 in Logging and detection.

You will be able to explain what log management has to do and why central, protected logs matter.

Lesson

Log management is a pipeline

NIST defines a log as a record of the events occurring within an organization's systems and networks. Collecting many logs from many places and keeping them usable takes planning, which NIST calls log management. Its guide describes a log management infrastructure with an architecture and a set of functions, and says security logs come from many sources including security software, firewalls, intrusion detection and prevention systems and operating systems.

In plain terms: logs are made on many machines, gathered to a central place, stored, searched, and eventually removed on purpose. Each stage can fail, and an alert is only as good as the weakest stage.

Decide what matters before you collect

More logging is not always better. NIST's guide includes understanding the logs you have and prioritising log entries, because analysts cannot read everything. It also reminds readers that log entries can be unclear: a message may be meaningful to the software vendor but cryptic to the administrator reviewing it, and security software often generates false positives when looking for malicious activity, so context is needed to judge unreliable entries.

Start from the stages you worry about and collect the evidence they leave. Then add sources only when a question needs them.

Keep it, protect it, and keep the clocks honest

NIST notes that laws and regulations call for logs to be generated, reviewed, protected and retained, and gives the controls that cover audit records and the actions to take when auditing fails. Retention should follow what you may need to investigate and what the rules require.

Events from different machines only line up when their clocks agree. The Network Time Protocol is widely used to synchronize clocks, and NIST advises time synchronization technologies such as NTP wherever possible so log sources are consistent with each other.

A short checklist

Before you write any rule, check five things: which sources are collected, whether they are sent off the machine that made them, how long they are kept, whether clocks are synchronized, and who is told if a source stops sending. A silent log source is the commonest blind spot, and it looks exactly like a quiet network.

Key points

Sources

Lecture

Logging and detection pipelines: A talk on the path from a log line on a server to an alert in front of an analyst.

Practice in the labs

Build a small log pipeline and keep it from running out of space.

Knowledge check

  1. Why prioritise log entries instead of collecting and reading everything? Answer: Analysts cannot read everything, and some entries are unclear or false alarms. NIST's guide covers prioritising entries and warns that unclear messages and false positives need context to judge.
  2. Why synchronize clocks across log sources? Answer: So events from different machines can be put in order. NIST advises NTP or similar so log sources' clocks stay consistent with each other; otherwise timelines cannot be lined up.
  3. A log source stops sending. Why is that dangerous? Answer: It looks the same as a quiet network, so a blind spot appears unnoticed. Missing evidence produces no alerts, so a silent source is a blind spot unless you alert on silence itself.

Back to the syllabus or see all classes.

Related