Lesson 1 of 3 Logging and Monitoring

Log Management and SIEM

Logs are the raw material of detection and investigation. This lesson covers log management and security information and event management (SIEM) and orchestration (SOAR).

Learning outcomes

After completing this lesson, you will be able to:

  • Describe log management requirements, including time synchronisation and protection.
  • Explain the roles of SIEM and SOAR.

Log management

A logging policy defines which events are recorded, such as authentication successes and failures, privilege use, account and configuration changes, access to sensitive data, security tool alerts and errors; how long logs are kept; and who reviews them. Every system uses synchronised time (NTP), because events cannot be correlated across systems without consistent timestamps.

Logs are forwarded to a central, write-protected collector so that an attacker who compromises a system cannot erase the evidence. Integrity is protected with hashing or write-once storage, and confidentiality with access control, because logs often contain personal data. Retention balances investigation needs, legal requirements and cost, and log storage capacity is monitored so that logs are not lost when disks fill.

A useful log entry answers who, what, when, where and with what result: the authenticated identity, the action, a timestamp with time zone, the source and target systems, and whether the action succeeded. A log line that says only "record updated" cannot support an investigation, while one that records "user jsmith changed the bank account of supplier 4471 from the finance application at 14:32:07 UTC from address 10.2.3.4; success" can. Logs must not, however, record secrets such as passwords or full card numbers, because the log store would then need the same protection as the systems holding them.

Retention is often tiered. Recent logs are kept in fast, searchable storage for a few months, because most investigations concern recent events, and older logs move to cheaper archive storage for the rest of the retention period. Attackers often remain undetected for weeks or months, so a retention period shorter than that leaves investigators without evidence of how the intrusion began.

Select all that apply

A useful log entry

Exam skills 7.2.5

Identify what a useful security log entry should contain.

Log in to try this activity Interactive activities are free with an account.

SIEM and SOAR

A SIEM collects logs from many sources, normalises their formats, correlates events across sources and raises alerts, such as many failed logins followed by a success from a new country, then a large download. It provides dashboards, investigation tools and long-term storage for compliance. Its value depends on complete log sources, accurate time, well-tuned correlation rules and analysts to act on alerts.

Security orchestration, automation and response (SOAR) tools run playbooks that automate repetitive response steps, such as enriching an alert with threat intelligence, disabling an account or isolating a host, which speeds response and reduces analyst workload.

Normalisation and correlation are what distinguish a SIEM from a simple log store. Different systems describe the same event differently: one firewall records "src" and another "source_ip". The SIEM maps both to a common field, so a single rule can search them together. A correlation rule then combines events that are unremarkable on their own.

The following diagram shows a correlated SIEM alert and the SOAR playbook that responds.

SIEM correlation and SOAR response, illustrated with an account takeover. Repeated failed logins from an unusual address, then a success, then a new rule forwarding all mail externally are each common alone, but together they are a strong signal. A playbook enriches the alert with threat intelligence and HR data and revokes the user's sessions.
The account takeover pattern is an example.
Sort into groups

SIEM or SOAR?

Exam skills 7.2.2

Decide whether each capability belongs to a SIEM or a SOAR tool.

Log in to try this activity Interactive activities are free with an account.
Worked example

Detecting and responding to account takeover

The SIEM receives ten failed logins for one account from an overseas address, then a successful login, and within an hour a new mailbox rule forwarding all mail externally. How do correlation and SOAR handle it?

Ten failed logins are common; ten failed logins for one account from an overseas address, followed by a success and, within an hour, a mailbox rule forwarding all mail externally, is a strong indication of account takeover.

A SOAR playbook for that alert might automatically look up the source address in threat intelligence, check whether the user is travelling according to HR records, revoke the user's sessions, remove the forwarding rule and open a case for an analyst with all of this information attached. Automation handles the predictable steps in seconds; the analyst decides on the parts that need judgement. High-impact actions, such as isolating a production server, often require analyst approval within the playbook, because an automated mistake can cause an outage.

Worked example

Missing correlation

After a breach, investigators find that firewall logs showed connections to a malicious server and endpoint logs showed a suspicious process, but the two were never connected because the firewall clock was 47 minutes slow. What should be fixed?

Time synchronisation: all devices must use reliable NTP sources so that the SIEM can correlate events. The investigation should also confirm that both log sources feed the SIEM and that correlation rules link network connections to endpoint process activity.

Check yourself

Why should logs be sent to a separate central collector?

Show answer

So that an attacker who compromises a system cannot erase or alter the evidence.

Exam Tips

Remember for the exam

  • Synchronise clocks; correlation depends on time.
  • Centralise logs off the systems that generate them.
  • SOAR automates response through playbooks.