Open to everyone Reading, lesson 78 of 100, 2 min read
Containment, eradication and recovery
Stop the bleeding
Containment limits the damage while you work out the full picture. Choose actions that stop the spread without destroying evidence where possible.
| Situation | Containment actions |
|---|---|
| Account taken over | Reset password, sign out all sessions, revoke app tokens, check and remove mailbox rules, re-register MFA |
| Infected laptop | Isolate it from the network (EDR isolation, or unplug and turn off Wi-Fi); do not wipe it yet |
| Compromised server | Block its outbound traffic, restrict access to it, take a snapshot for evidence |
| Spreading malware | Segment networks, block known bad domains and hashes, disable affected accounts |
| Data exposed publicly | Remove the public link or file, ask search engines and sites to remove copies |
Short-term containment buys time; long-term containment keeps business running safely while you clean up (for example, moving a service to a clean server).
Eradication
Remove the attacker completely:
- delete malware and tools they installed;
- remove accounts, keys and scheduled tasks they created (persistence);
- close the hole they came through: patch the vulnerability, turn off the exposed service, add MFA;
- reset credentials they may have seen, including service accounts and API keys.
If you are not sure you found everything, rebuild from known-good images rather than trusting a cleaned system.
Recovery
- Restore from backups taken before the compromise began.
- Bring systems back gradually, most important first, watching them closely.
- Confirm with system owners that data and services are correct.
- Increase monitoring for weeks afterwards; attackers often try to return.
Communicate
Keep leaders, staff and, where needed, customers, parents and regulators informed with clear, honest, factual updates. Say what you know, what you do not yet know, and when the next update will come.
Warning
Do not tip off an attacker who still has access by announcing the investigation on a channel they can read, such as a compromised email system.