Malware and cyber defence, explained

Incident response: the steps, explained

Incident response is an organisation's plan for detecting, containing and recovering from a cyber attack. The two best-known models describe the same work: NIST's four phases (preparation; detection and analysis; containment, eradication and recovery; post-incident activity) and SANS's six steps (preparation, identification, containment, eradication, recovery and lessons learned).

NIST and SANS, side by side

NIST and SANS divide the same work differently: NIST groups containment, eradication and recovery into one phase, because in practice they overlap and repeat.

NIST SP 800-61 Rev. 2SANSWhat happens
1. Preparation1. PreparationWrite the plan, name the team, set up logging and EDR, keep backups offline, practise.
2. Detection and analysis2. IdentificationSpot the incident, confirm it is real, work out its scope and how serious it is.
3. Containment, eradication and recovery3. ContainmentStop it spreading: isolate machines, disable accounts, block addresses.
4. EradicationRemove the malware and the attacker's access, and close the way they got in.
5. RecoveryRestore systems from clean backups, reset passwords, watch closely for a return.
4. Post-incident activity6. Lessons learnedReview what happened within a couple of weeks and fix what let it happen.

NIST published Revision 3 of SP 800-61 in April 2025. It keeps the same activities but files them under the six functions of the NIST Cybersecurity Framework 2.0: govern, identify, protect, detect, respond and recover. The point it makes is that incident response is part of running security all year, not a separate plan in a drawer. Sources: NIST SP 800-61 Rev. 2, Rev. 3.

1. Preparation

Preparation decides how the rest goes, because nobody writes a good plan during an attack.

  • A written plan: who leads, who decides, who talks to customers, regulators and police.
  • Contact details kept somewhere that still works when email and the network do not.
  • Logs and EDR already collecting, since nobody can investigate what was never recorded.
  • Backups that follow the 3-2-1 rule, with one copy offline, and a tested restore.
  • A tabletop exercise: walk the team through a made-up incident once or twice a year.

2. Detection and analysis

Detection is finding out that something is wrong; analysis is finding out how wrong.

Alerts come from EDR, antivirus, unusual logins, users reporting a strange email, or worst of all, a ransom note. Analysts confirm the incident is real, then establish scope: which machines and accounts, since when, and what data. Every action and time is written down from this point on.

3. Containment

Containment stops the damage spreading while the investigation continues.

Short-term containment isolates machines and disables compromised accounts; long-term containment might rebuild a server in a clean network. Speed matters, but so does evidence: isolating a machine keeps its memory intact, where switching it off would not.

4. Eradication

Eradication removes everything the attacker left behind and closes the door they came in through.

That means the malware, any extra accounts or scheduled tasks they created, and the original weakness: the unpatched server, the password without multi-factor authentication. Malware analysis tells responders what to look for.

5. Recovery

Recovery brings systems back into use, carefully, from known-good sources.

Systems are restored from clean backups or rebuilt, passwords are reset, and monitoring is turned up for weeks, because attackers who kept a foothold come back.

6. Lessons learned

The review turns one bad week into lasting improvements.

Within about two weeks, the team agrees on a timeline, what worked, what did not, and a short list of changes with owners and dates. Blame-free reviews get more honest answers.

The first hour: a checklist

  1. Do not panic, and do not switch affected machines off. Disconnect them from the network.
  2. Call the incident lead in your plan, your IT provider or your cyber insurer's hotline.
  3. Start a written log: what you saw, what you did, and when, to the minute.
  4. Use a separate, clean device and a separate channel to talk, in case email is compromised.
  5. Preserve evidence: do not delete suspicious emails or files, and do not run cleaning tools yet.
  6. Reset passwords for affected accounts from a clean device, and check for new forwarding rules on email.
  7. Do not contact the attackers or pay anything before getting advice.
  8. Check your legal duties: under the GDPR, for example, a personal data breach must normally be reported to the regulator within 72 hours of becoming aware of it.

For the attack this checklist most often meets, see how ransomware works.

Questions people ask

What are the 6 steps of incident response?

In the SANS model: preparation, identification, containment, eradication, recovery and lessons learned. They are often remembered as PICERL.

What are the 4 phases of incident response in NIST?

In NIST SP 800-61 Revision 2: preparation; detection and analysis; containment, eradication and recovery; and post-incident activity. Revision 3, published in 2025, reorganises the guidance around the functions of the NIST Cybersecurity Framework 2.0 instead.

Should you turn off a computer that has been hacked?

Usually not. Disconnect it from the network instead, by unplugging the cable and turning off Wi-Fi. Switching off erases memory, which can hold the evidence investigators need and sometimes encryption keys. Follow your incident response plan if you have one.

The M-Learn app

Go from reading about it to understanding it.

M-Learn turns topics like this one into short lessons with a diagram on every page, two quick questions after each lesson, and a certificate when you finish a course. 8 courses, 144 lessons, in 11 languages.

Free to start. Coming soon to Android and iOS.