Home › Defensive Security › Incident Response
Incident Response
PICERL lifecycle, containment strategy, evidence handling and post-incident review.
▶ Here to build, not read? Jump to the Hands-On Practice.
Prerequisites: DFIR Fundamentals · Log Analysis
Overview
Incident response is the disciplined process of preparing for, detecting, containing, eradicating and recovering from security incidents — and, crucially, learning from them. Its purpose is to limit damage and restore normal operation while preserving the evidence needed to understand what happened. Good IR is mostly preparation: the quality of your response is decided by the runbooks, access, logging and practice you put in place before the incident, not by heroics during it.
The defining tension in IR is containment speed versus evidence preservation versus business continuity. Pull the plug too fast and you destroy volatile evidence and tip off the adversary; move too slowly and the attacker spreads. Structured frameworks (NIST SP 800-61's Preparation → Detection & Analysis → Containment, Eradication & Recovery → Post-Incident Activity, and the SANS PICERL variant) exist to make those trade-offs deliberately rather than in a panic.
How it works
The lifecycle, in practice:
- Preparation — runbooks, roles (incident commander, scribe, comms), tooling, logging coverage, and rehearsed tabletops. This phase decides the outcome.
- Detection & Analysis — triage an alert, establish scope ("how many hosts, what data, which accounts"), and build a timeline. Order of volatility guides evidence collection: memory before disk before logs.
- Containment — short-term (isolate a host) and long-term (block C2, reset credentials) while preserving evidence. Contain in a way that does not tip a sophisticated adversary prematurely.
- Eradication & Recovery — remove persistence, patch the entry vector, rebuild from known-good, and restore service with heightened monitoring.
- Post-Incident Activity — a blameless review that turns the incident into detections, hardening and updated runbooks.
The through-line is evidence: every action is logged so the timeline — and any later legal process — holds up.
flowchart TD
A["Incident Response"] --> B["Concepts & terminology"]
A --> C["Internal mechanics"]
C --> D["Trust boundaries"]
D --> E["Attack surface"]
D --> F["Defensive controls"]
E --> G["Detection & telemetry"]
F --> G
G --> H["Verification in the lab"]
- Incident commander — The single person coordinating the response and making containment decisions.
- Order of volatility — The sequence to collect evidence by how quickly it disappears (RAM → disk → logs).
- Chain of custody — Documented handling of evidence that preserves its integrity and admissibility.
- Containment — Limiting an incident's spread; short-term (isolate) vs long-term (remediate the vector).
- Eradication — Removing the attacker's presence, tools and persistence entirely.
- Dwell time — How long an attacker was present before detection — a key metric to minimise.
thousands of servers within hours, halting global operations. Recovery famously depended on a single surviving domain controller (offline by chance during the outage). The IR lessons: segmentation limits blast radius, tested offline backups are existential, and rehearsed crisis command turns catastrophe into mere disaster.
Hands-On Practice
🧪 Lab setup — Defensive Security
Wazuh dashboard— https://localhost:5601 (or :443) — SIEM/XDR UI, rules, alertsvictim host + agent— generates the telemetry you hunt over
# blue-lab/docker-compose.yml — Defensive part environment
# Wazuh ships an official single-node compose. Pull it and bring it up:
# git clone https://github.com/wazuh/wazuh-docker -b v4.x
# cd wazuh-docker/single-node && docker compose up -d
# Then add a target that generates events:
services:
victim:
image: ubuntu:22.04
container_name: blue-victim
command: sleep infinity
networks: [labnet]
# (install the Wazuh agent in 'victim', or run Sysmon on a Windows VM,
# then run Atomic Red Team tests to generate detections.)
networks:
labnet:
driver: bridgeUses the Defensive Security lab environment.
Guided walkthrough
# bring up the part environment, then confirm you can reach `Wazuh dashboard` from KaliExpected output
Target reachable; you have a clean starting point.# perform the core incident response technique step by step against Wazuh dashboardExpected output
You observe the expected effect and can repeat it reliably.# inspect logs / responses / process or network activityExpected output
You can point to exactly where and why it worked.# implement the single most important fix for this techniqueExpected output
Repeating the technique now fails.Live terminal
labserver/README.md), then click Connect lab runner and paste the token. Until then, copy commands from the walkthrough and run them in your own Kali terminal.
Try it yourself
Challenge 1. Extend the walkthrough with one variation of the incident response technique and predict the result before running it.
Hint
Change one variable (payload, target, or control) at a time.
Solution
Answers vary — the goal is a correct prediction confirmed by observation.
Challenge 2. Find and apply a second defensive control for incident response and show it also blocks the technique.
Hint
Think in layers: prevention, detection, and least privilege.
Solution
Any independent control that breaks the chain counts — name why it works.
Challenge 3. Write a one-paragraph report of your incident response test mapped to CWE/ATT&CK and the fix.
Hint
Structure: finding → impact → evidence → remediation.
Solution
A defender should be able to act on your report without asking you anything.
Detect & defend (blue-team view)
- Re-run the technique while watching your telemetry — attack and detection are two views of one event.
- Turn what you observed into a detection rule (Sigma/YARA) and confirm it fires without flooding.
Skills check
You can move on when you can, without notes:
Going deeper — Running the first hour
The opening moves of a real incident, in order:
- Declare and staff. Name an incident commander and a scribe; open a dedicated, out-of-band comms channel (assume email/chat may be monitored by the adversary).
- Triage and scope. What fired the alert? Which hosts, accounts and data are implicated? Do not fixate on patient zero before understanding spread.
- Preserve volatile evidence before containing: capture memory and volatile artefacts from key hosts.
- Contain deliberately. Isolate affected hosts (network quarantine, not power-off, to keep RAM), disable compromised accounts, and block known C2.
- Communicate. Keep leadership and (as required) legal/regulatory stakeholders informed on a defined cadence.
Decisions made here are hard to reverse — which is exactly why they should be rehearsed in tabletops beforehand.
Check Yourself
Quick self-test — answers hidden. If you can't answer without notes, redo the relevant walkthrough step.
Q1. In one sentence, what security problem does Incident Response address or create?
Show answer
Incident Response matters because its behaviour determines where trust is placed; misplacing that trust is the root of the associated bug class.
Q2. Name one trust boundary involved in Incident Response and what crosses it.
Show answer
Any point where attacker-influenced data meets privileged processing — e.g. user input reaching an interpreter, or a token reaching a verifier.
Q3. Give one attack against Incident Response and the single control that most reduces its impact.
Show answer
State the attack precisely, then the primary control (validation, encoding, isolation, authentication, or least privilege) — not a laundry list.
Interview angles
- Walk me through how Incident Response works, then tell me where you would attack it.
- How would you detect Incident Response being abused in an environment you defend?
- What is the difference between mitigating and eliminating the risk associated with Incident Response?
Pitfalls & Best Practice
Common mistakes
- Powering off a host and destroying volatile memory evidence before capturing it.
- No incident commander, so decisions stall and actions conflict.
- Communicating over channels the adversary may control, tipping them off.
- Eradicating patient zero while missing persistence and secondary footholds, causing reinfection.
- Skipping the blameless post-mortem, so the same gap is exploited again.
Do this instead
- Invest in preparation: runbooks, roles, logging coverage, and regular tabletops.
- Follow order of volatility; preserve evidence before you contain.
- Use out-of-band communications during an active intrusion.
- Contain to stop spread without prematurely alerting a sophisticated adversary.
- Close every incident with a blameless review that yields new detections and hardening.
Reference
MITRE ATT&CK Mapping
No single ATT&CK technique maps cleanly to this concept. Once you apply it offensively or defensively, map the specific behaviour using the ATT&CK chapter.
OWASP Mapping
- See OWASP Top 10 for the relevant category when this applies to web systems.
CWE Mapping
- No direct weakness ID; when this concept fails in code it usually surfaces as one of the CWE Top 25 entries.
CAPEC Mapping
- No single attack pattern; see the CAPEC chapter to map behaviour to patterns.
CVE References
- No canonical CVE for a concept page. Search the NVD for concrete instances when studying real cases.
NIST References
- NIST SP 800-61 Rev.2 — Computer Security Incident Handling Guide
RFC References
- No governing RFC for this topic. Where a protocol is involved, its RFC is linked from the relevant networking chapter.
Research Papers
- Reflections on Trusting Trust — Ken Thompson, 1984
- Smashing the Stack for Fun and Profit — Aleph One, Phrack 49, 1996
- The Protection of Information in Computer Systems — Saltzer & Schroeder, 1975
Books
- Blue Team Handbook — Don Murdoch
- The Practice of Network Security Monitoring — Richard Bejtlich
- Intelligence-Driven Incident Response — Roberts & Brown
Official Documentation
Related Chapters
- Defensive Security Methodology
- Security Operations Center
- SIEM
- Intrusion Detection Systems
- Intrusion Prevention Systems
- Endpoint Detection and Response
Part of the Defensive Security section of Cybersecurity-Mastery. 🟠 Advanced · ~84 min hands-on · Last updated 2026-08-12.