Protego field desk
Cybersecurity20 min read

Ransomware Protection: The Complete Defense Guide for 2026

A ransomware defense guide built on 2025 breach data: how attacks unfold, the root causes behind most of them, and the prevention, backup, detection and response steps that stop them.

I
Microsoft Cloud Solution Architect
Updated

Quick answer

Ransomware defense rests on four controls: patch or remove exposed edge devices and RDP, enforce MFA (phishing-resistant for admins), run EDR with tamper protection, and keep at least one offline or immutable backup you restore-test. Attackers often encrypt within days of entry, so also detect credential theft and backup deletion early.

Ransomware Protection: The Complete Defense Guide for 2026 infographic showing key Cybersecurity concepts and controls
Ransomware Protection: The Complete Defense Guide for 2026 infographic showing key Cybersecurity concepts and controls
RansomwareIncident ResponseBackupEndpoint SecurityZero TrustBusiness ContinuityThreat Detection

The Economics of Ransomware in 2026

Ransomware has become industrialized. Many groups run as ransomware-as-a-service: developers maintain the malware and leak sites, affiliates break in or buy access, and negotiators handle the ransom conversation. The numbers depend on who is counted: Verizon's 2025 Data Breach Investigations Report found ransomware in 44% of breaches with a median payment of $115,000, while Sophos' State of Ransomware 2025 survey put the median payment among its respondents at $1 million and the average recovery cost, excluding any ransom, at $1.53 million.

The groups behind these attacks research their targets, and they usually steal data, escalate privileges and go after backups before they trigger encryption. They move fast: Mandiant's M-Trends 2025 reports a global median dwell time of 11 days, and 5 days in cases where the attacker revealed itself, which is typical of ransomware.

This guide covers the controls that actually stop ransomware attacks, based on how modern ransomware groups actually operate.

How Modern Ransomware Attacks Work

Understanding the attack chain is prerequisite to building effective defenses. Modern ransomware attacks follow a consistent playbook:

  1. Initial access: phishing, an exploited edge device such as a VPN or firewall, or stolen credentials bought from an access broker
  2. Credential theft and privilege escalation toward domain or cloud admin
  3. Discovery and lateral movement with legitimate admin tools (RDP, PowerShell, PsExec)
  4. Defense and backup sabotage: EDR disabled, shadow copies and backup catalogs deleted
  5. Data exfiltration for double extortion, for example with rclone or cloud sync tools
  6. Encryption and the ransom note

The implication for defenders: stopping ransomware is not just about detecting encryption. By the time ransomware executes, the attackers have usually been in your network for days, sometimes weeks. Effective defense must interrupt the attack chain much earlier.

Malicious email attachments are one possible initial access vector. A free content disarm and reconstruction tool like Protego's document sanitizer removes document-level macros, embedded scripts, and clickable annotations from a suspicious attachment before anyone opens the rebuilt copy. It does not assess visible URLs or QR codes.

Initial Access Vectors

Sophos asked 3,400 IT and security leaders in 17 countries what caused their ransomware attack (State of Ransomware 2025). The four most common root causes:

Root causeShare of attacksFix first
Exploited vulnerability32%Patch or retire internet-facing VPNs, firewalls and Exchange
Compromised credentials23%MFA on every remote access path; remove exposed RDP
Malicious email19%Attachment sandboxing and blocked internet macros
Phishing18%Phishing-resistant MFA, link scanning, easy user reporting

Prevention Layer 1: Reduce Your Attack Surface

Patch Critical Systems Aggressively

Ransomware groups maintain lists of organizations running vulnerable software. CVEs for VPN appliances (Fortinet, Cisco, Pulse Secure), firewalls (Palo Alto, SonicWall), and Exchange are weaponized within days of disclosure. Every unpatched edge device is a potential initial access vector.

Priority patching targets (from ransomware incident data):

  • Internet-facing VPN and remote access appliances
  • Email servers (Exchange on-premises)
  • Firewall management interfaces
  • RDP-exposed systems
  • Web application frameworks (if public-facing)

A practical starting point: patch critical (CVSS 9.0+) flaws on internet-facing systems within 72 hours and CVSS 7.0 to 8.9 within 14 days. Anything listed in CISA's Known Exploited Vulnerabilities catalog jumps the queue regardless of its score. Use your vulnerability scanner's "internet-facing" filter to prioritize.

Eliminate Exposed RDP

RDP on port 3389 exposed to the internet is one of the most exploited initial access vectors. Options:

  1. Best: Disable RDP internet exposure entirely, replace with ZTNA or VPN + jump server
  2. Good: RDP reachable only through a VPN or Remote Desktop Gateway with MFA and an IP allowlist (moving RDP to a non-standard port alone does not count: scanners find it)
  3. Minimum: Enable Network Level Authentication + account lockout after 5 attempts + MFA

