Basics of Cryptography and Cybersecurity

Chapter 13
Incident Response, Forensics and Resilience

Diploma in Cyber security
Basics of Cryptography and Cybersecurity   •   Diploma

Incident Response, Forensics and Resilience

Introduction

Cybersecurity cannot prevent every incident. Attackers may exploit unknown vulnerabilities, stolen credentials, misconfigured systems, malicious insiders, or weaknesses in suppliers. Consequently, an organisation requires more than preventive controls. It needs a disciplined capability to detect suspicious activity, limit damage, remove the cause, restore reliable services, preserve evidence, and improve future protection.

Incident response is the organised process used to manage a security incident. Digital forensics is the systematic identification, preservation, examination, and interpretation of digital evidence. Resilience is the capacity of an organisation to continue important operations, recover within acceptable limits, and adapt after disruption. These areas are closely related but not identical: incident response manages the event, forensics supports understanding and accountability, and resilience reduces the business consequences.

This chapter presents a practical lifecycle suitable for a diploma-level cybersecurity practitioner. It emphasises evidence integrity, clear decision-making, coordination, legal responsibility, and the relationship between incident response, backup, disaster recovery, and business continuity.

Learning Objectives

By the end of this chapter, the learner should be able to:

  • explain the purpose and lifecycle of incident response;
  • distinguish events, alerts, incidents, breaches, and disasters;
  • apply preparation, detection, containment, eradication, recovery, and lessons-learned activities;
  • preserve basic digital evidence using defensible procedures;
  • relate recovery objectives to backup, disaster recovery, and business continuity;
  • analyse an incident scenario and recommend technically and organisationally appropriate actions;
  • recognise ethical, legal, privacy, and governance obligations.

1. Core Terminology and Incident Classification

An event is an observable occurrence, such as a failed login or a process starting. An alert is an event or combination of events judged sufficiently suspicious to require review. An incident is an event that actually or potentially compromises confidentiality, integrity, or availability, or violates security policy. A data breach is an incident involving unauthorised access to, disclosure of, or loss of protected information. A disaster is a serious disruption whose effects exceed normal operational response capacity and may require alternate facilities, major recovery operations, or external assistance.

Classification helps an organisation assign urgency and resources. Common factors include:

FactorQuestions
ImpactWhich systems, people, services, or data are affected?
ScopeIs the incident limited to one device, a network segment, or the whole organisation?
ConfidenceIs malicious activity confirmed or only suspected?
CriticalityDoes the affected asset support safety, finance, healthcare, or essential services?
Legal significanceAre regulated data, contractual duties, or law-enforcement concerns involved?
PersistenceIs the attacker still present or is the activity historical?

A useful severity model may classify incidents as low, medium, high, or critical. The labels are organisation-specific; what matters is that thresholds, escalation contacts, and response authority are defined before an incident occurs.

2. Incident-Response Governance and Roles

Incident response is both a technical and managerial function. A small organisation may combine roles, whereas a large organisation may use a formal computer security incident response team (CSIRT). Typical responsibilities include:

  • Incident commander: coordinates decisions, priorities, communications, and escalation.
  • Technical lead: directs analysis, containment, eradication, and recovery.
  • Digital forensic examiner: acquires and analyses evidence while maintaining integrity.
  • System and network owners: provide operational knowledge and approve service changes.
  • Legal and privacy advisers: assess notification, evidence, contracts, and legal restrictions.
  • Communications personnel: prepare accurate internal, customer, regulator, and media communications.
  • Business continuity and executive leaders: decide acceptable service trade-offs and resource priorities.

An incident plan should define who may isolate a device, disable an account, shut down a service, contact law enforcement, approve public statements, or authorise restoration from backup. Without this authority structure, technical staff may delay containment or take actions that destroy evidence.

3. The Incident-Response Lifecycle

A commonly used lifecycle contains preparation, detection and analysis, containment, eradication, recovery, and post-incident activity. The phases are not strictly linear. New evidence may send responders back to analysis or containment, and recovery may reveal persistence that requires renewed eradication.

3.1 Preparation

Preparation is the foundation of effective response. Important activities include:

  1. Policies and plans: define incident categories, authority, escalation, evidence handling, and notification duties.
  2. Asset and dependency knowledge: maintain inventories of systems, owners, data classifications, network paths, and critical suppliers.
  3. Logging and monitoring: collect authentication, endpoint, firewall, DNS, cloud, application, and administrative logs. Synchronised clocks make timelines more reliable.
  4. Technical readiness: maintain secure administrative accounts, endpoint tools, forensic storage, malware-analysis capability, spare equipment, and tested recovery media.
  5. Training and exercises: conduct tabletop exercises, technical simulations, and contact-list tests.
  6. Relationships: establish arrangements with managed security providers, legal counsel, cyber-insurance contacts, regulators, and law enforcement where appropriate.
  7. Backups: create protected, access-controlled, and tested backups, including copies that ransomware cannot easily modify or delete.

