Find a course

Module 5: Defending and RespondingLesson 11 of 1213 min

Logging, Detection and Incident Response

Learn what logs reveal, how a security operations team triages alerts, and the incident response lifecycle from preparation to lessons learned.

Step 1 of 11Learn

You can't respond to what you can't see

At 3:12 a.m., a user account in the accounting department signs in from another country. At 3:15 it downloads 4,000 files from the file server. At 3:40 it creates a new admin account. Each event on its own might be explainable. Together, they tell a clear story, but only if someone is collecting and looking at the logs.

Logs are records of events: sign-ins, failed passwords, file access, processes started, firewall decisions, configuration changes, DNS lookups. Good logging answers the basic investigative questions: who did what, when, from where, and was it allowed?

Organizations centralize logs in a SIEM (security information and event management) system. It stores them in one place, keeps accurate timestamps, and runs detection rules that correlate events across systems, such as "impossible travel": the same account signing in from two continents an hour apart.

A security operations center (SOC) is the team that watches these alerts. Analysts triage each alert: is it a true positive (real malicious activity), a false positive (harmless activity that looked suspicious), or something that needs more investigation? Too many false positives cause alert fatigue, where real attacks are missed in the noise, so tuning detection rules is a constant job.

Two practical rules: protect the logs themselves, because attackers try to delete them to cover their tracks, and keep them long enough. Intrusions are often discovered weeks after they began.

Step 2 of 11Timeline

The 3 a.m. story, as the logs tell it

  1. 3:12 a.m.
    Sign-in from another country

    Alone, it could be a traveling employee or a VPN.

  2. 3:15 a.m.
    4,000 files downloaded

    Unusual volume for an accounting user, at an unusual hour.

  3. 3:40 a.m.
    New admin account created

    Persistence: the attacker is securing a way back in.

  4. 3:41 a.m.
    SIEM correlation alert

    Linked together, the three events become a clear incident.

Step 3 of 11Practice · Sort into groups

A SOC analyst reviews these alerts. Which look like likely true positives worth escalating, and which are probably benign?

Tap an item, then tap its group (or drag it there).

Step 4 of 11Learn

The incident response lifecycle

An incident is an event that actually threatens the confidentiality, integrity or availability of systems or data, such as a malware infection, a compromised account or a data leak. Panic and improvisation make incidents worse, so organizations follow a defined process. The widely used NIST model describes four phases:

  1. Preparation. Before anything happens: an incident response plan, defined roles, contact lists (including legal, communications and outside experts), tools, logging, backups and practice exercises. Most of the outcome of an incident is decided here.
  2. Detection and analysis. Recognizing that something is wrong, confirming it, and working out its scope: which systems, which accounts, what data, since when. Documentation starts immediately, with times and actions.
  3. Containment, eradication and recovery. Contain first to stop the spread: isolate infected machines from the network, disable compromised accounts, block malicious domains. Then eradicate the cause: remove malware, close the vulnerability, reset credentials. Then recover: restore systems from clean backups, monitor closely for signs the attacker is back.
  4. Post-incident activity. A blameless lessons-learned review: what happened, what worked, what didn't, and what will change. This feeds back into preparation.

NIST's newer guidance maps these activities onto the six functions of its Cybersecurity Framework 2.0, Govern, Identify, Protect, Detect, Respond and Recover, but the core flow is the same.

One instinct to resist: wiping an infected machine immediately. It can destroy evidence needed to understand how the attacker got in. Isolate it from the network first, preserve what's needed, then rebuild.

Step 5 of 11Practice · Put in order

Put the incident response phases in order.

Drag the items, or use the arrow buttons, to put them in order.

  1. Preparation
  2. Recovery
  3. Lessons learned
  4. Containment
  5. Detection and analysis
  6. Eradication

Step 6 of 11Practice · Diagram

The NIST incident response cycle

An analyst isolates an infected laptop from the network. Which phase is that?

Tap the shape that answers the question, then press Check.

The NIST incident response cycleCycle diagram: Preparation → Detection and analysis → Contain, eradicate, recover → Post-incident review.Lessons feedpreparationPreparationDetection andanalysisContain,eradicate,recoverPost-incidentreview
Preparation

Plans, roles, contacts, logging, backups and practice.

Detection and analysis

Confirm the incident and work out its scope; start documenting.

Contain, eradicate, recover

Isolate first, remove the cause, then restore from clean backups.

Post-incident review

Blameless lessons learned that improve preparation.

Step 7 of 11Tap to reveal

Measuring a response

  1. Mean time to detect (MTTD)

    The average time between an attacker's first activity and the moment the team notices. Shorter detection means less time for data theft and spreading.

  2. Mean time to respond (MTTR)

    The average time from detection to containment. Clear runbooks, pre-approved actions such as isolating a laptop, and practiced roles shorten it.

  3. Dwell time

    How long an intruder stays undetected in the environment overall. Reducing dwell time is one of the main goals of investment in logging and detection.

Step 8 of 11Practice · What would you do?

What would you do?

An employee calls the help desk: a red ransom note has appeared on their screen and files on a shared drive are being renamed with a strange extension. You are the on-call security analyst.

Step 9 of 11Note

Step 10 of 11Practice · Select all that apply

Which of these belong in the preparation phase? Select all that apply.

Select all that apply.

Step 11 of 11Practice · Choose one

Why is a blameless lessons-learned review important after an incident?