Scan your perimeter now: nmap -p 3389 --open <your-IP-ranges>; any result is a problem.

Email Security: Where Most Attacks Begin

  • Enable DMARC with p=quarantine/reject to prevent domain spoofing
  • Deploy an email security gateway with sandboxing (Defender for Office 365 Plan 2, Proofpoint, Mimecast)
  • Block macros in Office files from the internet (Microsoft 365 Apps has blocked them by default since 2022; confirm no policy overrides it)
  • Turn on attack surface reduction rules such as "Block all Office applications from creating child processes", so an opened document cannot launch PowerShell
  • Implement URL rewriting and time-of-click scanning for links

Prevention Layer 2: Identity and Access Hardening

Ransomware groups move from initial foothold to domain admin through credential theft and privilege escalation. Strong identity controls slow this significantly.

MFA Everywhere (Especially Admin Accounts)

Microsoft reports that MFA blocks more than 99.9% of account compromise attacks. For ransomware defense, prioritize:

  1. All remote access (VPN, RDP, ZTNA): mandatory, no exceptions
  2. All admin accounts: domain admins, local admins, cloud console access
  3. Email and SaaS applications: phishing-resistant MFA (FIDO2/hardware keys) preferred over SMS
  4. Service accounts - use managed identities and service principals instead of password-based service accounts

Tiered Administration Model

Domain administrator credentials should never be used for day-to-day work. Implement separation:

Tier 0: Domain Controllers / AD (highest privilege)
  └── Only Tier 0 admins log in here
  └── Accounts never used on Tier 1 or 2 systems

Tier 1: Servers (medium privilege)
  └── Server admins log in here
  └── Accounts never used on Tier 2 (workstations)

Tier 2: Workstations (standard users)
  └── Helpdesk logs in here for user support
  └── Standard users operate here daily

If a ransomware operator compromises a workstation, they capture Tier 2 credentials, which can't access your servers or DCs. This requires jumping through additional hoops (additional exploits, more detectable activity) to escalate. Tier 0 is also the highest-value ransomware target precisely because domain controllers hold the keys to the whole environment; see eliminating the domain controller and migrating to Entra ID for an architecture that removes this single point of compromise entirely.

Privileged Access Workstations (PAW)

For Tier 0 administration, use a dedicated, hardened workstation that:

  • Never browses the internet or reads email
  • Has no standard software installed
  • Uses FIDO2 hardware authentication
  • Has local admin disabled and Credential Guard enabled
  • Is monitored for process execution and outbound connections

Prevention Layer 3: Endpoint Security

Modern EDR is Non-Negotiable

Legacy AV is ineffective against modern ransomware. Modern EDR (Endpoint Detection and Response) provides:

  • Behavioral detection (ransomware patterns: rapid file enumeration, mass encryption, shadow copy deletion)
  • Memory scanning for fileless malware
  • File rollback on some platforms (check whether yours offers it; many rely on backups for recovery)
  • Telemetry for threat hunting

Enterprise EDR options: Microsoft Defender for Endpoint (Plan 2), CrowdStrike Falcon, SentinelOne, Palo Alto Cortex XDR. For a detailed comparison of the two most common enterprise choices, see CrowdStrike vs Microsoft Defender for Endpoint.

Minimum EDR configuration for ransomware protection:

  • Tamper protection enabled (prevents ransomware from disabling the agent)
  • Ransomware-specific behavioral rules enabled
  • Automatic remediation enabled for high-confidence detections
  • Isolated network response configured (quarantine infected host on detection)

Application Allowlisting

Ransomware executes arbitrary code. Application allowlisting prevents execution of anything not explicitly approved, which makes it one of the most effective endpoint controls against ransomware.

Implementation options:

  • Windows: AppLocker (basic) or Windows Defender Application Control (WDAC, more robust)
  • macOS: Gatekeeper + notarization enforcement
  • Linux: fapolicyd (Red Hat Enterprise Linux and Fedora) for execution allowlisting, with SELinux or AppArmor to confine what allowed processes can do

Start with audit mode to understand what runs in your environment before switching to enforcement. Common exceptions needed: installer packages (deploy via approved channels), scripting engines (restrict to approved scripts), interpreted languages.

Disable or Restrict PowerShell

PowerShell is one of the tools most abused for ransomware lateral movement. Controls:

# Constrained Language Mode via WDAC
# (Restricts .NET and COM access in PS scripts)

# Enable Script Block Logging (logs all PS execution)
$sbl = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging"
New-Item -Path $sbl -Force | Out-Null
Set-ItemProperty -Path $sbl -Name "EnableScriptBlockLogging" -Value 1