Preparation should be measured. Useful indicators include the percentage of critical assets covered by logging, the age of the oldest successful backup test, and the time required to contact the response team.

3.2 Detection and Analysis

Detection begins when an alert, report, or observation suggests abnormal activity. Sources include security information and event management systems, endpoint detection tools, intrusion sensors, user reports, threat intelligence, and suppliers.

The responder should first validate the alert, identify the affected asset and account, establish an initial timeline, and determine whether the activity is ongoing. The investigation should record facts separately from assumptions. For example, “five successful logins from an unfamiliar country” is an observation; “the account was stolen” is a conclusion requiring evidence.

A basic triage record includes:

  • date and time, including time zone;
  • reporter and contact details;
  • affected systems, accounts, and data;
  • observed indicators such as addresses, domains, hashes, filenames, or commands;
  • actions already taken;
  • current impact and confidence level;
  • assigned owner and next review time.

Responders should avoid premature destruction of evidence. Rebooting a compromised computer may remove volatile memory containing malware, keys, network connections, and attacker tools. However, leaving a dangerous system connected may allow further harm. The decision must balance safety, business impact, and evidential value.

3.3 Containment

Containment limits the incident while investigation continues. Short-term containment may include isolating an endpoint, disabling a compromised account, blocking a malicious domain, restricting a network segment, or suspending a vulnerable service. Long-term containment uses temporary but more stable controls, such as moving a service to a clean environment or applying emergency access restrictions.

Containment decisions should consider:

  • whether the attacker still has access;
  • whether isolation will destroy volatile evidence;
  • whether the affected service supports safety or essential operations;
  • whether neighbouring systems may already be compromised;
  • how to preserve logs and maintain a record of actions.

Network isolation is not always equivalent to powering off a system. Disabling a switch port may preserve volatile state, while a power-off may destroy it. Conversely, a live system may continue encrypting files or communicating with an attacker. When risk is high, safety and damage limitation may properly take priority over evidence collection.

3.4 Eradication

Eradication removes the cause and mechanisms of compromise. Activities may include deleting malware, removing unauthorised accounts, rotating credentials and keys, patching vulnerabilities, correcting insecure configurations, and rebuilding systems from trusted images. A compromised system should not be declared clean merely because a suspicious file has been deleted. Attackers may use scheduled tasks, startup entries, web shells, stolen tokens, cloud permissions, or additional accounts for persistence.

The scope of eradication should be based on the likely attack path. If an administrator credential was stolen, changing only the password on one host is inadequate. Privileged credentials, service accounts, API keys, certificates, and session tokens may all require rotation. New credentials should be issued from a trusted administrative workstation and monitored for reuse.

3.5 Recovery

Recovery restores services in a controlled manner. It commonly involves rebuilding or replacing systems, restoring data, validating configurations, testing security controls, reconnecting networks gradually, and monitoring for recurrence. Business owners should approve the return of critical services because technical availability alone does not prove that the service is safe or operationally correct.

Recovery validation should include:

  • malware and integrity checks;
  • vulnerability and configuration review;
  • confirmation that accounts and permissions are appropriate;
  • functional and data-consistency tests;
  • increased monitoring after reconnection;
  • communication to users and stakeholders;
  • documentation of residual risk and temporary controls.

3.6 Lessons Learned

A post-incident review should be blameless but accountable. It should establish what happened, why controls failed, which actions worked, and what must change. A useful report includes a timeline, impact, root and contributing causes, evidence sources, decisions, costs, communication performance, and corrective actions with owners and deadlines.

Corrective actions should be specific. “Improve security” is not measurable; “enable multifactor authentication for all remote administration by 30 June” is actionable. Lessons may lead to new detection rules, improved segmentation, revised backup protection, better supplier controls, or additional training.

4. Basic Digital Forensics and Evidence Preservation

Digital evidence is information of potential value to an investigation. It may exist in volatile memory, storage media, operating-system logs, application records, cloud audit trails, email systems, network devices, mobile devices, or third-party platforms. Evidence can be fragile, duplicated, time-dependent, and easily altered.

4.1 Principles of Evidence Handling

A defensible process should preserve:

  • Integrity: evidence remains unchanged or any change is documented.
  • Authenticity: evidence can be linked to its source.
  • Reliability: the collection and analysis methods are repeatable and technically appropriate.
  • Documentation: another competent person can understand what was done.
  • Chain of custody: every transfer, storage location, handler, and action is recorded.
  • Proportionality: collection is relevant and not unnecessarily intrusive.

