What Is Ransomware? How It Works & How to Protect Yourself

Learn exactly what ransomware is, how cybercriminals use encryption to extort money, and the best defensive strategies to protect your data.

Vikash KushwahaVikash Kushwaha
10 min read
What Is Ransomware? How It Works & How to Protect Yourself

Advertisement

Ransomware is an advanced and highly destructive category of malicious software rooted in the field of cryptovirology. Its primary function is to block access to a victim's personal data or threaten to leak highly classified corporate files publicly unless a specific financial ransom is paid.

While legacy, low-level ransomware strains simply locked user interface functions in a reversible manner, modern threats rely heavily on complex cryptoviral extortion. In a properly executed cryptoviral campaign, attackers use robust, military-grade mathematical encryption algorithms to scramble files. This makes data recovery mathematically impossible without the matching private decryption key held exclusively by the attackers.

To preserve their anonymity and avoid law enforcement, perpetrators demand payment via difficult-to-trace digital payment systems and cryptocurrencies, such as Bitcoin or Monero, which severely complicates international tracking and prosecution efforts. Today, ransomware is a multi-billion-dollar illegal industry that targets individual consumers, massive corporate enterprises, hospitals, and critical government infrastructure alike.

The Anatomy of a Modern Ransomware Attack

Understanding how ransomware operates requires looking beyond the final lock screen. A successful enterprise attack usually follows a systematic, multi-stage lifecycle:

Infection and Execution: The malicious payload successfully bypasses perimeter defenses and executes its core executable file on a target machine.

