Incident Response Basics
Chapters and transcript
Incident Response Basics It is ten past two in the morning. Someone makes two hundred and fifty failed logins to Amir's account, then a successful one, from the same IP. The SIEM raises an alert. Amir is normally in the office during the day. What now? Without a plan, people panic, evidence is lost, and attackers stay longer. That is why teams use incident response.
What is an incident? First, what is an incident? It is a security event that harms, or threatens to harm, an organisation. For example: a stolen password, malware on a laptop, or leaked data. Incident response, or IR, is the organised way a team handles it.
The IR lifecycle A widely used model comes from NIST, in a guide called SP eight hundred dash sixty-one. It has four phases. Preparation: are we ready? Detection and Analysis: is something wrong, and how bad is it? Containment, Eradication and Recovery: stop it, remove it, get back to normal. Post-incident activity: what did we learn? The phases form a loop, so lessons feed back into preparation.
1. Preparation Good response starts long before an incident. Preparation means: a written incident response plan, with clear roles and contacts. Playbooks, step-by-step guides for common incidents like phishing or ransomware. Logging turned on, and logs kept long enough, with tools like the SIEM, EDR and backups ready to use. And tabletop exercises, where the team talks through a pretend incident.
2. Detection and Analysis Incidents are detected from alerts, user reports or outside notices. Then the team decides how serious it is. Critical: ransomware spreading. Act immediately. High: an admin account confirmed compromised. Within the hour. Medium: malware blocked on one laptop. The same working day. Low: one phishing email reported, nobody clicked. The normal queue. Names vary, but everyone must use the same scale.
3. Containment Containment stops the damage from growing. The team can isolate an infected laptop from the network using EDR. They can disable a compromised account, or force a password reset. And they can block the malicious IP at the firewall. When the attacker tries again, the connection is denied.
3. Eradication and Recovery Next comes eradication, which removes the cause. Delete the malware, close the vulnerability that was used, and remove any accounts or backdoors the attacker created. Then recovery brings systems back to normal. Restore from clean backups, rebuild servers if needed, and watch closely in case the attacker returns.
Preserving evidence Do not rush to wipe a machine. You may never learn how the attacker got in. Four rules for evidence. Collect the most volatile data first. Memory is lost when a computer is turned off. Copy, do not change. Work on copies, not originals. Record hashes, like SHA two five six, a fingerprint of each file. And keep a chain of custody: who collected each item, when, from where, and who handled it after.
Preserving evidence Here is what that looks like. The analyst exports the sign-in logs for Amir's account, and records a SHA two five six hash. Then a note goes into the custody file: who collected it, when, and from where. If the hash still matches later, the file has not changed.
Quick check Quick check. A laptop is infected with malware. A colleague wants to wipe it right away and reinstall everything. What should the team do first? Take a moment, then choose.
4. Post-incident activity After recovery, hold a lessons learned meeting, usually within a couple of weeks. Ask: what happened, and when? How was it detected, and could we have seen it sooner? What worked well, and what slowed us down? What will we change? Keep it blameless. People share mistakes honestly only when they are not punished for it.
Worked example Back to Amir. Analysis finds a new mail forwarding rule sending his email outside, and no MFA. Severity: High. Containment: disable the account, end sessions, remove the rule, block the IP. Eradication and recovery: a new password, MFA on, and a search for the same IP against other accounts. Lessons learned: MFA for all staff, and an alert for new forwarding rules.
Putting it together Let us put it together. Prepare before anything happens: plans, playbooks and logs. Detect and analyse, and set a severity. Contain first, then eradicate and recover. Preserve evidence with hashes and a chain of custody. And learn from every incident, without blame. Now read the lesson below, and answer the quiz to finish this path.
An incident is a security event that harms, or threatens to harm, an organisation: a stolen password, malware on a laptop, leaked data. Incident response (IR) is the organised way a team handles it. Without a plan, people panic, evidence is lost and attackers stay longer.
The incident response lifecycle
A widely used model comes from NIST, the US National Institute of Standards and Technology, in a guide called SP 800-61. It describes four phases:
| Phase | Main question |
|---|---|
| 1. Preparation | Are we ready before anything happens? |
| 2. Detection and Analysis | Is something wrong, and how bad is it? |
| 3. Containment, Eradication and Recovery | How do we stop it, remove it and get back to normal? |
| 4. Post-incident activity | What did we learn, and what do we change? |
The phases form a loop. Lessons from phase 4 feed back into preparation.
NIST has updated this guidance over time, and newer versions organise it differently. The four phases above are still the most common way to learn the basics.
1. Preparation
Good response starts long before an incident. Preparation includes:
- A written incident response plan with clear roles and contacts
- Playbooks: step-by-step guides for common incidents, such as phishing or ransomware
- Logging turned on, and logs kept long enough to investigate
- Tools ready to use: SIEM, EDR, backups, a ticketing system
- Practice through tabletop exercises, where the team talks through a pretend incident
2. Detection and Analysis
Incidents are detected from alerts, user reports, or outside notices. The team must then confirm whether it is real, understand what happened, and decide how serious it is.
Many teams use severity levels to decide how fast to act:
| Severity | Example | Typical response |
|---|---|---|
| Critical | Ransomware spreading, or confirmed theft of customer data | Immediate, all hands, managers informed |
| High | An admin account confirmed compromised | Urgent, within the hour |
| Medium | Malware blocked on one laptop, no spread seen | Same working day |
| Low | A single phishing email reported, nobody clicked | Normal queue |
The exact names and times vary between organisations. What matters is that everyone uses the same scale.
3. Containment, Eradication and Recovery
Containment stops the damage from growing. Examples:
- Isolate an infected device from the network using EDR
- Disable a compromised user account, or force a password reset
- Block a malicious IP address or domain at the firewall
- Revoke stolen API keys or access tokens
Eradication removes the cause: delete the malware, close the vulnerability that was used, remove any accounts or backdoors the attacker created.
Recovery brings systems back to normal: restore from clean backups, rebuild servers if needed, and watch closely for signs that the attacker is returning.
Do not rush to wipe a machine. If you destroy it before collecting evidence, you may never learn how the attacker got in.
Preserving evidence
Evidence helps you understand the attack, and may be needed for legal or insurance reasons. Basic rules:
- Collect the most volatile data first. Memory (RAM) is lost when a computer is turned off, so capture it before shutting down if possible
- Copy, do not change. Work on copies of disks and logs, not the originals
- Record hashes. A hash, such as SHA-256, is a fingerprint of a file. If the hash still matches later, the file has not changed
- Keep a chain of custody. Write down who collected each item, when, from where, and every person who handled it after that
Communication
During an incident, clear communication is as important as technical work:
- Keep one incident lead who coordinates and makes decisions
- Keep a timeline of everything found and done, with times
- Inform managers, legal and other teams according to the plan
- Use a separate channel if the attacker may be able to read company email or chat
- Customers or regulators may need to be told. Leave this to the people responsible for it
4. Post-incident activity
After recovery, hold a lessons learned meeting, usually within a couple of weeks. Ask:
- What happened, and when?
- How was it detected? Could we have detected it sooner?
- What worked well? What slowed us down?
- What will we change: new rules, new controls, updated playbooks?
Keep the meeting blameless. People share mistakes honestly only when they are not punished for it.
Worked example: a compromised account
Detection. At 02:10 the SIEM raises an alert: 250 failed logins for amir@chaicorp.example from 203.0.113.45, then a successful login from the same IP. Amir is normally in the office during the day.
Analysis. The analyst checks the account activity after the login. A new mail forwarding rule sends all of Amir's email to an outside address. No MFA was enabled on the account. Severity is set to High.
Containment. The team disables the account, ends all active sessions, removes the forwarding rule and blocks 203.0.113.45.
Eradication and Recovery. Amir gets a new strong password and MFA is turned on. The team checks for other changes the attacker made and searches the logs for the same IP against other accounts. The account is re-enabled once it is clean.
Evidence. Relevant logs are exported, hashed and saved, with a note of who collected them and when.
Lessons learned. The team decides to require MFA for all staff and to add an alert for new forwarding rules to outside addresses.
Check your understanding
Answer every question correctly to complete this lesson. If you miss one, try the quiz again.
1. Which phase of the NIST incident response lifecycle includes isolating an infected laptop from the network?
2. What is chain of custody?
3. Why is the lessons learned meeting important?
Locked: answer every quiz question above correctly to complete this lesson.
Spotted a mistake or something unclear? Report a mistake