Security

Ransomware

Ransomware is a type of malware that encrypts the files or locks the systems of a victim and demands a ransom in exchange for restoring access.

In this post

Ransomware is a malicious program that encrypts the files of a person or an organisation and demands a payment, usually in cryptocurrency, in exchange for the key to recover them. The word combines ransom and software, and it amounts to taking data hostage. What is held hostage is not a person, but the information that is needed to work. It is today one of the most profitable and destructive threats in the digital landscape.

Today’s attacks are far more complex than simple encryption. Criminal groups get into the network, explore it for days or weeks, steal valuable data, destroy or encrypt any backups they find and only then encrypt the systems. Afterwards they leave a note with the amount demanded, a deadline and a threat to publish the stolen information. It is a business operation, with roles, tools and negotiators.

Ransomware is a kidnapping of your files and your business. They ask you for money for the key, and they often also threaten to publish what they have taken.

What is ransomware?

The technical principle on which ransomware is based is simple. A program goes through the disks, encrypts each document with a key that only the attackers know, and deletes or disables the easy-to-recover copies. The victim sees that their files will not open, and finds a message on the screen. Without the key, recovering the data is practically impossible, because modern encryption methods are the same ones that protect banking communications.

The criminal evolution of ransomware has been spectacular. At first, they were mass attacks against individuals, with ransoms of a few hundred euros. Over time, criminals discovered that it was far more lucrative to attack companies, hospitals and public bodies, which cannot afford to stop. Ransoms grew to hundreds of thousands or millions, and specialised groups appeared that rent out their tools to other criminals and share the profits.

From simple encryption to triple extortion

The first attacks were limited to encrypting files and asking for money for the key. Victims with backups could recover without paying, so the criminals added pressure. In double extortion, they steal data before encrypting it and threaten to publish it if the ransom is not paid, so the backup is no longer enough. Triple extortion adds another threat, such as a traffic flooding attack or contacting the victim’s customers and partners. There is also ransomware that only locks access to the device without encrypting anything, and ransomware that simply steals data without encrypting it. Each variant changes the defence that is needed. Backups protect against encryption, but data theft calls for access controls, monitoring of outgoing data and a communication plan in case of a leak.

How ransomware has evolved and what defense each stage needs

In Europe, a leak of personal data also requires notifying the data protection authority and, in serious cases, the affected individuals themselves.

Ransomware as a service

The business has become professional through a franchise model. Developers build the program and the payment and negotiation infrastructure, and rent it out to affiliates who carry out the attacks in exchange for a share of the ransom, usually between twenty and thirty per cent for the developer. This is the model known as ransomware as a service. It splits the work among specialists. Some obtain access and sell it, others carry out the attack and others handle the negotiations. It explains why attacks have grown so much and why dismantling one group does not end the problem, since affiliates switch brands easily.

Types of ransomware by effect

The types of ransomware differ in what they do to the data or the device of the victim, and each type requires a different defence. Backups solve encryption, but they are useless against someone who threatens to publish what they have stolen.

Crypto ransomware

Crypto ransomware is the most common type and makes files unreadable until the key is paid for. WannaCry, in 2017, encrypted hundreds of thousands of computers in more than one hundred and fifty countries by exploiting an unpatched Windows flaw, and families such as LockBit dominated attacks against companies in the years that followed.

Screen lockers

Locker ransomware does not encrypt files, but prevents the device from being used with a screen that cannot be closed. It was typical between 2011 and 2014, with families such as Reveton, which displayed a fake police notice accusing the victim of a crime and demanded a fine to unlock the computer.

Leakware or extortion without encryption

Leakware, or doxware, focuses on stealing information and threatening to publish it, sometimes without encrypting anything. Some groups have abandoned encryption entirely because it is the noisiest part of the attack, and they simply copy customer databases or internal documents and demand a payment for not releasing them.

Wipers disguised as ransomware

Some programs that present themselves as ransomware are actually wipers, which destroy the data with no possibility of recovery even if the ransom is paid. NotPetya, in 2017, displayed a ransom note, but its encryption could not be reversed, and it caused damage valued in the billions to shipping lines, pharmaceutical firms and logistics companies.

Attacks on virtualisation servers

A recent variant directly targets virtualisation servers, where a single machine hosts dozens of virtual machines. In February 2023, the campaign known as ESXiArgs encrypted thousands of VMware ESXi servers exposed to the internet and left unpatched, and with them all the machines they contained.

Mobile ransomware and scareware

There are also variants for mobile devices, which lock the phone screen or encrypt the memory card, such as Simplocker on Android in 2014. Scareware, for its part, only pretends to have encrypted something or to have detected an infection in order to frighten the victim and collect money, without causing any real damage.

How an attack unfolds

Initial access to the network

Ransomware attackers always look for the easiest route. An email that tricks an employee into opening an attachment or typing their password on a fake website. Remote access, such as a private connection or a remote desktop, protected only by a password.