# Enable Transcription (logs PS sessions to file)
$tr = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription"
New-Item -Path $tr -Force | Out-Null
Set-ItemProperty -Path $tr -Name "EnableTranscripting" -Value 1
Set-ItemProperty -Path $tr -Name "OutputDirectory" -Value "\\logserver\pstranscripts$"

The Backup Architecture That Survives Ransomware

This is where most organizations have the most critical gap. Modern ransomware operators specifically target and destroy backups before deploying encryption. A backup that can be reached from an infected host can be encrypted.

The 3-2-1-1-0 Rule

The classic 3-2-1 rule (3 copies, 2 media types, 1 offsite) needs two additions for ransomware:

RuleMeaning
3 copiesProduction + 2 backup copies
2 media typese.g., disk + tape/cloud
1 offsiteAt least one copy outside primary site
1 offline or immutableAt least one copy that is air-gapped or locked against change and deletion
0 errorsVerified restore - backups tested, not just assumed to work

The offline copy is the ransomware-resistant backup. Options:

  • Tape media stored offsite - physically disconnected after write
  • Immutable cloud backup (AWS S3 Object Lock, Azure Immutable Blob, Backblaze B2) with WORM (write once, read many)
  • A managed vault or isolated recovery environment from your backup vendor, with immutability and its own credentials, separate from production identity

Immutable Backup Configuration (AWS S3)

{
  "ObjectLockConfiguration": {
    "ObjectLockEnabled": "Enabled",
    "Rule": {
      "DefaultRetention": {
        "Mode": "COMPLIANCE",
        "Days": 30
      }
    }
  }
}

In COMPLIANCE mode no user, including the AWS account root user, can overwrite or delete a locked object version until its retention period ends. Object Lock needs versioning on the bucket. GOVERNANCE mode is weaker: users with a special permission can bypass it, so keep it for testing.

Backup Isolation Architecture

Critical: the backup server should use a separate set of credentials from production systems. Domain admin backup service accounts are a favorite ransomware target for exactly this reason.

Backup Testing (Most Neglected Control)

A backup you've never tested is a backup you don't have. Requirements:

  • Monthly: Restore a sample of files and verify integrity
  • Quarterly: Full server restore to isolated environment
  • Annually: Full DR exercise - restore critical systems from backup and verify applications function

Automate recovery testing where possible. Veeam Sure Backup, Zerto, and similar tools support automated restore verification.

Detection: What to Monitor

Prevention will fail. Some percentage of attacks will succeed in gaining initial access. Detection at each stage of the attack chain gives you the opportunity to respond before ransomware deploys.

High-Value Detection Signals

StageDetection SignalTool
Initial accessMultiple failed logins + success from new locationSIEM / Microsoft Sentinel
PersistenceNew scheduled tasks, registry run keys, servicesEDR / Sysmon
Lateral movementSMB lateral movement, pass-the-hash, WMI remote execEDR / Network
Privilege escalationDCSync (AD replication from non-DC), KerberoastingMicrosoft Defender for Identity
Backup targetingVSS deletion commands, backup agent stoppedEDR / Windows Events
Pre-ransomwareMass file reads (data staging), rclone/Megasync executionEDR / DLP
Ransomware executionRapid file encryption pattern, ransom note creationEDR behavioral

Critical Windows Event IDs to Alert On

4625 - Failed logon (brute force detection)
4648 - Logon with explicit credentials (lateral movement)
4688 - Process creation (requires audit policy; enable command-line logging)
       Alert on: vssadmin delete shadows, wmic shadowcopy delete,
       wbadmin delete catalog, bcdedit /set recoveryenabled no
4698/4702 - Scheduled task creation/modification
7045 - New Windows service installed
1102 - Security audit log cleared (ransomware covers tracks)

Enable Sysmon for process creation, network connections, and file operations telemetry beyond default Windows event logs.

Incident Response: When Ransomware Hits

If you are reading this after ransomware has already deployed, here is the immediate response sequence. For the cloud side (identity, logs, isolation in Azure), follow the Azure cloud incident response playbook alongside it.

Hour 0-1: Contain

  1. Isolate affected hosts - disconnect from network (physical or EDR-initiated network isolation), do NOT power off (preserves memory artifacts for forensics)
  2. Identify patient zero - check EDR telemetry for first infection indicators
  3. Assess backup status - are your backups intact? This determines your options
  4. Preserve forensic evidence - take memory dumps and disk images before remediation
  5. Notify - internal security team, legal, CISO; external: cyber insurer, legal counsel