A cryptographic hash, such as SHA-256, can help detect changes to a file or forensic image. If the same data is hashed before and after transfer and the values match, this supports the conclusion that the data remained unchanged. A hash does not prove that the original data was truthful, nor does it by itself establish who created it.

4.2 A Practical Collection Sequence

The exact order depends on the incident, but a common approach is:

  1. ensure personal and operational safety;
  2. photograph or record the system state, screen, cables, and connected devices where appropriate;
  3. record time, location, device identity, and collector;
  4. capture volatile information when justified, such as memory, running processes, connections, and logged-in users;
  5. acquire storage using approved tools and, where possible, write protection;
  6. calculate and record cryptographic hashes;
  7. preserve relevant logs, emails, cloud records, and network data;
  8. store originals securely and perform analysis on verified working copies;
  9. document every action and transfer.

The order of volatility is not absolute because systems and tools differ. A forensic examiner should use validated procedures and understand that memory acquisition changes some system state. Cloud evidence may require provider processes, legal authorisation, and preservation requests because retention periods can be short.

4.3 Timeline Analysis

Investigators correlate timestamps from multiple sources to construct a sequence of events. They must account for time zones, daylight-saving changes, clock drift, logging delays, and differences between event time and recording time. A timeline can reveal initial access, execution, privilege escalation, lateral movement, data collection, and exfiltration.

Evidence interpretation should distinguish correlation from causation. For example, a login followed by file access suggests a relationship, but additional evidence is needed to establish who performed the action and whether the account was compromised.

5. Resilience, Backup, Disaster Recovery and Business Continuity

These concepts overlap but address different questions:

ConceptPrimary question
Incident responseHow do we manage and limit the security event?
BackupHow can data be restored after loss or corruption?
Disaster recovery (DR)How do we restore technology services after major disruption?
Business continuity (BC)How do essential business activities continue during disruption?
Organisational resilienceHow do we absorb, recover from, and adapt to disruption?

5.1 Recovery Objectives

The recovery time objective (RTO) is the targeted maximum time within which a service should be restored after disruption. The recovery point objective (RPO) is the targeted maximum amount of data loss measured in time. If a payroll system has an RTO of four hours and an RPO of one hour, the organisation aims to restore service within four hours and lose no more than approximately one hour of accepted transaction history.

These are objectives, not guarantees. Achieving them depends on technology, staffing, dependencies, contracts, and testing. A business impact analysis identifies critical processes, their dependencies, tolerable downtime, legal obligations, and consequences of failure.

5.2 Backup Strategy and Testing

Backups should be protected against unauthorised alteration and compromise. Good practice includes multiple copies, different media or environments, at least one copy separated from ordinary administrative credentials, encryption where appropriate, access logging, retention rules, and regular restoration tests. A backup that has never been restored is an assumption rather than demonstrated recovery capability.

Ransomware resilience requires attention to backup deletion, credential compromise, immutable or write-once storage, offline copies, delayed deletion, and monitoring of unusual backup activity. Restoration should begin with a trusted environment and validated data, not with immediate reconnection of potentially compromised systems.

5.3 Continuity During Cyber Incidents

Business continuity planning may include manual workarounds, alternate communication channels, prioritised services, alternate facilities, supplier arrangements, emergency decision rights, and pre-written notifications. Cyber incidents create special challenges: systems may be available but untrustworthy, and restoring connectivity too quickly may reintroduce the attacker.

Resilience therefore combines availability with integrity and confidence. A business that restores a manipulated database quickly has not achieved a safe recovery.

6. Applied Case: Illustrative Ransomware Incident at Northbridge College

Background

Northbridge College, a fictional institution, operates student records, finance, learning platforms, and shared staff storage. It maintains daily backups, but restoration tests have been infrequent. Multifactor authentication protects cloud email but not all administrative services.

Problem

At 07:30 on a Monday, staff report that shared files have unfamiliar extensions. Several servers show ransom notes. The security team observes an administrative account logging in overnight from an unusual address. Some backup repositories are inaccessible.

Analysis

The incident commander classifies the event as critical because teaching, finance, and student services are affected. Responders preserve firewall, identity, endpoint, and backup logs. They isolate affected servers and disable the suspected account, while keeping selected systems powered for volatile-data collection. Initial analysis indicates that the attacker used a stolen administrator credential, moved laterally, and attempted to delete backups. There is no immediate evidence that student records were exfiltrated, but this remains an open investigative question.

Approach and Solution

