Guide Cybersecurity

Ransomware attack: what to do before, during and after

A ransomware attack can halt operations, expose confidential information and cause losses that go well beyond encrypted files. Criminal groups may also steal data and threaten to publish it, even when you have backups. This guide covers the preparation controls, the first containment decisions and the investigation and recovery steps, including how to preserve evidence and assess notification duties under UK GDPR.

27 May 2026
Updated 18 November 2026
13 min read
Key takeaways
  • Ransomware groups usually steal data before encrypting it: backups fix the outage but do not remove the extortion risk
  • Isolate affected systems immediately and keep them powered on where possible to preserve evidence; power down only when safe isolation is not possible and damage continues, decided with your incident response lead
  • Immutability, isolation and offline copies are complementary controls: combine deletion protection, separate credentials, adequate retention and restore tests
  • Containment complete does not mean the attacker is gone; recovery starts with identity (Active Directory, Entra ID) from a trusted environment
  • Under UK GDPR, report a personal data breach to the ICO within 72 hours of becoming aware unless it is unlikely to result in risk, and tell individuals when the risk is high
  • Any ransom decision needs specialist legal advice, including on sanctions, and early involvement of your insurer where you have cover

Hit by ransomware: what to do in the first 30 minutes

The first minutes are for containment, not investigation. Forensics comes later, and much of it depends on evidence not being destroyed in the rush.

  1. Call your incident response lead. One person coordinates decisions and logs times and actions from the start. Use phone or another channel outside the network, which may be monitored.
  2. Isolate affected systems. Disconnect machines showing signs of encryption from the network (cable, switch port, Wi-Fi, VPN) and keep them powered on where possible.
  3. Block suspicious remote access. Disable VPN accounts, RDP sessions and supplier access that may be the way in.
  4. Protect your backups. Cut off backup repositories and consoles that are still intact and suspend deletion or rotation jobs.
  5. Do not wipe, restore or pay. Do not reimage machines, restore over compromised systems or reply to the criminals before an assessment.
  6. Bring in specialists. Contact your incident response retainer, legal counsel and, if you have cover, your insurer. Policies set their own notification windows.

These wait until later, with specialist support: forensic imaging, log analysis, scoping the compromise and assessing notification duties. Your incident response plan should set this sequence out in writing.

What ransomware does

Ransomware is malicious software that encrypts files and systems and demands payment, usually in cryptocurrency, for the decryption key. In attacks run by criminal groups, encryption is the last step. Before it, attackers get in through phishing, stolen credentials, exposed remote access services or unpatched vulnerabilities, often buying access from initial access brokers. They then map the network, escalate privileges, hunt for domain administrator accounts and locate the backups, which are a priority target. By the time the ransom note appears, the attacker may have been inside for days or weeks.

Not every attack follows the same model, and the response changes with it:

  • Encryption plus data theft. The most common model among professional groups (double extortion). Restoring backups fixes the outage, but the copied data stays with the criminals, who threaten to publish it and sometimes contact customers or the press to raise the pressure.
  • Data-theft extortion without encryption. Systems keep running and the attack can go unnoticed until the extortion message arrives. The focus is confirming what left, closing the access and assessing notification duties.
  • Wiper or destructive malware. Sometimes disguised as ransomware, it deletes or corrupts data with no realistic recovery through payment. Everything depends on intact backups and a rebuild plan.
88%
of breaches involving small and medium-sized businesses in the Verizon DBIR 2025 dataset included ransomware
44%
of all breaches analysed in the DBIR 2025 involved ransomware
US$115k
median ransom payment reported in the DBIR 2025

Source: Verizon, 2025 Data Breach Investigations Report. The percentages refer to confirmed breaches in Verizon's dataset, not to all businesses.

Before an attack: the defences that matter

No control removes all risk. The aim is to make entry harder and to make sure that, if an attacker does get in, the damage is contained and recovery is possible.

Backups that survive an attack

Immutability, isolation and air gaps are not the same thing. An immutable backup (for example, using Object Lock on object storage) cannot be changed or deleted during its retention period. An isolated backup sits in a separate environment with its own credentials and permissions, out of reach of domain accounts. An offline or air-gapped copy has no permanent connection to the network. These controls complement each other. The combination to aim for is protection against change and deletion, separate credentials and permissions, retention long enough to cover the time an attacker may have been inside, and restore tests.

