Ransomware has moved a long way from a handful of infected floppy disks. Today, it is a global criminal industry, and artificial intelligence is now reshaping both sides of the fight. Attackers are using AI to write more convincing phishing emails, clone voices, and rewrite malicious code so it slips past antivirus tools. Defenders are using the same technology to spot an intrusion in seconds rather than days.

This article looks at how ransomware attacks have evolved since the 1980s, how criminals are using AI and machine learning, and how security teams are using the same tools to fight back. It also covers what this means specifically for UK and Irish organisations, including the NHS, the HSE, and the new rules on ransom payments that came into force in 2025, as well as the practical limits of AI-based defence and where the threat is heading next.

The Four Eras of Ransomware Evolution

Ransomware attacks didn’t appear overnight. The threat has moved through four distinct phases, each faster and more organised than the last, which is worth knowing because AI isn’t a sudden shock, but the next step in a pattern already years in the making.

From Floppy Disks to WannaCry: The Pre-AI Era

The first documented ransomware attack dates back to 1989, when biologist Joseph Popp distributed roughly 20,000 infected floppy disks to attendees of a World Health Organisation AIDS conference, encrypting file names on victims’ machines and demanding payment sent to a PO box in Panama. For the next two decades, ransomware stayed a niche, technically clumsy threat.

That changed in 2013 with CryptoLocker, which paired strong encryption with Bitcoin payment and proved that ransomware could be genuinely profitable at scale. Then came WannaCry in 2017, a self-propagating worm that exploited an unpatched Windows vulnerability and hit over 200,000 computers in 150 countries within a single weekend, including large parts of the NHS. WannaCry marked the point where ransomware stopped being a one-victim-at-a-time crime and became capable of taking down entire networks.

The Rise of Ransomware-as-a-Service and Early Machine Learning

After WannaCry, the criminal economy professionalised. Ransomware-as-a-Service (RaaS) platforms such as LockBit let low-skilled criminals rent ready-made ransomware kits and split the profits with the developers, dramatically widening the pool of people capable of running a ransomware attack. The NCSC assessed LockBit as the most deployed ransomware strain in the UK as recently as 2022. It was during this RaaS boom that machine learning first appeared on the attacker’s side, mainly to automate reconnaissance and pick out which victims were most likely to pay.

How Attackers Are Weaponising AI

AI hasn’t invented new categories of ransomware attacks. What it has done is remove the manual effort and specialist skill that used to limit the number of attacks a criminal group could run at once. The result is more attacks, launched faster, and harder to spot before the damage is done.

Hyper-Personalised Social Engineering and Deepfakes

Generative AI lets criminals write phishing emails with none of the spelling mistakes or odd phrasing that used to give the game away, and produce them in dozens of languages in minutes. IBM’s 2026 Cost of a Data Breach Report found that one in four malicious breaches now involve AI in some form, most commonly through phishing and deepfake impersonation, and that these AI-enabled breaches cost an average of $6 million, roughly $1 million more than the global norm.

The April 2025 attacks on Marks & Spencer, Co-op and Harrods showed exactly how this plays out without any exotic technology at all. The attackers, a group known as Scattered Spider, didn’t hack a firewall. They phoned a third-party IT helpdesk, convincingly impersonated a genuine employee to talk a support agent into resetting a password, and used that single foothold to deploy DragonForce ransomware across M&S’s systems. The Cyber Monitoring Centre later classified the M&S and Co-op incidents as a single combined cyber event, with damage estimated at up to £440 million. As AI-generated voices and cloned writing styles become harder to tell from the real thing, this kind of social engineering only gets more convincing.

Polymorphic Malware: Evasion at Machine Speed

Machine learning also helps ransomware rewrite its own code on the fly, a technique known as polymorphic malware. Each version of the file looks slightly different to antivirus software, even though it does exactly the same thing once it runs. Where a human malware author might produce a handful of variants a week, a machine learning model can generate thousands, making signature-based detection (matching known bad files against a list) far less reliable than it once was. This is one of the reasons ISS recommends layered antivirus and endpoint protection rather than relying on a single tool.

Automated Target Selection and Vulnerability Discovery

AI is also changing how criminals choose their targets in the first place. Automated scanning tools can now sweep the internet for exposed systems, cross-reference the results against company financial data, and rank targets by how likely they are to pay and how quickly. The NCSC’s assessment of the near-term impact of AI on cyber threats concluded that AI will almost certainly shorten the gap between a vulnerability being disclosed and being exploited, because AI-assisted vulnerability research makes it faster to find and weaponise flaws in code or configuration.