The college establishes a clean administrative environment, resets privileged credentials, blocks identified infrastructure, and segments unaffected systems. Forensic images and relevant cloud records are preserved. The recovery team identifies the last known-good backup, verifies its integrity, and restores priority services in a segregated environment. Student and finance applications are tested before controlled reconnection. Legal advisers assess notification duties and coordinate communications; staff are warned not to contact the attacker independently.

Outcome

Teaching resumes through a temporary learning platform within the approved continuity period. Core student services are restored after additional validation. The review finds gaps in multifactor authentication, excessive administrative privilege, and inadequate backup-restoration testing. Corrective actions include privileged-access management, stronger network segmentation, immutable backups, regular restoration exercises, improved detection for unusual authentication, and revised incident authority.

Learning Points

The case demonstrates that response is not simply “remove the malware.” Effective action requires preparation, evidence preservation, identity protection, business prioritisation, trustworthy backups, staged restoration, legal assessment, and measurable improvement. It also shows why an organisation must assume that a compromised credential can affect more than the first visible device.

7. Professional, Ethical and Regulatory Considerations

Responders may handle personal information, employee activity, confidential communications, and records that could later be used in legal proceedings. Collection should be authorised, relevant, proportionate, and limited to the investigative purpose. Investigators should avoid unnecessary browsing of personal content and should protect evidence from unauthorised disclosure.

Regulatory and contractual duties vary by jurisdiction and sector. Possible obligations include breach assessment, notification within a prescribed period, preservation of records, reporting to sector regulators, and cooperation with law enforcement. Organisations should obtain qualified legal advice rather than relying on generic technical assumptions.

Ethically, responders should maintain confidentiality, report findings accurately, avoid altering evidence for convenience, and disclose uncertainty. They should not retaliate against attackers, conduct unauthorised counter-intrusion, or make unsupported public accusations. Artificial intelligence may assist with alert triage, log summarisation, and pattern recognition, but outputs require human verification. Sensitive logs should not be uploaded to an unapproved service, and automated actions should have safeguards against false positives.

8. Challenges and Best Practices

Common challenges include incomplete asset inventories, poor logging, unsynchronised clocks, limited staffing, third-party dependence, cloud evidence constraints, encrypted attacker traffic, and pressure to restore systems before they are trustworthy. Organisations can reduce these difficulties by adopting the following practices:

  • maintain a current, tested incident-response plan;
  • define severity and escalation criteria in advance;
  • centralise and protect logs with appropriate retention;
  • use least privilege and multifactor authentication, especially for administration;
  • separate ordinary user administration from security and backup administration;
  • preserve evidence before destructive actions when safety permits;
  • document decisions, assumptions, times, and responsible persons;
  • test backups and recovery under realistic cyber scenarios;
  • restore into a clean, segmented environment and monitor closely;
  • conduct exercises involving technical, legal, communications, and business staff;
  • convert lessons into owned, time-bound improvements.

Chapter Summary

Incident response is a coordinated capability for managing events that threaten confidentiality, integrity, or availability. Its lifecycle consists of preparation, detection and analysis, containment, eradication, recovery, and lessons learned, with movement between phases as new evidence appears. Preparation includes plans, roles, inventories, monitoring, training, secure administration, and tested backups.

Digital forensics supports reliable understanding by preserving integrity, authenticity, documentation, and chain of custody. Volatile evidence, storage, logs, cloud records, and timelines must be collected proportionately and interpreted carefully. Cryptographic hashes help detect alteration but do not by themselves prove truth or authorship.

Resilience connects response with backup, disaster recovery, and business continuity. RTO expresses a restoration-time target, while RPO expresses an acceptable data-loss interval. Recovery must restore trustworthy services, not merely make systems available. Ethical conduct, legal advice, privacy protection, human oversight, and measurable lessons are essential to professional practice.

Key Terms

Incident: An event that actually or potentially compromises security or violates policy.

Incident response: The organised management of a security incident.

Digital forensics: The collection, preservation, examination, and interpretation of digital evidence.

Evidence integrity: The condition in which evidence remains unchanged or changes are documented.

Chain of custody: A record of evidence possession, transfer, storage, and handling.

Event: An observable occurrence in a system or environment.

Alert: An event or group of events requiring security review.

Containment: Actions that limit the spread or impact of an incident.

Eradication: Removal of malware, persistence, vulnerabilities, and unauthorised access.

Recovery: Restoration and validation of safe, reliable services.

RTO: Target time for restoring a service after disruption.

RPO: Target maximum period of data that may be lost.

Backup: A recoverable copy of data or system information.

Disaster recovery: Restoration of technology services after major disruption.