A password leaked in another breach and reused for remote access also works. Or a known flaw in an internet-facing device that has not been updated. Almost every successful attack starts down one of these paths.

The most organised groups do not always break in themselves. They buy access from specialised intermediaries, the so-called initial access brokers, who sell credentials or backdoors into company networks that have already been compromised.

Lateral movement and data theft

Once inside, attackers do not encrypt straight away. They explore the network, look for accounts with more privileges and locate the backups and the most valuable data. Days or weeks can go by, especially if nobody is watching. During that time they copy the data they will later use as leverage, and they prepare the moment of encryption, which usually falls on a weekend or a public holiday, when fewer staff are paying attention.

This phase is an opportunity for the defenders. Decoy files that nobody should ever touch raise the alarm as soon as the program starts encrypting them. A detection system that watches for anomalous behaviour, such as an account accessing hundreds of folders or an unusual data transfer, can raise the alert in time. Many attacks would have been stopped if someone had paid attention to the alarms in the preceding days. That is why monitoring internal activity is as important as protecting the way in.

Encryption and extortion

In the end, the attackers launch encryption simultaneously on many machines, usually after disabling the protections. Technically, almost all of them use hybrid encryption. Each file is encrypted with a fast symmetric key, such as AES, and those keys are in turn encrypted with the attackers’ public key, so that only they can recover them. Many also delete the Windows shadow copies with commands such as vssadmin delete shadows, and some encrypt only parts of each file to finish sooner. The victim finds the network paralysed. Then comes the negotiation, in which the criminals apply pressure with deadlines, threats of publication and discount offers. Some even offer a customer service desk. It is a technique designed to make the victim decide under stress, without thinking. Against that pressure, the most valuable thing is to have a plan beforehand. Knowing who decides, who deals with the authorities and with specialists, what is communicated to customers and employees, and how to restore from backups. Organisations that have prepared and rehearsed that plan still have a hard time, but they recover. Those that improvise take much longer and spend considerably more money.

Ransomware and websites

Websites can also be badly affected by a ransomware attack. A compromised server can be encrypted entirely, leaving the website and its database inaccessible. More often, a website is the starting point, through a vulnerable extension, an outdated module or a weak password. And owners of business websites and online shops depend on their customer data, orders and content, the loss of which can be an enormous blow.

The specific defence for a website is a solid backup system. They must be made frequently, be immutable, so that nobody can delete or change them for a set period, and be stored off the server and out of reach of the accounts that manage the website, so that an attacker with access cannot destroy them. And they must be tested by restoring them. A backup that has never been restored is just a promise. With a good backup, a data hostage attack becomes a bad day, not a catastrophe.

How a website recovers after ransomware with isolated backups

The usual website security measures also help a great deal. Updates, unique passwords, a second factor, minimal permissions and a web application firewall. On the server, separation between different websites and tight permissions limit what a malicious program can encrypt. And a written response plan, with specialist contacts, avoids losing decisive hours at the hardest moment, when the pressure is at its peak.

To pay or not to pay, and checking that you are prepared

The decision whether to pay

It is the question every victim asks, and the authorities in almost every country recommend not paying. Paying funds the criminals, does not guarantee getting the data back, since some keys do not work or take a long time, and can mark the victim as a payer for new attacks. In some cases, payment may also breach international sanctions.

Even so, some organisations pay because they see no other way out, especially when they have no usable backups. The best way to avoid having to decide is to be prepared, with isolated and tested backups, a response plan and contacts with advisers and the authorities. Consulting an expert and the insurer before making a decision is always the prudent course.

What to do in the first hours of a data hostage attack

The first thing to do in a ransomware attack is to isolate. The affected machines must be disconnected from the network, without shutting them down if possible, because memory may hold evidence and even keys. Then the response team is alerted, the logs and the ransom note are preserved and the variant is identified, something made easier by free services such as ID Ransomware or the No More Ransom project, which offers decryptors for many older families.

In Spain, INCIBE’s 017 helpline and the cybercrime units of the National Police and the Civil Guard handle these cases. If personal data is affected, the law requires notifying the Spanish Data Protection Agency within seventy-two hours.

Before restoring, you must make sure the attacker is no longer inside and that the backups do not contain the program, because restoring onto a network that is still compromised only repeats the disaster. When the attacker has already got in, WordPress disinfection has to be thorough so that the infection does not come back.

How to tell whether you are prepared

To find out whether you are prepared for ransomware, ask yourself three questions. If all your files were encrypted tomorrow, would you have a recent backup out of the attack’s reach? Would you know how long it would take to restore it? And who decides what happens next? If you cannot answer any of them with confidence, that is your first task. Testing a real restore, at least once a year, is the best way to turn an intention into a guarantee.

Also review your remote access and your administrator accounts. Do they all have a second factor? Are there old access points that are no longer used? Do administrators have separate accounts for day-to-day work? Most attacks start with a stolen credential on an account without additional protection. Closing those doors costs little and blocks the most common way in for criminal groups.

