Backups & Ransomware Resilience
Ransomware encrypts an organisation's files and demands payment for the key; most groups now also steal data first and threaten to publish it ("double extortion"). Prevention matters (see the Malware and Phishing lessons), but resilience comes down to one question: can you restore everything without paying? That depends entirely on backups that the attacker could not reach.
How ransomware attacks unfold
Understanding the typical sequence shows where defences fit:
- Initial access: phishing, an exposed remote desktop or VPN without MFA, an unpatched edge device.
- Spread and escalate: the attackers move laterally, gain domain-admin rights, often over days or weeks.
- Find and destroy backups: they look for backup servers, delete snapshots and shadow copies, and disable backup jobs.
- Steal data for extortion.
- Encrypt everything at once, usually at night or at a weekend.
Step 3 is why "we have backups" is not enough. Backups on a network share that a domain admin can delete are just more files to encrypt.
The 3-2-1 rule (and 3-2-1-1-0)
A widely used baseline:
- 3 copies of the data (production plus two backups),
- on 2 different types of storage,
- with 1 copy off-site.
The modern extension 3-2-1-1-0 adds:
- 1 copy offline, air-gapped or immutable (cannot be changed or deleted, even by an admin, until a retention date),
- 0 errors when restores are tested.
Here is a checker that evaluates a backup plan against 3-2-1-1-0:
def check_backup_plan(copies, last_restore_test_errors):
total = len(copies)
media = sorted({c["media"] for c in copies})
offsite = [c["name"] for c in copies if c["offsite"]]
protected = [c["name"] for c in copies if c["immutable"] or c["offline"]]
results = [
(f"3 copies (have {total})", total >= 3),
(f"2 media types (have {', '.join(media)})", len(media) >= 2),
(f"1 off-site (have {len(offsite)})", len(offsite) >= 1),
(f"1 offline/immutable (have {len(protected)})", len(protected) >= 1),
(f"0 restore errors (had {last_restore_test_errors})", last_restore_test_errors == 0),
]
for label, ok in results:
print(f" [{'x' if ok else ' '}] {label}")
print(" verdict:", "resilient" if all(ok for _, ok in results) else "GAPS FOUND")
print("Plan A: nightly copy to a NAS")
check_backup_plan([
{"name": "production", "media": "disk", "offsite": False, "immutable": False, "offline": False},
{"name": "nas", "media": "disk", "offsite": False, "immutable": False, "offline": False},
], last_restore_test_errors=0)
print("Plan B: NAS + immutable cloud + monthly tape")
check_backup_plan([
{"name": "production", "media": "disk", "offsite": False, "immutable": False, "offline": False},
{"name": "nas", "media": "disk", "offsite": False, "immutable": False, "offline": False},
{"name": "cloud", "media": "object storage", "offsite": True, "immutable": True, "offline": False},
{"name": "tape", "media": "tape", "offsite": True, "immutable": False, "offline": True},
], last_restore_test_errors=0)Plan A: nightly copy to a NAS
[ ] 3 copies (have 2)
[ ] 2 media types (have disk)
[ ] 1 off-site (have 0)
[ ] 1 offline/immutable (have 0)
[x] 0 restore errors (had 0)
verdict: GAPS FOUND
Plan B: NAS + immutable cloud + monthly tape
[x] 3 copies (have 4)
[x] 2 media types (have disk, object storage, tape)
[x] 1 off-site (have 2)
[x] 1 offline/immutable (have 2)
[x] 0 restore errors (had 0)
verdict: resilient
Plan A is a common setup and fails almost every check: a single compromise of the network could destroy both copies.
RPO and RTO
Two numbers define what "good enough" recovery means for each system, agreed with the business:
- RPO (Recovery Point Objective): how much data you can afford to lose, measured in time. Backups every 24 h means up to 24 h of lost work.
- RTO (Recovery Time Objective): how long the system may be down before restoring it.
systems = [
{"name": "online shop", "rpo_h": 1, "rto_h": 4, "backup_every_h": 24, "restore_h": 6},
{"name": "file server", "rpo_h": 24, "rto_h": 48, "backup_every_h": 12, "restore_h": 20},
{"name": "payroll", "rpo_h": 24, "rto_h": 72, "backup_every_h": 24, "restore_h": 8},
]
for s in systems:
rpo_ok = s["backup_every_h"] <= s["rpo_h"]
rto_ok = s["restore_h"] <= s["rto_h"]
status = "OK" if rpo_ok and rto_ok else "MISSES " + " and ".join(
n for n, ok in [("RPO", rpo_ok), ("RTO", rto_ok)] if not ok)
print(f"{s['name']:<12} worst-case loss {s['backup_every_h']:>2} h (target {s['rpo_h']:>2} h), "
f"restore {s['restore_h']:>2} h (target {s['rto_h']:>2} h) {status}")online shop worst-case loss 24 h (target 1 h), restore 6 h (target 4 h) MISSES RPO and RTO
file server worst-case loss 12 h (target 24 h), restore 20 h (target 48 h) OK
payroll worst-case loss 24 h (target 24 h), restore 8 h (target 72 h) OK
The shop needs more frequent backups (or database replication with point-in-time recovery) and a faster restore path. You only know restore times if you test restores.
Protecting the backups themselves
- Separate credentials: the backup system must not be administered with normal domain accounts; use MFA and dedicated admin accounts.
- Immutability: object-lock / WORM storage with a retention period, so even a stolen admin key can't delete recent backups.
- Offline copies: tapes or disconnected disks rotated off-site.
- Encrypt backups (they contain everything an attacker wants) and keep the keys somewhere that survives the disaster.
- Monitor for deleted backup jobs and snapshots; that's a strong ransomware signal.
- Back up configuration too: identity provider settings, firewall rules, infrastructure-as-code.
When ransomware hits
Follow the incident response plan: isolate affected systems, preserve evidence, find the initial access and remove the attackers' persistence before restoring, or you may restore into a still-compromised network. Authorities in most countries discourage paying, since payment funds further attacks and doesn't guarantee working decryption or deletion of stolen data. Organisations with tested, isolated backups rarely face that choice.
Go further: A Ransomware Response Playbook goes step by step through a response, including the reporting deadlines.
Test yourself
What does the extra '1' in 3-2-1-1-0 require?
- One extra cloud provider
- One copy that is offline, air-gapped or immutable
- One daily full backup
- One encrypted copy
A system's RPO is 1 hour, but backups run every 24 hours. What's the problem?
- Restores will be too slow
- Up to 24 hours of data could be lost, far more than the agreed 1 hour
- Nothing
- The RTO is violated
Why must attackers' access be removed before restoring from backup?
- Restores are slower otherwise
- Otherwise the restored systems may be re-encrypted or still compromised
- Backups expire
- It's a legal requirement in every country