The Defensive Response: Machine Learning as a Shield

Ransomware Attacks, The Defensive Response

The same properties that make AI useful to attackers, speed and pattern recognition at scale, make it just as useful to the people defending against them. Most modern endpoint protection and network monitoring tools now rely on machine learning rather than static rules.

Behavioural Analysis vs Signature-Based Detection

Traditional antivirus software worked by comparing files against a database of known threats, which is exactly the weakness that polymorphic malware exploits. Behavioural detection tools take a different approach: instead of asking “have we seen this file before,” they ask “is this program acting like ransomware.” Mass file encryption, sudden changes to file extensions, and attempts to delete backup shadow copies are all patterns a trained model can flag within seconds, often before more than a handful of files have been touched. Understanding how encryption itself works helps explain why catching an attack at this exact moment matters so much: once files are properly encrypted, recovery without the criminal’s key becomes very difficult.

Predictive Analytics: Stopping the Attack Before Encryption

A newer generation of tools goes a step further, trying to predict an attack before encryption even begins by monitoring the early stages of an intrusion: unusual login times, lateral movement between servers, or a spike in outbound data transfer that might indicate exfiltration. This pre-execution capability directly answers one of the most common questions organisations ask: yes, machine learning can genuinely stop some ransomware before it encrypts a single file, though it isn’t a guarantee, and it works best as one layer within a wider security strategy rather than as a replacement for basics like patching and backups.

The UK and Ireland Context: Regional Threats and Regulation

Most ransomware coverage online is written for a US audience and talks about generic “enterprises.” UK and Irish organisations are working under their own regulatory pressures and painful case studies, and both are worth understanding on their own terms.

The NHS, the HSE and the Cost of Healthcare Ransomware

Healthcare remains the most expensive sector for any kind of data breach, at $6.64 million on average globally according to IBM’s 2026 report, for the thirteenth year running. Ireland’s Health Service Executive learned this the hard way in May 2021, when the Conti ransomware group encrypted its systems nationwide, cancelling appointments and forcing hospitals back onto paper records for weeks. The HSE has since put the total cost of recovery at around €102 million, with the Comptroller and Auditor General estimating a further €657 million needed in cybersecurity upgrades over seven years. Compensation payments to affected patients only began in late 2025, more than four years after the attack.

The UK’s Ransomware Payment Ban and Reporting Rules

The UK government confirmed in July 2025 that it would proceed with the world’s first outright ban on ransomware payments by public-sector bodies and regulated critical national infrastructure operators, including the NHS, schools, and local councils. Around three-quarters of respondents to the government’s public consultation supported the move. Organisations outside the ban will instead face a mandatory reporting regime, meaning they must notify the authorities before making a payment so it can be checked against sanctions lists.

The stated aim, in the words of Security Minister Dan Jarvis, is to hit the criminal business model in its wallet rather than punish the victims of a ransomware attack. Anyone drafting or reviewing an incident response plan for a UK public body needs to build this ban into their playbook now, not after the next ransomware attack lands.

The Limits of AI Defence

It’s tempting to treat AI as a fix for the ransomware problem. It isn’t. Machine learning tools are genuinely useful, but they come with their own operational costs and their own new attack surface, both of which are routinely left out of vendor marketing.

False Positives and Security Team Fatigue

Behavioural detection models are tuned to flag anything that looks unusual, which means they also flag a lot of perfectly normal activity: a finance team running a bulk file export at month-end, or an IT admin performing a legitimate mass update. Security teams already stretched thin end up chasing false alarms, and the risk is that a genuine ransomware attack gets missed in the noise, or that alert fatigue leads staff to dismiss a warning that turns out to be real.

Adversarial Machine Learning: Poisoning the Model

Attackers are also starting to target the defensive models themselves. In an adversarial machine learning attack, criminals feed a detection system carefully crafted data designed to make it misclassify malicious files as safe, effectively teaching the model to look the other way. This remains a fairly specialist technique for now, but the NCSC has flagged it as a growing concern as more security tools come to depend on machine learning rather than fixed rules.

In practice, it means vendors can no longer treat a machine learning model as a set-and-forget feature. The training data behind a detection engine and the way that engine is monitored for drift over time matter just as much as the algorithm itself.

