Backups & recovery
Backups decide whether ransomware (T1486) is a bad week or the end of the company. But the attacker knows it: before encrypting, they look for the backups, delete or encrypt them too, and remove the system’s snapshots (T1490, Inhibit System Recovery). A backup only counts if it meets two conditions: the attacker can’t destroy it even with control of the domain, and it has actually been restored recently.
What it solves
Section titled “What it solves”- Getting back to a clean point after encryption, deletion, sabotage or failure.
- Not negotiating: with intact, tested backups, the ransom stops being the only way out (although it doesn’t prevent extortion over stolen data).
- Meeting recovery objectives agreed with the business, instead of discovering them on the day of the disaster.
The 3-2-1-1-0 rule
Section titled “The 3-2-1-1-0 rule”| Digit | Meaning | Why |
|---|---|---|
| 3 | Three copies of the data (production plus two) | One failure doesn’t take everything |
| 2 | On two types of media or platform | A technology failure doesn’t either |
| 1 | One off-site | Fire, flood, theft |
| 1 | One immutable or offline | Privileged ransomware can’t reach it |
| 0 | Zero errors in the last verified restore | An untested backup is a hypothesis |
An architecture that resists a privileged attacker
Section titled “An architecture that resists a privileged attacker”flowchart LR
P["Production<br/>(domain)"] -->|"agent sends<br/>append-only"| R[("Append-only<br/>repository")]
R --> O[("Off-site copy<br/>immutable / object<br/>lock")]
M["Backup administration<br/>outside the domain,<br/>strong MFA"] -->|"prune and retention"| R
M --> O
A(("Attacker with<br/>domain admin")) -.->|"delete backups"| R
A -.-x|"no credentials"| M
O --> T["Tested<br/>restore<br/>(measured RTO)"]
- Separate credentials: the backup server and console aren’t joined to the production domain or, at minimum, use accounts that don’t exist in it, with phishing-resistant MFA (IAM). Taking Active Directory must not hand over the backups.
- Append-only: machines sending backups can add data but not delete or overwrite it. Pruning is done by another system with other credentials.
- Immutable: object lock (WORM, object lock in compliance mode) with a retention not even the administrator can shorten, or a physically disconnected copy.
- Enough retention: modern ransomware waits days or weeks before encrypting. If retention is 7 days and the intrusion started 10 days ago, every backup contains the backdoor.
In practice: a repository the attacker can’t empty
Section titled “In practice: a repository the attacker can’t empty”With restic 0.16.4 and rest-server 0.14.0 in --append-only mode (lab on a single machine; in production the backup server is another machine):
rest-server --path /srv/restic --listen 127.0.0.1:8000 --append-only --no-auth # --no-auth only in the labexport RESTIC_REPOSITORY=rest:http://127.0.0.1:8000/ RESTIC_PASSWORD='...'restic initrestic backup /datos --tag diariocreated restic repository 47fba55c33 at rest:http://127.0.0.1:8000/processed 21 files, 527.732 KiB in 0:00snapshot 5165de88 savedRansomware is simulated: the 20 files in /datos/facturas are encrypted with OpenSSL and the originals deleted. Then, with the client’s own credentials (the ones the attacker would have), an attempt is made to delete the backup:
restic forget 5165de88 --pruneRemove(<snapshot/5165de8800>) returned error, retrying after 275.660871ms: blob not removed, server response: 403 Forbidden (403)Remove(<snapshot/5165de8800>) returned error, retrying after 671.153816ms: blob not removed, server response: 403 Forbidden (403)...The server refuses the deletion. Restore and check:
restic restore latest --target /restauradosha256sum -c hashes.orig # hashes computed before the "attack"restic check --read-dataSummary: Restored 25 files/dirs (527.732 KiB) in 0:00facturas/factura_8.txt: OKfacturas/factura_9.txt: OKresumen.txt: OK[0:00] 100.00% 2 / 2 packsno errors were foundAll 21 files match their original hashes, and check --read-data reads and verifies every block in the repository, not just the index.
RPO, RTO and what gets restored first
Section titled “RPO, RTO and what gets restored first”| Concept | Question | Determined by |
|---|---|---|
| RPO (recovery point) | How much data can be lost? | Backup frequency |
| RTO (recovery time) | How long can the service be down? | Restore speed and order |
| Recovery order | What’s needed before what? | Dependencies: identity, DNS and network before applications |
Restoring the business after ransomware isn’t restoring files: Active Directory or the IdP must be rebuilt from a clean point, then the network and DNS, then each application in order. Without a documented and rehearsed order, the real RTO is far longer than the planned one (business continuity).
Restore tests
Section titled “Restore tests”- Periodic and timed: the measured time is the real RTO.
- Full service, not a single file: a virtual machine that boots, a database that opens, an application that works.
- From the immutable copy, which is the one used in the worst case.
- In an isolated environment: restoring an infected backup into production reinfects it. Analyzing it first (scanning, the incident’s indicators) is part of incident response.
Detection
Section titled “Detection”- Failed backup jobs and sudden drops in backed-up volume.
- Snapshot deletion:
vssadmin delete shadows,wmic shadowcopy delete,wbadmin delete catalog,bcdeditdisabling recovery; there are Sigma rules for all of them (detection). - Access to the backup console outside business hours or from non-administration machines.
- Retention changes, deleted jobs or rejected deletion attempts on the repository (the
403s above make an excellent alert).
Common mistakes
Section titled “Common mistakes”- A backup server joined to the domain and administered with the same domain admin account.
- One week of retention against an attacker who’s been inside for three.
- An “off-site” copy synchronized in real time: it replicates the encryption too.
- Never having tested a full restore.
- Backing up the data but not the configuration needed to use it (encryption keys, secrets, the recovery order documentation).
Real cases
Section titled “Real cases”- Veeam Backup & Replication (CVE-2023-27532): the vulnerability allows obtaining credentials stored in the configuration; it’s in CISA’s KEV with known use in ransomware campaigns. Backup software is a top-priority target and gets patched first (patch management).
- Backup and virtualization infrastructure: the M-Trends 2026 report notes that in 2025 attackers targeted backup and virtualization infrastructure with greater precision. Destroying backups and hypervisors before encrypting is now part of the usual playbook.
Checklist
Section titled “Checklist”- 3-2-1-1-0 met, with at least one immutable or offline copy
- Backup administration outside the domain, with phishing-resistant MFA
- Clients with append-only permissions; pruning from another system
- Retention matched to how long an intrusion can go undetected
- RPO, RTO and recovery order per service, approved by the business
- Full, timed restores from the immutable copy
- Alerts for snapshot deletion, backup failures and retention changes
- Backup software patched as a critical system