Ethical Hacking & Cyber Defense · Unit 7 of 8
Unit 7: Detection and incident response
The blue-team skills behind most entry-level jobs: reading logs, SIEM and SOC work, alert triage, the incident response lifecycle and MITRE ATT&CK.
Opens the first lesson of this unit in Ethical Hacking & Cyber Defense. Every lesson is open from the start.
Lesson 1: Logs: the evidence trail
Goal: Name the key log sources and Windows security event IDs, and explain why accurate time and central collection matter.
If it is not logged, it did not happen, at least as far as an investigation can prove. Defenders depend on logs from many places: operating systems, firewalls, VPNs, web servers, email systems, cloud services, identity providers and security tools such as EDR (endpoint detection and response). Each answers different questions: who logged in, from where, what ran, what connected to what, and what changed.
| Windows event ID | Meaning | Why analysts watch it |
|---|---|---|
| 4624 | An account logged on successfully | Logins at strange times or from strange places |
| 4625 | An account failed to log on | Password guessing and spraying |
| 4672 | Special privileges assigned to a new logon | Admin-level logins that should be rare |
| 4720 | A user account was created | Attackers creating accounts to keep access |
| 4732 | A member was added to a security-enabled local group | Someone added to Administrators |
| 1102 | The audit log was cleared | Often an attacker covering tracks |
Two details make logs trustworthy. Accurate time: every system should sync its clock (using NTP) so events from different machines line up into one timeline. A two-minute clock difference can make an attack look like it happened in the wrong order. Central collection: logs are copied as they are written to a central system that attackers on one machine cannot easily reach, and kept long enough to investigate incidents found weeks later.
Worked example: building a mini timeline
- 09:14:02 VPN log: user jlee connects from an address in another country. Jlee is at her desk in the office.
- 09:14:40 Windows 4624 on a file server: jlee logs on from the VPN address.
- 09:16:11 Windows 4732: jlee's account adds a new account to the Administrators group.
- 09:16:30 Windows 1102: the security log on that server is cleared.
Four events from three sources, lined up by synced clocks, tell a clear story: stolen credentials, privilege change, covering tracks. This is an incident, and it needs escalation now.
- EDR
- Endpoint detection and response: software on computers that records activity and detects and blocks threats.
- Event ID 4625
- The Windows security event for a failed logon.
- NTP
- Network Time Protocol: keeps computer clocks synchronized so logs line up.
- Timeline
- Events from many sources put in time order to show what happened during an incident.
Remember: Synced clocks, central copies, and know 4624, 4625, 4672, 4720, 4732 and 1102.
Lesson 2: SIEM, alerts and the SOC analyst's day
Goal: Explain what a SIEM and a SOC do and triage an alert into a true or false positive with a clear next step.
A SIEM (security information and event management system) collects logs from across an organization, stores them, and runs detection rules that turn suspicious patterns into alerts. Examples include Splunk, Microsoft Sentinel and Elastic Security. A SOC (security operations center) is the team that watches those alerts. Entry-level SOC analysts (often called Tier 1) triage alerts; Tier 2 investigates deeper; Tier 3 and threat hunters look for attacks that rules have not caught.
| Result | Meaning | Example |
|---|---|---|
| True positive | The alert fired and there really is a problem | “Impossible travel” alert; the account really was stolen |
| False positive | The alert fired, but the activity was harmless | An admin's approved script triggered a rule |
| True negative | No alert, and nothing bad happened | A normal working day |
| False negative | No alert, but something bad did happen | A new attack technique no rule covers |
Triage follows a repeatable routine, often written down as a playbook. Read the alert and what rule fired. Gather context: who is the user, what is the device, is this normal for them, what happened just before and after? Check indicators against threat intelligence. Decide: false positive (document why, and suggest tuning the rule if it keeps happening), benign but worth noting, or true positive (escalate following the playbook). Clear written notes matter as much as the decision, because the next shift or the next tier must understand your reasoning.
Worked example: triaging one alert
- Alert: 40 failed logins for the account “finance-svc” in 5 minutes, then one success.
- Context: finance-svc is a service account used by a nightly reporting job. The failures came from the reporting server, right after its password was changed that afternoon.
- The ticket history shows the password change was planned, and the job was updated with the new password after the failures.
- Decision: benign true positive (the rule worked, but the activity was an approved change). Close with notes linking the change ticket, and suggest the team update service passwords before running jobs.
Triage is not guessing. It is collecting enough context to make a decision another analyst could check.
- SIEM
- Security information and event management: a system that collects logs and turns suspicious patterns into alerts.
- SOC
- Security operations center: the team that monitors alerts and responds to threats.
- Triage
- Quickly assessing an alert to decide whether it is real and how urgent it is.
- Playbook
- A written, step-by-step procedure for handling a specific type of alert or incident.
- True positive
- An alert that correctly identifies real malicious or unwanted activity.
Remember: Read the alert, gather context, compare with normal, decide, and write it down clearly.
Lesson 3: Incident response, step by step
Goal: Walk through the incident response lifecycle and explain containment, evidence preservation and lessons learned.
An incident is an event that actually harms, or threatens to harm, the confidentiality, integrity or availability of systems or data. Incident response (IR) is the organized way to handle it. The most widely taught model comes from NIST's guide SP 800-61. Its classic lifecycle has four phases; the April 2025 revision (Rev. 3) places incident response inside the broader NIST Cybersecurity Framework 2.0, but the core activities are the same.
| Phase | Key activities |
|---|---|
| 1. Preparation | Plans, playbooks, contacts, tools, logging and practice exercises before anything happens |
| 2. Detection and analysis | Spot the incident, confirm it, judge its scope and severity, start the timeline |
| 3. Containment, eradication and recovery | Stop the spread, remove the attacker's access and malware, restore safely from clean backups |
| 4. Post-incident activity | Lessons learned: what happened, what worked, what to change |
Containment comes before cleanup. Isolating an infected laptop from the network (many EDR tools can do this with one click) stops the spread while keeping the machine running for investigation. Pulling the plug or wiping it too early can destroy evidence in memory. Evidence preservation matters because incidents can lead to insurance claims, legal action or regulator reports: collect logs and disk or memory images carefully, record who handled what and when (chain of custody), and work on copies.
Communication is part of the plan. The incident response plan names who leads, who must be told (management, legal, sometimes customers, law enforcement or regulators within deadlines set by law) and how teams talk if email itself may be compromised. After recovery, a blameless lessons-learned review asks how the attacker got in and what would have stopped them sooner, and turns the answers into concrete changes.
Worked example: the first hour of a ransomware report
- 09:02 An employee reports a ransom note on screen. The analyst opens an incident ticket and follows the ransomware playbook.
- 09:05 The laptop is isolated from the network using the EDR tool, leaving it powered on.
- 09:10 The incident lead is called, and the SIEM is searched for the same malware on other machines: two more hosts are found and isolated.
- 09:30 Backups are checked to confirm they are offline and intact; management and legal are briefed; the timeline begins.
Contain fast, keep evidence, find the scope, protect the backups and tell the right people. Recovery comes after the spread has stopped.
- Incident
- An event that harms or threatens the confidentiality, integrity or availability of systems or data.
- Containment
- Limiting an incident's spread and damage, for example by isolating infected machines.
- Eradication
- Removing the attacker's access, malware and footholds after containment.
- Chain of custody
- A record of who handled evidence, when and how, so it remains trustworthy.
- Lessons learned
- A review after an incident to understand causes and improve defences, without blaming individuals.
Remember: Prepare, detect, contain before you clean, preserve evidence, recover, then learn.
Lesson 4: MITRE ATT&CK and threat intelligence
Goal: Use MITRE ATT&CK tactics and techniques to describe attacker behaviour, and tell indicators of compromise apart from TTPs.
MITRE ATT&CK is a free, public knowledge base of how real attackers behave, built from observed incidents. It organizes behaviour into tactics (the attacker's goal at each stage, such as Initial Access, Persistence, Privilege Escalation, Credential Access, Lateral Movement and Exfiltration) and techniques (how they achieve it, such as phishing for initial access or creating new accounts for persistence). Each technique has an ID, such as T1566 for Phishing.
| Tactic (the goal) | Example technique (the how) |
|---|---|
| Initial Access | Phishing (T1566); exploiting a public-facing application |
| Persistence | Creating a new account (T1136); scheduled tasks |
| Privilege Escalation | Abusing valid accounts; exploiting weak permissions |
| Credential Access | Brute force (T1110); dumping stored credentials |
| Lateral Movement | Using remote services such as RDP or SSH with stolen credentials |
| Exfiltration | Sending data out over a web service or encrypted channel |
Threat intelligence is information about attackers that helps you defend. At the simplest level it includes indicators of compromise (IOCs): specific IP addresses, domains and file hashes linked to attacks. IOCs are useful but short-lived: attackers change them cheaply. Behaviours, or TTPs (tactics, techniques and procedures), change slowly because they are expensive to reinvent. This idea is often drawn as the Pyramid of Pain: blocking a hash annoys an attacker a little; detecting their techniques forces them to change how they work.
Defenders use ATT&CK as a shared language and a map. After an incident, they label each step with its tactic and technique. To check coverage, they list the techniques that matter most to their organization and ask “would we detect this?” for each. Testers use it to plan realistic exercises and to report findings in terms the blue team can act on directly.
Worked example: labelling an incident with ATT&CK
- A phishing email with a malicious attachment reaches an employee: Initial Access, Phishing (T1566).
- The malware creates a scheduled task so it restarts after reboot: Persistence.
- The attacker uses a stolen admin password to log in to a file server over RDP: Lateral Movement using valid credentials.
- Large uploads to an unfamiliar cloud storage site follow: Exfiltration.
Labelled this way, the incident shows where detection failed and gives four concrete places to add or improve detections.
- MITRE ATT&CK
- A public knowledge base of real attacker tactics and techniques, used as a shared language for defence.
- Tactic
- In ATT&CK, the attacker's goal at a stage of an attack, such as Persistence.
- Technique
- In ATT&CK, a specific way an attacker achieves a tactic, such as Phishing.
- Indicator of compromise
- A specific artefact, such as an IP address, domain or file hash, linked to malicious activity.
- TTPs
- Tactics, techniques and procedures: how an attacker operates, which changes more slowly than indicators.
Remember: IOCs are cheap for attackers to change; behaviours are not. Detect techniques, not just hashes.
Practise it in Ethical Hacking & Cyber Defense
Each lesson ends with three questions that check you can use the idea, not just recognise it. Wrong answers explain why and come back in Review. The unit ends with a 6-question quiz; pass it with 80% or more to master the unit. Hands-on lab: Log hunt.
Every lesson is free: no ads, no lives and no paywall.