What Comes Next: The Generative AI Arms Race

The near-term outlook, based on the NCSC’s own assessment, is more of the same trend than a sudden leap: AI will almost certainly continue to increase the volume and impact of ransomware attacks between now and 2027, mainly by making existing tactics faster and more convincing rather than inventing entirely new ones.

Large language models are likely to keep improving phishing and vishing scripts, automate more of the reconnaissance stage, and help less-experienced criminals run attacks that previously required a skilled team. On the defensive side, expect wider use of AI to compress detection times and prioritise which alerts genuinely need a human to look at them, since that combination has already been shown to cut both breach costs and the time it takes to contain an incident.

None of this is likely to arrive as a single dramatic breakthrough. The NCSC’s own assessment is explicit that the shift is evolutionary rather than revolutionary: AI enhances tactics that already work rather than replacing them wholesale. For an IT manager in Manchester or a school administrator in Dublin, that’s arguably the more useful way to think about the threat. The fundamentals that stopped ransomware attacks five years ago, patched systems, tested backups, and staff who question an unexpected password reset request, still stop the large majority of attempts today. AI raises the volume and polish of what gets thrown at an organisation, but it hasn’t rewritten the rules of good defence.

Building Ransomware Resilience: A Practical Checklist

Ransomware Attacks, Checklist

None of this means AI has made ransomware unstoppable. The organisations that come through a ransomware attack with the least damage are consistently the ones that got the basics right long before an attacker showed up. A short audit worth running against your own organisation:

  • Do you have offline, tested backups that a ransomware attack couldn’t reach or encrypt?
  • Is multi-factor authentication enforced on every remote access point, not just the obvious ones?
  • Does your helpdesk have a verification process for password resets that can’t be talked around by a confident phone call?
  • Have you patched the vulnerabilities the NCSC and vendors have already disclosed, rather than the ones still waiting for a fix?
  • Do you have a written incident response plan, and has anyone actually rehearsed it?
  • If you’re a UK public body or CNI operator, does your plan reflect the ransomware payment ban rather than assume payment is an option?
  • Do you have a policy covering employee use of generative AI tools, given how much company data can end up inside them?

Strengthening password practices across an organisation remains one of the cheapest ways to close off the credential-based access that groups like Scattered Spider rely on.

Ransomware attacks aren’t going away, and AI is making the people running them faster and harder to spot. The organisations that treat this as a reason to double down on backups, access controls, and a tested response plan, rather than waiting for a single AI tool to solve the problem, are the ones that will come out the other side of the next incident with the least damage done.

Frequently Asked Questions about Ransomware Attacks and AI

How is AI used in ransomware attacks?

Criminals use generative AI to write more convincing phishing emails and clone voices for social engineering, and to rewrite malicious code so it evades antivirus detection and to automate the process of scanning for and ranking vulnerable targets.

What is the evolution of ransomware over the last decade?

Ransomware moved from opportunistic, single-victim attacks in the 2010s to an organised Ransomware-as-a-Service industry, where developers rent out ready-made kits to affiliates. AI is now the latest layer on top of that model, automating tasks that previously needed a skilled operator.

Can machine learning detect ransomware before it encrypts files?

It can, using behavioural analysis and predictive models that flag the early stages of an intrusion, such as unusual lateral movement or a spike in data transfer, before mass encryption begins. It reduces risk considerably, but it isn’t a guarantee on its own.

What are the four stages of a modern ransomware attack?

Reconnaissance and initial access, lateral movement and privilege escalation, data staging and exfiltration, and finally encryption and extortion. AI now speeds up the first three stages in particular.

Is AI-powered ransomware a threat to small and medium businesses in the UK?

It is, and arguably more so than for large enterprises. Automation lowers the cost of running an attack, which makes smaller organisations with weaker defences profitable targets even at lower ransom amounts. Verizon’s 2025 Data Breach Investigations Report found ransomware present in 88 per cent of the breaches it recorded among small and medium-sized businesses.

What does the NCSC say about AI and ransomware?

The NCSC’s near-term threat assessment concludes that AI will almost certainly increase the volume and impact of ransomware attacks through to 2027, largely by making existing techniques like phishing and vulnerability exploitation faster, rather than by creating fundamentally new attack methods. Full guidance on preventing and responding to an attack is available through the NCSC’s ransomware hub.