And prepare your people, who are the first line of defence. An employee who can recognise a suspicious email and feels comfortable reporting a wrong click is worth more than many programs. Drills, support from management and a blame-free culture encourage incidents to be reported early. In the Irish case, the warning signs were there. What was missing was a process to turn those signs into action in time.

How ransomware was born and became a profession

The first known ransomware was distributed in 1989 on floppy disks posted to people who had attended a conference on AIDS. The so-called AIDS trojan, created by the biologist Joseph Popp, hid the names of the files after a number of reboots and asked the victim to send 189 dollars to a post office box in Panama.

The ransomware business really took off with the arrival of cryptocurrencies. CryptoLocker, in 2013, combined strong encryption with payments in bitcoin, and in 2017 WannaCry and NotPetya spread on their own across hundreds of thousands of computers by exploiting a Windows vulnerability. In 2019, the Maze group popularised double extortion, and in 2021 the attack on Colonial Pipeline left part of the east coast of the United States short of fuel.

The international response to ransomware has also grown. In 2016 the No More Ransom project was launched, offering free decryption tools, and in February 2024 an operation coordinated by the UK’s National Crime Agency and the FBI took control of the infrastructure of LockBit, then the most active group in the world.

An attack that paralysed an entire country’s public health service

On 14 May 2021, Ireland’s public health service, known by its initials HSE, suffered a ransomware attack by the Conti group. The attackers had got in weeks earlier, through an email with an attachment opened by an employee. During that time, they moved through the network undetected. When they launched the encryption, they hit a large part of the IT systems of the country’s hospitals and health services.

The consequences of the attack for patients were serious. Hospitals could not access medical records, lab results or appointment systems. Consultations and tests were cancelled, and staff went back to paper and the telephone for weeks. The institution made a much-discussed decision. It refused to pay the ransom, reported to be around 20 million dollars, and the government backed that stance. Some time later, the attackers handed over the decryption key without charging for it.

An independent report by a consultancy, published in December 2021, analysed what had happened. It concluded that around 80 per cent of the IT environment had been encrypted. It identified warning signs that did not get a timely response, a heavy reliance on legacy systems and the lack of a response plan. The HSE itself estimated that the total cost could be around one hundred million euros, not counting the investment needed to improve its security.

The case is now studied by security teams around the world. It showed that an attack can paralyse a national health system, that refusing to pay is possible but costly, and that recovery can take months. It also showed that basic defences, such as a second factor, monitoring and keeping systems updated, would have greatly reduced the impact. The public account of the incident helped other institutions strengthen their own defences.

Frequently asked questions

Frequently asked questions about Ransomware

What is ransomware?

It is a malicious program that encrypts the files of a person or an organisation and demands a payment, usually in cryptocurrency, in exchange for the key to recover them. Many groups also steal the data before encrypting it and threaten to publish it if the ransom is not paid.

Where does the word ransomware come from?

It combines the words ransom and software. The image is that of a kidnapping, except that what is held hostage is not a person but the information an organisation needs to keep running.

How does ransomware get into an organisation?

Usually through deceptive emails with attachments or links, poorly protected remote access, stolen or reused passwords and unpatched security flaws. Once inside, attackers often spend days or weeks exploring the network before encrypting anything.

What is ransomware as a service?

It is a franchise model in which developers build the program and the payment and negotiation infrastructure, and rent it out to affiliates who carry out the attacks in exchange for a share of the ransom. It explains why attacks have grown so much and why dismantling one group does not end the problem.

Should you pay a ransomware ransom?

The authorities advise against it. Paying does not guarantee getting the data back, it funds the criminals and it marks the victim as someone who pays. Even so, some organisations do pay out of necessity. The best option is not to depend on that decision, by having backups that allow recovery without paying.

What is double extortion in ransomware?

It is the practice of stealing the data before encrypting it and threatening to publish it if the ransom is not paid. That way, even if the victim can restore from backups, they remain under pressure because of the possible leak. Today it is standard practice in attacks by professional groups.

What is the best defence against ransomware?

Isolated and tested backups, up-to-date patches, a second factor on all remote access, minimal permissions, training against deceptive emails, network segmentation and a rehearsed response plan. No measure is enough on its own, but combined they greatly reduce the impact.

What should I do if ransomware hits me?

Disconnect the affected machines from the network, do not shut down servers if evidence can be preserved, alert your manager or provider, contact a specialist, notify the authorities if personal data is involved and check the state of your backups before deciding on any restore.

I set up secure backups for your website

The best defence against ransomware is a properly configured backup system. I can implement it and check that it really works.

About the author

Javier Afán

WordPress developer specialised in security, WooCommerce, and hacked website recovery.

I work on WordPress from a technical angle focused on security, architecture, and the decisions that really affect a project's continuity.