Business continuity: Continued operation of essential business processes during disruption.

Resilience: The ability to absorb, recover from, and adapt to disruption.

CSIRT: Computer security incident response team.

Cryptographic hash: A fixed-length value used to detect changes in data.

Volatile evidence: Evidence that may disappear or change when a system loses power or state.

Lessons learned: Structured review used to improve future capability.

Review Questions

Short Answer Questions

  1. Distinguish an event, an alert, and an incident.
  2. State three important preparation activities for incident response.
  3. What is the purpose of a chain-of-custody record?
  4. Define RTO and RPO.
  5. Why should recovery be performed in a clean or segregated environment?

Long Answer Questions

  1. Explain each phase of the incident-response lifecycle and show how the phases may interact.
  2. Describe a defensible process for collecting and preserving evidence from a compromised endpoint.
  3. Compare incident response, digital forensics, disaster recovery, and business continuity.
  4. Explain how ransomware can affect backup design and restoration procedures.
  5. Discuss the ethical, privacy, and legal responsibilities of an incident-response team.

Analytical / Application Questions

  1. An administrator account is suspected of compromise, but the account controls a critical production server. Analyse the containment choices and recommend a sequence of actions.
  2. An organisation has an RTO of two hours but has never tested its backups. Evaluate whether it can reasonably claim to meet the objective and propose a validation programme.
  3. A cloud audit log shows a successful login followed by mass data access. Develop an investigation plan that separates observed facts, hypotheses, evidence preservation, and notification decisions.

Multiple Choice Questions with Answers

Question 1

Which activity belongs primarily to the preparation phase of incident response?

A. Deleting all suspicious files immediately

B. Testing backups and maintaining response contacts

C. Publishing an unverified public accusation

D. Reconnecting every isolated system

Correct Answer: B. Testing backups and maintaining response contacts

Question 2

What is the main purpose of a cryptographic hash in basic forensic work?

A. To prove who created a file

B. To encrypt a file for confidentiality

C. To help detect whether data changed

D. To identify the legal owner of a device

Correct Answer: C. To help detect whether data changed

Question 3

Which action is an example of short-term containment?

A. Isolating a compromised endpoint from the network

B. Writing the final lessons-learned report

C. Replacing every system in the organisation

D. Deleting all historical logs

Correct Answer: A. Isolating a compromised endpoint from the network

Question 4

What does an RPO describe?

A. The maximum number of administrators permitted

B. The target time to restore a service

C. The target maximum amount of data loss measured in time

D. The period for which evidence must be displayed publicly

Correct Answer: C. The target maximum amount of data loss measured in time

Question 5

Why should forensic analysis normally be conducted on a verified working copy?

A. To make the original evidence easier to edit

B. To protect the original from unnecessary alteration

C. To remove the need for documentation

D. To guarantee that the suspect is identified

Correct Answer: B. To protect the original from unnecessary alteration

Question 6

Which statement best distinguishes business continuity from disaster recovery?

A. Business continuity focuses on maintaining essential processes, while disaster recovery focuses mainly on restoring technology services

B. Business continuity is only about encryption, while disaster recovery is only about passwords

C. Business continuity applies only to criminal investigations

D. Disaster recovery never involves backups

Correct Answer: A. Business continuity focuses on maintaining essential processes, while disaster recovery focuses mainly on restoring technology services

Question 7

A responder records the time, location, device identity, collector, and every evidence transfer. This primarily supports which principle?

A. Chain of custody

B. Data compression

C. Network segmentation

D. Availability monitoring

Correct Answer: A. Chain of custody

Question 8

Why can powering off a compromised computer be problematic during an investigation?

A. It always encrypts the hard drive

B. It may destroy volatile evidence such as memory and active connections

C. It permanently increases network bandwidth

D. It automatically restores deleted backups

Correct Answer: B. It may destroy volatile evidence such as memory and active connections

Question 9

Which recovery practice is most appropriate after a ransomware incident?

A. Restore immediately into the same unexamined environment

B. Reconnect all systems before changing credentials

C. Restore verified data in a clean, segmented environment and validate it

D. Ignore monitoring once files are accessible

Correct Answer: C. Restore verified data in a clean, segmented environment and validate it

Question 10

Which statement about artificial intelligence in incident response is most appropriate?

A. AI output never requires human verification

B. AI can assist triage, but sensitive data and automated actions require governance and oversight

C. AI makes evidence preservation unnecessary

D. AI can legally authorise any intrusive investigation

Correct Answer: B. AI can assist triage, but sensitive data and automated actions require governance and oversight

Basics of Cryptography and Cybersecurity
Chapter 13 of 14