Ransomware and Cryptolockers
Examine the ransomware kill chain from initial access and encryption to ransom demand, and learn defensive strategies including immutable backups.
Ransomware and Cryptolockers is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is Ransomware?
Ransomware is malware that denies access to data or systems and demands payment — typically in cryptocurrency — for restoration. The defining characteristic is extortion: the victim's own data becomes leverage against them. Modern ransomware operations are sophisticated criminal enterprises generating billions of dollars annually. The 2021 Colonial Pipeline attack disrupted fuel supply across the US East Coast; the 2020 Universal Health Services attack impacted 400 hospitals. Ransomware is among the most severe threats organizations face today, combining technical sophistication with significant business impact.
Ransomware Kill Chain
Ransomware attacks follow a predictable sequence. Initial access: phishing email, RDP brute-force, or exploitation of a public-facing vulnerability. Persistence: install backdoor and disable security tools. Lateral movement: spread through the network to maximize infection scope and compromise backup systems. Data exfiltration: steal sensitive data before encrypting (double extortion). Encryption: encrypt files across all accessible systems simultaneously. Ransom demand: leave ransom note with payment instructions and threat to publish stolen data if unpaid. Understanding each phase reveals defensive opportunities at every step.
# Ransomware kill chain defensive opportunities:
# Phase 1 (Initial Access): Email gateway, patch management, MFA
# Phase 2 (Persistence): EDR behavior detection
# Phase 3 (Lateral Move): Network segmentation, least privilege
# Phase 4 (Exfiltration): DLP, network monitoring (large data transfer)
# Phase 5 (Encryption): EDR file activity monitoring, honeypot files
# Phase 6 (Impact): Immutable backups enable recovery without paymentCryptolocker and Its Successors
CryptoLocker (2013) pioneered modern ransomware by combining RSA-2048 public key encryption with Bitcoin payment, making decryption impossible without the private key held by the attacker. It was distributed via phishing email attachments and spread to mapped network drives. CryptoLocker was disrupted in 2014 but inspired a generation of successors: WannaCry (2017) spread as a worm, NotPetya (2017) masqueraded as ransomware but was a destructive wiper targeting Ukraine, Ryuk (2018-2020) targeted enterprises with manual operator-driven attacks, and REvil (2020-2021) pioneered the RaaS double-extortion model.
# Ransomware encryption approach:
# 1. Malware generates random symmetric key (AES-256)
# 2. Encrypts victim files with AES-256
# 3. Encrypts AES key with attacker's RSA-2048 public key
# 4. Stores encrypted AES key with encrypted file
# Result: victim cannot decrypt without RSA private key
# Attacker provides private key only after ransom payment
#
# Implication: encrypted files cannot be cracked; only defense is backupsRansomware as a Service (RaaS)
Ransomware as a Service (RaaS) is a criminal business model where ransomware developers lease their tools and infrastructure to affiliates who conduct the actual attacks. The affiliate keeps 70-80% of the ransom; the developer keeps the rest. This dramatically lowered the technical barrier for ransomware attacks, enabling less-skilled criminals to deploy sophisticated ransomware. Notable RaaS operations include REvil, LockBit, BlackCat/ALPHV, and Conti. Law enforcement disruption of operators often leads to splinter groups rebranding and continuing operations, making RaaS resilient to takedowns.
Double and Triple Extortion
Single extortion encrypts files and demands payment for the decryption key. Double extortion (pioneered by Maze in 2019) also exfiltrates data before encryption and threatens to publish it on a leak site if the ransom is not paid — effective even against victims with good backups. Triple extortion adds a third pressure: DDoS attacking the victim's infrastructure simultaneously to prevent them from operating while negotiating. Some groups also contact the victim's customers, partners, and regulators to increase pressure. These multi-pressure approaches make backup-based recovery alone insufficient as a ransomware response strategy.
Targeting Backup Systems
Sophisticated ransomware operators specifically target backup infrastructure before triggering encryption, knowing that good backups are their primary obstacle. Tactics include: deleting Windows Volume Shadow Copies (vssadmin delete shadows), deleting backup software databases, corrupting backup agents, and accessing network backup servers through compromised credentials. This is why immutable backups — backups that cannot be modified or deleted even by an authenticated administrator for a defined retention period — are essential. Immutable object storage (AWS S3 Object Lock, Azure Immutable Blob) and tape backups stored offline are highly effective.
# Ransomware anti-backup commands (what attackers run):
vssadmin delete shadows /all /quiet
wbadmin delete catalog -quiet
bcdedit /set {default} recoveryenabled No
wmic shadowcopy delete
# Immutable backup defense:
# AWS S3 Object Lock: COMPLIANCE mode prevents any deletion
# for specified retention period, even by root account
# Veeam: immutable backup repository (hardened Linux)
# Tape: offline tape is physically unreachable to ransomwareThe 3-2-1 Backup Rule
The 3-2-1 backup rule is the foundational backup strategy for ransomware resilience: maintain 3 copies of data (production + 2 backups), on 2 different media types (e.g., disk and tape), with 1 copy stored offsite (geographically separated from primary systems). A ransomware-hardened variant adds a 4th element: at least one copy must be offline or immutable. Backups that are accessible to the production network are vulnerable to encryption. The offsite/offline requirement ensures that even complete compromise of the primary environment leaves one clean copy accessible for recovery.
# 3-2-1 backup implementation:
# Copy 1: Production data (on-premises servers)
# Copy 2: On-premises backup (NAS, different disk)
# Copy 3: Offsite backup (cloud object storage with Object Lock)
# Enhanced: 3-2-1-1
# + 1 offline copy (tape, air-gapped drive rotated offsite)
# Test backups regularly:
# Monthly: restore single file (verify backup readable)
# Quarterly: restore full server to isolated environment
# Annually: full DR testPaying the Ransom: Legal and Practical Considerations
The decision to pay ransom involves complex considerations. Paying does not guarantee decryption (some ransomware groups disappear after payment), may fund criminal enterprises or sanction-listed groups (OFAC in the US prohibits payments to sanctioned entities), and signals that the victim will pay — potentially making them a repeated target. However, organizations without viable backups may face existential business risk from prolonged outages. The FBI generally recommends not paying but acknowledges the difficult position businesses face. Before any payment consideration, consult legal counsel, law enforcement (FBI has victim resources), and cybersecurity specialists to explore all alternatives.
Ransomware-Specific Technical Defenses
Beyond backups, ransomware-specific technical controls include: EDR with ransomware detection that monitors for mass file encryption operations and can automatically isolate affected endpoints; honeypot files placed across file shares that alert immediately if touched (ransomware will encrypt them along with real files); controlled folder access (Windows Defender feature) that prevents unauthorized applications from writing to protected folders; and application allowlisting that blocks execution of unknown processes (significantly limits ransomware ability to run). Disable macros, block RDP exposure to the internet, and enforce MFA on all remote access.
# Windows Controlled Folder Access (anti-ransomware):
# PowerShell:
Set-MpPreference -EnableControlledFolderAccess Enabled
# Protects Desktop, Documents, Pictures from unauthorized writes
# Group Policy:
# Computer Config -> Admin Templates -> Windows Components
# -> Windows Defender Antivirus -> Windows Defender Exploit Guard
# -> Controlled Folder Access -> Enable = Enabled
# Honeypot file approach:
# Create files like 'AAAA_Canary.docx' in every share root
# Monitor for modification events -> immediate isolationRecovery Without Paying
When ransomware strikes, recovery options without paying include: restoring from verified clean backups (the most reliable path), checking if a decryptor exists on NoMoreRansom.org (law enforcement and security vendors release decryptors for some ransomware families after infrastructure seizure), recovering files from Volume Shadow Copies if ransomware did not delete them, and for some encryption implementations, researchers have identified weaknesses in the random number generation that make decryption feasible. Always snapshot or image affected systems before attempting any recovery — data preserved now may be recoverable later even if not immediately.
# Check NoMoreRansom.org for available decryptors:
# https://www.nomoreransom.org/en/decryption-tools.html
# Upload sample encrypted file -> identify ransomware family
# If decryptor available -> free recovery possible
# Check Volume Shadow Copies:
vssadmin list shadows
# If present (not deleted by ransomware):
vssadmin create shadow /for=C:
# Restore single file from shadow:
mklink /d C:\shadow_restore \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Ransomware Incident Response Plan
Organizations must have a ransomware-specific incident response plan before an attack occurs. The plan should include: escalation contacts (legal, executive, cyber insurance carrier, law enforcement liaison), decision trees for containment vs. continued operation, pre-negotiated relationships with ransomware negotiation firms if relevant, backup recovery procedures with estimated RTOs, communication templates for customers, partners, and regulators, and legal guidance on ransom payment law. The plan must be tested via tabletop exercises. Staff should know the plan; discovering it during an attack adds critical minutes to an already chaotic situation.
Quick Check
Test your understanding of CompTIA Security+ (SY0-701) concepts from this lesson.
Lesson Recap
In this lesson you learned: modern ransomware follows a kill chain from initial access through lateral movement to encryption, presenting defensive opportunities at each phase, immutable and offline backups following the 3-2-1 rule are the most reliable recovery mechanism because ransomware specifically targets online backup systems, and double extortion adds data theft before encryption, meaning backups alone no longer fully protect organizations from all ransomware impacts. Next up we explore rootkits, spyware, and keyloggers.
Frequently asked questions
Is the “Ransomware and Cryptolockers” lesson free?
Yes — the full text of “Ransomware and Cryptolockers” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.
What will I learn in “Ransomware and Cryptolockers”?
Examine the ransomware kill chain from initial access and encryption to ransom demand, and learn defensive strategies including immutable backups. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cloud & IT Cert Prep?
No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Ransomware and Cryptolockers” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cloud & IT Cert Prep lesson?
Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Viruses, Worms, and Trojans
- Ransomware and Cryptolockers
- Rootkits, Spyware, and Keyloggers
- Fileless Malware and Living-off-the-Land Attacks