The order is the lesson#
A server is behaving strangely and you are fairly sure it is compromised. Almost everybody's instinct is the same: get rid of the malware, right now.
That instinct is wrong, and understanding why is most of this topic. Wiping the machine immediately destroys the evidence of how the attacker got in, and it does nothing about the four other machines they reached an hour ago. You cured one symptom and lost the ability to find the disease.
So incident response is a sequence, and the sequence exists because each step protects the one after it.
| Phase | The question it answers |
|---|---|
| Preparation | What do we have ready before anything happens? |
| Detection | Did something happen, and how do we know? |
| Analysis | What is it, how bad, and how far has it spread? |
| Containment | How do we stop it getting worse right now? |
| Eradication | How do we remove it and close the way in? |
| Recovery | How do we get back to normal and confirm it is really over? |
| Lessons learned | What do we change so this is cheaper next time? |
Why sources count the phases differently#
This trips people up during revision, so it is worth settling early. You will see this life cycle described as four phases in one book and six or seven in another. Nobody is wrong. They are grouping the same activities differently.
NIST's widely cited version groups them into four: preparation; detection and analysis; containment, eradication and recovery; and post-incident activity. Other treatments, including most Security+ study material, split those groups out into separate named steps because each one is a different decision.
Learn the named activities and their order, not a number. A question will name a phase and ask what belongs in it, or describe an action and ask which phase it is. Neither needs you to know whether the official count is four or seven.
One consequence is worth noting. In the four-phase grouping, containment, eradication and recovery sit together because they often overlap in practice. You may be recovering one system while still containing another. The order still holds within the group.
Preparation is the phase that decides the others#
Preparation is the only phase that happens when nothing is wrong, which is exactly why it gets deprioritised and exactly why it matters most. Everything you did not do here becomes a problem you solve under pressure at three in the morning.
Preparation covers:
- The plan and the playbooks. A playbook is a written procedure for a specific incident type, so nobody is inventing a ransomware response during a ransomware incident.
- The team and the contact list, including who has authority to disconnect a production system. That authority question stalls real incidents constantly.
- Communication plans, including how you will communicate if email is the thing that is compromised.
- Tooling and logging, already deployed and already retaining data. You cannot investigate a month-old intrusion with seven days of logs.
- Exercises. A tabletop exercise talks a scenario through in a room. A simulation actually runs it. Both exist to find the gaps while they are cheap.
Detection and analysis#
Detection is noticing. It comes from monitoring alerts, a user report, a vendor notification, or an anomaly somebody spotted in a log. Most real incidents are detected by something mundane.
Analysis is the harder half, and it answers three questions that shape everything after:
- Is this actually an incident? Distinguishing a real event from a false positive is the first job, and getting it wrong in either direction is expensive.
- What is the scope? Which systems, which accounts, which data. Scope is what makes containment effective, and underestimating it is the most common serious error in real response work.
- How severe is it, and what does that trigger? Severity drives escalation, and it may trigger legal or regulatory notification with a deadline attached.
Two terms belong here. An event is any observable occurrence. An incident is an event that actually harms, or threatens to harm, confidentiality, integrity or availability. Every incident is an event. Almost no events are incidents.
Containment comes before eradication, always#
This is the single most testable sequencing point in the topic. Contain first. Stop the bleeding before you treat the wound.
Containment limits further damage while you still work out what you are dealing with. It typically means isolating affected systems from the network, disabling compromised accounts, blocking attacker infrastructure, or segmenting a portion of the network.
There is a real tension inside containment that exam scenarios like to build on:
- Pulling the power stops the damage fastest and destroys everything in memory, which is often where the useful evidence lives.
- Disconnecting from the network but leaving the machine running preserves volatile evidence while cutting the attacker off. This is usually the better answer.
- Watching and waiting gathers intelligence about the attacker but accepts ongoing harm, and normally needs an explicit decision from someone with authority to accept that.
Eradication then removes the cause: the malware, the attacker's persistence mechanisms, the created accounts, and critically the vulnerability that allowed entry. Removing malware while leaving the unpatched service open means you will meet the same attacker again shortly.
If the incident might lead to legal action, evidence must be preserved with chain of custody, meaning a documented record of who held what, when, and what they did with it. Order of volatility applies too: capture memory and running state before you capture disk, because the volatile things disappear first.
Recovery, and the phase everyone skips#
Recovery restores normal operation and then verifies it. Restoring from backup, rebuilding systems, returning them to the network, and monitoring the restored environment more closely than usual. That last part matters: elevated monitoring after recovery is how you find out that eradication missed something.
Two measures shape recovery decisions, and they are constantly confused:
- RTO, recovery time objective, is how long you can be down. It is about time.
- RPO, recovery point objective, is how much data you can afford to lose. It is about the point you recover back to, so it drives how often you back up.
Lessons learned is the phase that gets skipped, because by the time you reach it the crisis is over and everyone wants their normal job back. It should happen while memory is fresh, produce a written report, and generate actual changes to the plan rather than a list of regrets.
The useful framing is that lessons learned feeds directly back into preparation. That is what makes the life cycle a cycle rather than a line, and it is why a diagram of it is usually drawn as a loop.
Contain before you eradicate, and preserve evidence before you clean, because both of those are mistakes you cannot undo once made.
Test yourself in the free Kestrel Exams app
Topic-selectable practice — offline, no ads, no account.
Practice this topic →Frequently asked questions#
What are the phases of incident response in order?
Preparation, detection, analysis, containment, eradication, recovery, and lessons learned. NIST groups these into four phases by combining detection with analysis, combining containment, eradication and recovery, and calling the last one post-incident activity. The activities and their order are the same either way.
Why does containment come before eradication?
Because eradication takes time you may not have, and removing malware from one machine does nothing about the other machines the attacker already reached. Containment stops the damage spreading while analysis is still running. Eradicating first also tends to destroy the evidence that would have told you the real scope.
What is the difference between an event and an incident?
An event is any observable occurrence on a system or network. An incident is an event that harms, or threatens to harm, confidentiality, integrity or availability. Every incident is an event, but the overwhelming majority of events are routine and are not incidents.
Should you power off a compromised machine?
Usually not. Powering off destroys volatile evidence held in memory, which is often where the most useful indicators live. Disconnecting the machine from the network while leaving it running normally contains the incident and preserves that evidence. Order of volatility says to capture memory and running state before disk.
What is the difference between RTO and RPO?
Recovery time objective is how long the system can be down, so it is a measure of time. Recovery point objective is how much data you can afford to lose, so it is a measure of how far back you recover to, and it is what determines how frequently you need to take backups.
Something here not clear? A topic you wish we covered? Tell us. We read every message, and a request is the fastest way to get a guide written — several of these exist because somebody asked.