Immutability does not prove that a copy predates the compromise, is clean, or can be restored. Only testing shows that. Run regular restore exercises for critical systems, measure the real time taken and compare it with the RTO (maximum acceptable downtime) and RPO (maximum acceptable data loss) the business has set.

Risk-based patch management

Many attacks exploit known vulnerabilities that already have a published fix; the attacker rarely needs a zero-day. An internal policy can set reference timelines, for example 48 hours for critical, 7 days for high and 30 days for medium severity. Those numbers are illustrative only. Real prioritisation should weigh internet exposure, known active exploitation (CISA's Known Exploited Vulnerabilities catalog is a good reference), business criticality and available compensating controls. VPN gateways, firewalls and remote access services usually sit at the top of the queue.

MFA on every external-facing service

Require MFA on VPN, Microsoft 365 or Google Workspace, cloud consoles, remote access and any internet-facing web application. Prefer phishing-resistant methods such as passkeys or FIDO2 security keys over SMS codes. See our MFA guide.

Network segmentation

In a flat network, where every system can talk to every other, one compromised workstation can reach backup servers, domain controllers and finance systems without restriction. Separate production, backup, guest Wi-Fi and operational technology into zones with firewall rules between them. At minimum, stop user workstations reaching backup infrastructure and restrict domain controller administration to dedicated management hosts.

Endpoint detection and response

EDR platforms detect behaviour typical of ransomware, such as shadow copy deletion, lateral movement tooling and LSASS memory access for credential theft, and can isolate a device automatically. The value depends on someone watching the alerts, including out of hours.

A written, tested incident response plan

Document who decides, how to isolate each type of system, out-of-hours contacts (incident response retainer, legal counsel, insurer) and communication templates. Keep an offline, printed copy, because ransomware often hits network shares and cloud-synced documents. Test the plan at least once a year with a tabletop exercise.

During an attack: containment and first decisions

Isolate without destroying evidence

Isolate affected systems immediately: disable the network interface, pull the cable, shut the switch port or remove the device from wireless. Keep them powered on where possible. Memory can hold volatile evidence such as running processes, active connections and, in some cases, key material. If several segments are affected, isolating at the switch or firewall may be faster than working machine by machine.

Keeping systems on is not an absolute rule. If a device cannot be isolated safely and encryption or data destruction is continuing, powering it down may be necessary. Make that call with your incident response lead, weighing lost evidence against ongoing damage. The CISA #StopRansomware guide takes the same line: isolate immediately, and power down devices you are unable to disconnect from the network.

Credentials: reset to a plan, not on impulse

Disable an identified entry point, such as a compromised VPN account, straight away. Resetting privileged credentials (domain admins, service accounts, Entra ID administrators) is different: it should follow a coordinated containment plan and be done from trusted, clean admin workstations, never from compromised devices. Changing passwords while the attacker still controls the domain can simply alert them, or hand them the new passwords.

Safety-critical systems

In healthcare, manufacturing and operational technology (OT) environments, disconnecting a system can affect patients, equipment or physical safety. Containment there has to be coordinated with clinical or operational owners, with manual fallback procedures agreed in advance.

Decision table by stage

1
Detection
Confirm the alert and call the incident response lead. Record the time, alert source and first affected systems.
2
Containment
Isolate systems and suspicious remote access, protect backups. Log what was isolated, by whom and when, and any decision to power down.
3
Preservation
Capture memory and disk images of key systems and keep firewall, VPN, EDR and cloud logs. Maintain chain of custody and extend log retention.
4
Scope assessment
Identify the entry vector, compromised accounts, systems accessed and whether data left. Output: affected systems and data, with confidence level.
5
Legal assessment
Assess UK GDPR, sector rules, contracts, sanctions and the policy. Output: documented decision on notifying the ICO, individuals, regulators and insurer.
6
Recovery
Rebuild identity from a trusted environment, then restore by business priority. Use validated backups and clear release criteria for each system.
7
Monitoring
Keep heightened watch for weeks on accounts, persistence mechanisms and outbound traffic. Decide when to close the incident on evidence.
8
Post-incident
Run the post-incident review. Output: remediation plan with owners and deadlines.

Preserve evidence

Before wiping or rebuilding anything, capture forensic images of the key affected hosts and keep Windows event logs, PowerShell history, and firewall, VPN, EDR and cloud service logs. Many logs roll over within days, so extend retention early. This evidence supports scoping, the ICO report, the insurance claim and any police investigation.

Insurer and authorities

Policies set their own deadlines for notifying the insurer and often name approved responders, so check before engaging third parties. Report the incident to the NCSC and to the police. Legal duties are covered in the recovery section below and in our guide to incident notification duties.

Facing the ransom demand

The ransom note creates urgency on purpose, with countdown timers and threats to publish. Negotiation with specialist support can be part of the response: it buys time, helps establish what the group actually holds and lets you demand proof. Negotiating does not mean payment will be necessary.

Before any payment decision

Sanctions. Some ransomware groups and their members are designated under UK, US or EU sanctions. UK financial sanctions, enforced by OFSI on a strict liability basis, apply to UK companies. Whether US or EU regimes also apply depends on the jurisdictional nexus, the parties, any intermediaries and the payment route. Get specialist legal advice and involve your insurer where you have cover. The government has also announced plans to ban payments by public sector bodies and critical national infrastructure operators; check the current position.

No guarantees. Paying does not guarantee a working key or deletion of stolen data. We set out the arguments in Ransomware: should you pay?

Internal communication

Limit details to those who need them. Give staff a short note on what to do and what to avoid (for example, not powering off or restarting devices on their own initiative), and use channels that do not depend on the compromised environment.

After an attack: recovery, notification and lessons

Containment complete is not attacker eradicated

Containment stops the attack spreading. Eradication means reasonable confidence that the attacker has been removed from the environment: persistence mechanisms removed, compromised credentials reset and the entry vector closed. A clean EDR scan does not prove a system is clean, because scheduled tasks, attacker-created accounts, legitimate remote access tools and stolen credentials slip past scans. If the attacker keeps any persistence, restoring simply restarts the attack.

Trusted recovery environment, identity first

Recover from an environment you trust: clean admin workstations, an isolated recovery network and validated media and installers. Identity infrastructure comes first, because almost everything depends on it. That means recovering or rebuilding Active Directory, resetting the KRBTGT account password twice, reviewing Entra ID administrators and service accounts, and checking synchronisation between the two. Then restore by business priority. Our ransomware recovery guide covers the sequence in detail.

Planning recovery time

There is no reliable average. Recovery time depends on your RTO and RPO, backup integrity and the dependencies between systems. A planning example: the identity service is restored in 4 hours, within its RTO, but the ERP, file server and VPN all depend on it and must be restored and validated in sequence, which takes two more days. If the last clean backup is a week old, your real RPO is a week, whatever the document says. Map those dependencies and test them before an incident.

Notification obligations

UK GDPR. Encryption of personal data is a personal data breach (a loss of availability) even if nothing is stolen. You must report it to the ICO within 72 hours of becoming aware, unless it is unlikely to result in a risk to individuals' rights and freedoms. Where the risk is high, Article 34 requires you to tell affected individuals without undue delay. Ransomware does not trigger a report automatically, but you need a documented assessment either way. You can report in phases: investigation should not be used to delay notification without justification once you know enough.

Sector rules and contracts. Operators of essential services and relevant digital service providers have incident reporting duties under the NIS Regulations, and FCA- and PRA-regulated firms must tell their regulator about material incidents. Under PCI DSS, Requirement 12.10 calls for an incident response plan that includes procedures for notifying payment brands and acquirers; deadlines depend on each brand and your acquirer contract, and there is no single universal deadline. Customer and supplier contracts may add further notice duties. See breach notification deadlines by country.

Post-incident review

Run a structured post-incident review within two weeks of containment. It should identify the entry vector and the control that failed, why detection did not happen sooner, where the response plan worked or failed, and which changes prevent a repeat. Every action needs a named owner and a deadline. The aim is to fix causes, not to assign blame.

Every ransomware post-mortem uncovers absent controls and gaps in coverage. The work after recovery is identifying those gaps and closing them before the next attempt.

Cyber insurance review

Cover depends on the policy terms, the representations you made when buying it, the exclusions and the circumstances of the incident. Some policies cover forensics, recovery and business interruption; treatment of ransom payments and fines varies widely. After the incident, check what was actually covered, whether your statements about controls such as MFA and backups match reality, and whether the limits reflect the real cost of a recovery.

What most businesses get wrong

  • Backups reachable from the domain. If a compromised domain admin account can delete the backup, so can the attacker.
  • Backups never restored. Jobs completing without errors do not prove data can be recovered in the time you need.
  • RDP open to the internet. Remote access should go through a VPN or gateway with MFA, never an open port 3389.
  • No segmentation between IT and OT. Ransomware that reaches OT systems can stop physical operations, not just data.
  • Restoring before eradicating. Putting systems back on the network before the attacker's access is closed usually means reinfection.
  • No escalation path. Attacks often start at night or at weekends. The on-call person needs to know who to call, who can take systems offline and where the policy number is, in a printed document.

The ICO publishes guidance on breach reporting and the NCSC publishes ransomware guidance for organisations. The No More Ransom project offers free decryption tools for some variants. Ransomware defence rests on the same foundations as the rest of a security programme, and a cybersecurity roadmap sequences them as connected workstreams.

Frequently asked questions

Should we pay the ransom?

Law enforcement agencies including Europol, the NCSC and the FBI advise against paying. Payment does not guarantee a working key or deletion of stolen data, funds further attacks and can mark you as willing to pay. With clean, tested backups, payment is rarely necessary. Without workable backups, involve incident response specialists before deciding, check the No More Ransom project for a decryptor for the variant, take specialist legal advice on sanctions and involve your insurer where you have cover. See Ransomware: should you pay?

When does UK GDPR require us to notify the ICO after a ransomware attack?

When personal data is affected, you must report to the ICO within 72 hours of becoming aware of the breach, unless it is unlikely to result in a risk to individuals. Encryption alone counts as a breach of availability, so you need a documented risk assessment even if nothing appears to have been stolen. Where the risk to individuals is high, Article 34 requires you to tell them without undue delay. You can report in phases as facts emerge; the investigation should not be used to delay notification without justification once you know enough. Sector rules and contracts may add further duties.

How long does recovery from a ransomware attack take?

There is no reliable average. It depends on your RTO and RPO, backup integrity, the dependencies between systems and the time needed to confirm the attacker has been removed. Identity (Active Directory, Entra ID) is usually restored first, and the systems that depend on it take longer to return and validate. Restoring before eradication is complete raises the risk of reinfection. Our recovery guide sets out the sequence.

What is double extortion ransomware?

It is the model in which the attacker copies sensitive data before encrypting systems, then demands payment both for the key and for a promise not to publish what was stolen. Even an organisation with perfect backups remains exposed to the leak. Some groups also contact customers, partners or the press to raise the pressure, and others steal data without encrypting anything. That is why monitoring outbound transfers and limiting access to sensitive data matter as much as backups.

What does a ransomware incident response plan need to include?

Named roles with out-of-hours contacts; isolation procedures for each class of system, including who may decide to power devices down; criteria for escalating to leadership; the restoration order for critical systems, starting with identity; contacts for your incident response retainer, legal counsel, insurer and authorities; and communication templates for customers, staff and the ICO. Keep an offline copy and test the plan at least once a year. See our guide to building an incident response plan.

Ryland Deakin
About the author
Lead Consultant, Cyvra · CISM · CompTIA Security+ · MCP

Ryland has delivered cybersecurity, compliance, and IT management programmes for regulated organisations across the UK and the Netherlands for over 20 years. View full profile

Talk to Cyvra

Build your ransomware defences before you need them

We help businesses in the Netherlands and UK assess backup resilience, test incident response plans, and close the gaps attackers exploit most often.

Disclaimer: This article is for general informational purposes only and does not constitute legal, regulatory, or professional advice. Cyvra makes no warranty as to the accuracy or completeness of this content, which may not reflect the most current regulatory developments. Readers should seek independent legal and regulatory advice appropriate to their specific circumstances. Cyvra accepts no liability for any loss arising from reliance on this content.