What Is Ransomware? How It Works and What to Do

By George Bailey   Published: 12/04/26   Updated: 12/04/26   6 min read

What is ransomware?

Ransomware is a type of malware designed to encrypt files on a device, making those files and the systems that rely on them unusable. Attackers then demand payment in exchange for decryption. Many also steal data first and threaten to sell or leak it if the ransom is not paid (CISA).

For a person or a small business, the practical meaning is simple: you lose access to your own files, and someone you have never met is asking for money to give it back. This page explains how an attack usually unfolds, how ransomware differs from other malware and what to do first. For the wider family of threats, see what malware is, the ransomware glossary entry and our history of ransomware.

If you are facing a demand, read should you pay a ransom for what U.S. agencies advise.

For a business readiness plan built on CISA’s joint #StopRansomware Guide, including tested backups and a practiced response, see our ransomware readiness guide.

How a ransomware attack usually unfolds

CISA notes that after the first infection, ransomware tries to spread to shared storage drives and other systems it can reach (CISA and FBI ransomware guidance). In plain terms, most incidents follow this pattern:

  1. Getting in. The attackers gain a foothold, for example through a phishing email, a stolen password or an unpatched system. Try our phishing quiz to practice spotting the first step.
  2. Spreading. The malware or the attackers move across the network to reach file servers, shared drives and backups.
  3. Taking the data. In many cases attackers copy sensitive files first, so they can threaten to leak them as extra pressure.
  4. Locking the files. Files are encrypted and a ransom note appears with payment instructions.
  5. The demand. The victim is told to pay, usually in cryptocurrency, to get a decryption key and, sometimes, a promise that stolen data will be deleted.

CISA describes this double pressure directly: ransomware actors often threaten to sell or leak exfiltrated data or authentication information if the ransom is not paid (CISA Ransomware 101). That is why restoring from backup solves the locked-files problem but not always the data-theft problem.

Ransomware vs other malware

TypeWhat it doesHow it differs from ransomware
RansomwareLocks files or systems, often steals data, and demands paymentThe attacker announces itself and asks for money
Virus or wormCopies itself to spread. See virus and wormSpread is the main trait, not a payment demand
TrojanPretends to be a legitimate program. See trojansA trojan can be the delivery vehicle for ransomware
SpywareQuietly watches or steals information. See spywareIt tries to stay hidden, ransomware does not

Many ransomware attacks use other malware along the way, so the labels overlap. Our guide to 26 types of malware attacks goes deeper on the categories.

What to do first if you are hit

CISA recommends following the response checklist in the joint #StopRansomware Guide from CISA, the FBI, the NSA and the MS-ISAC (#StopRansomware Guide). The first steps it describes:

Paying is a separate and serious decision. U.S. government guidance does not encourage paying a ransom. It lists risks such as no guarantee of getting data back, being targeted again and being asked for more money. If you are a business with legal duties after a breach, our guide on what to do after a data breach and the longer how to deal with ransomware guide cover the next steps.

How to lower the odds

A fuller defense list is in 7 top ways to defend against ransomware attacks.

Frequently asked questions

What is ransomware in simple terms?

It is malware that locks your files or systems and demands payment to unlock them. CISA adds that attackers often threaten to leak stolen data as well. Source: CISA.

How does ransomware get onto a computer?

Common routes include phishing emails, stolen or weak passwords and unpatched software. Once inside, it can spread to shared drives and other connected systems.

Should I pay the ransom?

U.S. government guidance does not encourage paying. It warns that paying does not guarantee you get data back, may lead to repeat targeting and can encourage the criminal business model. Source: FBI and partners.

Can ransomware spread to other devices?

Yes. CISA says ransomware attempts to spread to shared storage drives and other accessible systems after the initial infection. Source: CISA.

What is the first thing to do after a ransomware attack?

Isolate affected systems from the network, protect your backups and contact law enforcement. Follow the checklist in the #StopRansomware Guide.

Is ransomware a virus?

Not exactly. Ransomware is a type of malware, a broad category that also includes viruses, worms, trojans and spyware. A virus is defined by how it spreads, while ransomware is defined by what it does to your files.

Sources

George Bailey

George Bailey is the byline of the CyberExperts editorial desk, the team behind the CyberExperts Daily Brief. The desk covers vulnerabilities, breaches and security news from vendor advisories, CISA alerts and other primary sources, and links those sources in every story. Questions or corrections: [email protected].