Command and Control (C2) Handshake: The malware silently reaches out to an external server controlled by the hackers. This C2 server generates the unique cryptographic keys (a public key to encrypt the files, and a private key kept on the hacker's server to decrypt them) and sends the public key back to the infected machine.

Discovery and Lateral Movement: Before encrypting anything, modern ransomware silently maps the network. It searches for connected network drives, unpatched servers, and administrative credentials to spread as widely as possible before triggering the trap.

The Encryption Phase: The malware rapidly crawls through the hard drives, targeting specific file extensions (like .docx, .sql, .jpg, and .pdf). It scrambles the contents using algorithms like AES-256 and deletes the original, unencrypted files, including built-in Windows backup files.

The Extortion Demand: Finally, the malware changes the desktop wallpaper and drops a ransom note file (usually a .txt or .html file) in every folder. This note contains the extortion demands, a countdown timer, and instructions on how to purchase cryptocurrency to buy the decryption key.

How Ransomware Attacks Infiltrate Networks

Threat actors do not rely on a single method to deploy their payloads. They utilize a diverse array of attack vectors to compromise consumer systems and enterprise infrastructures:

Phishing and Malicious Email Attachments

Social engineering remains the most common entry point for cyber-extortion. Attackers distribute highly targeted "spear-phishing" campaigns featuring malicious macros embedded inside seemingly benign documents, fake invoices, or ZIP archives. When an unsuspecting employee opens the attachment and enables the macros, a background script silently downloads and installs the ransomware payload.

Remote Desktop Protocol (RDP) Vulnerabilities

In the corporate world, Remote Desktop Protocol allows IT administrators to log into an employee's computer remotely. If these RDP ports are left exposed to the open internet without multi-factor authentication, hackers use automated brute-force tools to guess the passwords. Once they log in, they have direct administrative access to manually disable antivirus software and deploy the ransomware across the entire network.

Advertisement

Drive-By Downloads and Malvertising

Attackers frequently compromise legitimate web infrastructure to host malicious code. In a drive-by download, a user simply visits a compromised website, and the site automatically pushes payloads to the browser by exploiting unpatched software vulnerabilities. Similarly, "malvertising" involves injecting compromised code streams into digital advertising networks, silently redirecting users to exploit framework landing pages just by viewing a poisoned banner ad.

Supply Chain Compromise

In highly advanced attacks, hackers infiltrate a trusted third-party software vendor. By injecting ransomware into the vendor's official software updates, the hackers can automatically deploy their malware to thousands of downstream clients simultaneously, bypassing traditional perimeter defenses entirely.

Locker Ransomware vs. Crypto Ransomware

Once inside a system, the malware generally splits into one of two operational architectures:

  • Locker Ransomware: This variant focuses on access denial rather than data destruction. It completely locks the computer's interface, blocking keyboard shortcuts and mouse interactions. A prominent, screen-filling window displays immediate local instructions for making payments, while keeping the underlying files untouched. While alarming, locker ransomware is generally easier for cybersecurity professionals to bypass using safe mode or specialized removal tools.
  • Crypto Ransomware: This is the far more destructive variant. It allows the victim to access their operating system, but it systematically crawls all storage volumes to find and encrypt targeted file extensions. Because the files themselves are mathematically scrambled, removing the malware does not fix the problem; the files remain crippled and completely inaccessible without the cryptographic key.

10 Notorious Strains of Ransomware

The evolution of ransomware is marked by highly destructive strains that fundamentally changed the global cybersecurity landscape:

1. WannaCry

Launching a global crisis in May 2017, WannaCry became one of the largest-scale ransomware events in history. It aggressively infected hundreds of thousands of corporate and government devices globally by utilizing the "EternalBlue" exploit—a leaked cyber-weapon originally developed by the NSA. It targeted an unpatched vulnerability in Microsoft’s Server Message Block (SMB) file-sharing protocol. WannaCry was unique because it functioned as a computer worm, allowing it to automatically spread across internal networks without any human interaction, famously bringing the UK's National Health Service (NHS) to a standstill.

2. CryptoLocker

While basic ransomware had existed for decades, CryptoLocker revolutionized the criminal ecosystem in 2013 by weaponizing military-grade asymmetric key encryption (RSA-2048). Distributed primarily through the Gameover ZeuS botnet, it extorted millions of dollars before its core distribution infrastructure was dismantled by an international law enforcement task force in 2014. The phrase "CryptoLocker" became universally synonymous with file-encryption threats.

3. Locky

Discovered in 2016, Locky specialized in macro-driven document distribution, often arriving in inboxes disguised as a fake invoice. It was notoriously aggressive because it specifically sought out and deleted internal Windows Volume Shadow Copies, making built-in system recovery backups entirely useless. At its peak, the Necurs botnet was sending out millions of Locky phishing emails a day.

Advertisement

4. Cerber

Cerber structured itself as a pioneer in the "Ransomware-as-a-Service" (RaaS) business model. Operating exactly like a software franchise, the developers licensed the ransomware out to external criminal affiliates. The affiliates distributed the malware, and the developers took a 40% cut of all ransom payments. Cerber famously targeted vulnerabilities across cloud email infrastructures, putting millions of users at risk and proving that ransomware could be highly structured and corporatized.

5. NotPetya

Initially labeled as a variant of the 2016 Petya ransomware family, deep system forensics later revealed a much more sinister purpose. Unleashed in 2017, NotPetya was actually a destructive cyber-weapon known as a "wiper," attributed to Russian state-sponsored actors targeting Ukraine. It mimicked a traditional ransomware lock screen to fool victims, but its underlying code permanently destroyed the storage disk's master file table. This made file decryption completely impossible, regardless of whether the ransom was paid, resulting in billions of dollars in global shipping and corporate damages.

6. Ryuk

First appearing in 2018, Ryuk popularized "Big Game Hunting." Instead of sending out millions of spam emails for small $300 ransoms, the operators behind Ryuk specifically targeted massive corporate enterprises, hospitals, and municipal governments, demanding ransoms in the millions of dollars. Ryuk operators frequently spent weeks silently mapping a victim's network to ensure maximum operational destruction before triggering the encryption.

7. Crysis

Crysis focuses on maximum local disruption. It features strong multi-layer cryptographic configurations capable of simultaneously locking files across local hard drives, portable external media, and networked network-attached storage (NAS) folders. It frequently gains entry through poorly secured Remote Desktop Protocol (RDP) connections.

8. TeslaCrypt

Active around 2015, TeslaCrypt predominantly targeted files associated with PC gaming applications, user profiles, saved games, and mod configurations. It spread rapidly by leveraging automated web exploit frameworks like the Angler kit, dropping its executable structures directly inside local system temporary directories. The developers unexpectedly shut down the project in 2016 and publicly released the master decryption key for free.

9. TorrentLocker

TorrentLocker paired traditional data encryption with aggressive data harvesting capabilities. Upon compromising a workstation, it extracted all valid contacts found within the victim’s email address books. It then weaponized those accounts to automatically distribute localized spam attachments outward, spoofing the victim's identity to spread the malware to their colleagues and clients.

10. ZCryptor

ZCryptor represents a dangerous combination of traditional ransomware and self-propagating computer worms. After encrypting the primary machine, it actively searches for external storage arrays and removable USB flash drives. It automatically drops hidden executable copies of itself onto these drives, ensuring the infection hops onto subsequent computers offline when the drive is plugged into a new machine.

Threat Profile Analysis: Evaluating Key Ransomware Behaviors

Understanding how different strains behave allows cybersecurity teams to build better defenses. Here is a breakdown of the primary behavioral profiles:

Advertisement

  • The Network Worm Profile (e.g., WannaCry): These threats rely on exploiting fundamental network protocols (like SMB vulnerabilities). Their defining characteristic is the ability to spread laterally across a network without any human interaction. The primary risk level is critical, as a single infected machine can compromise an entire corporate campus in minutes.
  • The Backup Destroyer Profile (e.g., Locky): These threats anticipate that IT teams will try to restore systems from local backups. Their defining behavior is executing command-line instructions to permanently wipe Volume Shadow Copies and local system state backups before the encryption phase even begins.
  • The Franchise Profile (e.g., Cerber): Operating under the Ransomware-as-a-Service (RaaS) model, these threats are characterized by rapid evolution and widespread, decentralized distribution. Because multiple independent criminal groups are renting and distributing the software, the attack vectors are highly unpredictable.
  • The Wiper Disguise Profile (e.g., NotPetya): These are state-sponsored cyber-weapons disguised as extortion. Their primary characteristic is the intentional, irreversible destruction of the hard drive's Master File Table (MFT). The risk level is extreme, as there is zero chance of data recovery, representing an act of digital sabotage rather than financial crime.

The Rise of Double and Triple Extortion

In recent years, companies began fighting back against ransomware by keeping robust, offline backups. If a company's files were encrypted, they simply refused to pay and restored their systems from their backups.

To counter this, ransomware gangs developed Double Extortion. Before encrypting the files, the malware silently uploads terabytes of the company's most sensitive data (client records, financial data, internal emails) to the hacker's servers. The hackers then demand a ransom to unlock the files, and a second ransom to prevent the stolen data from being leaked to the public dark web.

Triple Extortion takes this a step further. If the company refuses to pay, the hackers will launch a massive Distributed Denial of Service (DDoS) attack against the company's public websites, or they will directly email the company's clients and partners, threatening to release their private data if the company does not pay up.

Defensive Strategies: How to Protect Against Ransomware

Defending against modern cyber-extortion requires a proactive, multi-layered approach to network security:

  • The 3-2-1 Backup Strategy: Organizations must maintain at least three copies of their data, on two different types of media, with one copy kept securely off-site and entirely disconnected from the main network (air-gapped or immutable backups).
  • Strict Patch Management: Threats like WannaCry rely heavily on exploiting known software vulnerabilities. Maintaining an aggressive patching schedule for operating systems, web browsers, and server software closes these open doors.
  • Zero Trust Architecture: Implement strict access controls and network segmentation. If a single employee's laptop is compromised, a segmented network prevents the ransomware from traveling to the main database servers.
  • Multi-Factor Authentication (MFA): Require MFA for all remote access points, particularly Remote Desktop Protocol (RDP) and Virtual Private Networks (VPNs), to prevent hackers from brute-forcing their way into the system with stolen passwords.
  • Employee Security Training: Because phishing remains the primary infection vector, consistently training staff to recognize suspicious emails, fake invoices, and dangerous macro alerts is the most effective frontline defense against ransomware deployment.

Advertisement

🚀 Found This Insightful? Share the Knowledge

Know a student, colleague, or fellow science and tech enthusiast who would enjoy this? Pass it along in one click.

Share this article

Link copied to clipboard!
Vikash Kushwaha

About the Author

Vikash Kushwaha

Founder of EducationalTechs, exploring the intersections of education, emerging technology, career growth, space exploration, and science. Focused on turning complex ideas and new discoveries into clear, actionable guides for students, professionals, and curious minds.

Follow:

Related Posts

🔭 Stay Curious, Stay Ahead

Your weekly dose of science breakthroughs, space discoveries, emerging tech, and practical career & learning guides.

Enter your email to get our best explainers and future-ready insights delivered straight to your inbox—zero spam.

💬 Join the Conversation

What are your thoughts on this topic? Share your perspective, ask a question, or suggest a science, tech, or career topic you'd like us to explore next.