Hour 1-24: Understand the Scope

  • Map all infected/potentially infected systems using EDR telemetry
  • Identify what data was exfiltrated (check DNS logs, proxy logs for bulk transfers)
  • Determine the ransomware variant (upload the ransom note or an encrypted file to ID Ransomware; files submitted to VirusTotal become visible to other researchers, so mind what you upload)
  • Contact your cyber insurer before any decisions; they often have negotiators and IR resources included
  • Check ransomware decryptor availability (nomoreransom.org) before paying

Day 1-7: Recover

Recovery priority order:

  1. Identity systems (AD, RADIUS): required for everything else
  2. Core infrastructure (DNS, DHCP)
  3. Security tooling (EDR, SIEM): you need visibility before expanding
  4. Critical business applications
  5. Everything else

Rebuild from known-clean images rather than trying to clean infected systems; you can't fully trust a system that was compromised. Restore data from your last known-good backup.

Never Pay Without Expert Advice

The decision to pay ransom is complicated:

  • Payment does not guarantee working decryption or deletion of stolen data. Most victims now refuse: 64% did not pay in the 2025 Verizon DBIR
  • Payment may fund criminal enterprises
  • Payment may be illegal (if attackers are sanctioned entities; OFAC regulations apply)
  • Payment signals to attackers that you'll pay again

Your cyber insurer and legal counsel should be involved in any payment decision. Many organizations that pay do so as a last resort when backup recovery is insufficient or would take too long.

The Ransomware Readiness Assessment

Before you're attacked, test your defenses:

Technical controls (score 1 point each):

  • [ ] MFA on all remote access
  • [ ] MFA on all admin accounts
  • [ ] EDR with tamper protection on all endpoints
  • [ ] No internet-exposed RDP
  • [ ] Email sandboxing for attachments
  • [ ] Immutable offsite backup
  • [ ] Backup tested in last 90 days
  • [ ] Privileged account tier separation
  • [ ] Patch SLA <14 days for critical
  • [ ] Incident response plan documented

Score interpretation:

  • 9-10: Strong posture. Run tabletop exercises.
  • 7-8: Good, but critical gaps. Prioritize missing items.
  • 5-6: Moderate risk. Immediate action on backup and MFA.
  • <5: High risk. Escalate to leadership immediately.

The most impactful controls if you're starting from zero: MFA on remote access + immutable backups + EDR with tamper protection. These three controls address the majority of successful ransomware attack chains. Everything else adds depth, but these three are the foundation.

Frequently Asked Questions

What are the most effective ransomware defenses?

Start with four controls: patch or remove exposed edge devices and RDP (exploited vulnerabilities were the top root cause in Sophos' 2025 survey, at 32%), require MFA on all remote access and admin accounts, run EDR with tamper protection, and keep at least one offline or immutable backup that you restore-test. These cover the most common ways ransomware gets in and the main way you recover without paying.

What is the 3-2-1-1-0 backup rule?

Keep 3 copies of your data on 2 different media types, with 1 copy offsite, 1 copy offline or immutable so ransomware cannot encrypt or delete it, and 0 errors in verified restore tests. AWS S3 Object Lock in compliance mode and Azure immutable Blob Storage provide the immutable copy at the storage layer.

How long are attackers inside a network before ransomware is deployed?

Often only days. Mandiant's M-Trends 2025 reports a global median dwell time of 11 days, and 5 days in cases where the attacker revealed itself, which is typical of ransomware. Detection has to catch credential theft, lateral movement and backup deletion, not just the encryption.

What should I do in the first hour of a ransomware attack?

Isolate affected hosts from the network but do not power them off, so memory evidence survives. Check whether your backups are intact, preserve memory and disk images, and notify your security lead, legal counsel and cyber insurer before any external communication or payment discussion.

Should you pay a ransomware demand?

Treat payment as a last resort decided with legal counsel and your insurer: it does not guarantee working decryption or deletion of stolen data, and paying a sanctioned group can breach US OFAC rules. Most victims now refuse: 64% did not pay in Verizon's 2025 Data Breach Investigations Report.

Sources

RD / 01

Reader desk

Discuss this guide

Rate the guide or ask a practical follow-up. Clear questions publish immediately; uncertain submissions wait for review.

Get the free Cloud Security Checklist

A 20-point hardening checklist for AWS, Azure, and GCP workloads. No spam, unsubscribe anytime.

I

Microsoft Cloud Solution Architect

Cloud Solution Architect with deep expertise in Microsoft Azure and a strong background in systems and IT infrastructure. Passionate about cloud technologies, security best practices, and helping organizations modernize their infrastructure.

Share this article

Licensed under CC BY 4.0: you may share and adapt this article with attribution to Protego.