On Sunday 9 July 2028, at eleven in the morning, Laura Méndez was able to say something to Andrés Vidal that changed the conversation completely: «the backups are intact». From that moment on, the €180,000 question stopped being a difficult decision and became a five-minute one. Had that sentence been the opposite, all the work of the previous five modules — the architecture, the controls, the plan, the six-minute coordinated cut-off — would have served to manage the end of the company elegantly.
That is where backups sit in security: the last line. They prevent nothing, they detect nothing, they contain nothing. They are simply the only thing left when everything else has failed, and they determine whether a company of 180 employees still exists next month.
This lesson closes module 5 and is, deliberately, the most operational of them all. You will see how to design backups an attacker with domain administrator privileges cannot destroy, why a backup with no tested restore is not a backup, how to build a continuity plan that lets the warehouses in Zaragoza, Valencia and Seville dispatch goods with a paper pad, and how a ransomware attack runs from start to finish with the decisions that have to be taken in the first hour. And you will finish with Rutalia's full recovery drill: a Friday afternoon, fs01 and the ERP encrypted, and twenty-six hours later the company operating.
- What backups are and what they are not
A backup is an independent copy of the information that lets you restore it to a known earlier state. The two words that matter are «independent» and «known».
| What is a backup | What is NOT a backup |
|---|---|
| A copy on a medium the original system cannot modify | A duplicated folder on the same server |
| A copy you can restore and have tested | A scheduled task nobody has checked for two years |
| A copy with earlier versions accessible | A sync that replicates the deletion or the encryption in seconds |
| A copy whose encryption key is held separately | A copy encrypted with a key that was in \\fs01\comun\claves.xlsx |
| A snapshot, as a complement | A snapshot as the only copy: ransomware deletes them |
| A replica, as a complement | A replica as the only copy: it faithfully replicates the disaster |
The sync trap
The most widespread conceptual mistake: confusing synchronisation with backup.
| Synchronisation (OneDrive, rsync, replication) | Backup | |
|---|---|---|
| What it does | Keeps the destination the same as the source | Stores earlier states of the source |
| If you delete a file | It is deleted at the destination | It is still in the backup |
| If ransomware encrypts | It is encrypted at the destination too | The earlier copy is still clean |
| Against a hardware failure | Protects | Protects |
| Against human error | Does not protect | Protects |
| Against ransomware | Does not protect | Protects, if it is immutable or isolated |
Synchronisation protects against a disk failing. Ransomware does not break disks: it encrypts files, and synchronisation propagates the encryption. Many organisations that believed they had backups actually had a very fast replica of their own disaster.
- Backup types and their effect on the recovery window
| Type | What it copies | Space | Backup time | Restore time | Risk |
|---|---|---|---|---|---|
| Full | Everything, every time | Maximum | Maximum | Minimum: a single set | None structural |
| Incremental | What has changed since the last backup of any type | Minimum | Minimum | Maximum: the full one + every incremental in order | If one incremental is missing, everything after it is lost |
| Differential | What has changed since the last full backup | Medium, growing | Medium | Medium: the full one + the last differential | If the differential is missing, you fall back to the previous one |
| Synthetic full | A full backup is built at the destination from the previous one plus the changes | Medium | Low (at the source) | Minimum | Depends on the software |
Block-level with deduplication (restic, borg) |
Only new blocks; every snapshot looks like a full one | Minimum | Minimum | Minimum | Repository corruption if it is not verified |
A concrete example: the 4 TB of fs01
| Scheme | Space for 30 days | Restoring a Thursday disaster |
|---|---|---|
| Daily full | 120 TB | 1 set |
| Weekly full + daily incremental | ~21 TB | 1 full + 4 incrementals |
| Weekly full + daily differential | ~32 TB | 1 full + 1 differential |
restic with deduplication, 30 snapshots |
~6.5 TB | 1 snapshot (any of them) |
That is why Rutalia uses a block-level system with deduplication: every snapshot restores as though it were a full backup, but takes up the space of an incremental. It is the best combination of the three columns that matter.
The relationship with RPO and RTO
The two concepts from 02-01, now with budget consequences:
- RPO (Recovery Point Objective): how much data you can afford to lose. It is determined by the frequency of the backup. An RPO of 1 hour requires backing up hourly, or replicating continuously.
- RTO (Recovery Time Objective): how long you can take to get operating again. It is determined by the restore speed, the availability of the medium and the recovery order.
flowchart LR
A["Last valid<br/>backup"] -.->|"RPO<br/>data lost"| B["INCIDENT"]
B -.->|"RTO<br/>time without service"| C["Service<br/>restored"]
style B fill:#f8d7da,stroke:#721c24
style C fill:#d4edda,stroke:#155724
The RTO trap. The RTO is not the time it takes for the file to copy back from the destination. It is the total time: detecting, deciding which backup to restore from, getting hold of the medium, restoring, validating, and returning the service. In the July incident, restoring
fs01took 2 h 40 min to copy the data and 4 h 15 min in total. An RTO calculated on disk speed alone is an RTO that will not be met.
- The 3-2-1-1-0 rule applied to Rutalia
The classic 3-2-1 rule has been extended because of ransomware. The full version:
| Digit | Meaning | Protects against |
|---|---|---|
| 3 | Three copies of the data (the original + two copies) | Media failure |
| 2 | On two different types of media | Systematic failure of one technology |
| 1 | One copy off site | Fire, flood, theft, disaster at the site |
| 1 | One copy that is immutable or disconnected (air gap) | Ransomware and an attacker with privileges |
| 0 | Zero errors in restore verification | Backups that exist and are useless |
Applied to fs01 (A010) and the customer database (A005)
| Element | Implementation at Rutalia | Satisfies |
|---|---|---|
| Original | fs01 (VLAN 20) / srv-db01 |
— |
| Copy 1 | restic repository on srv-bkp01 (VLAN 80 BACKUPS), local disk |
3 |
| Copy 2 | Replica of the repository in S3 rutalia-backups-clientes, with object lock |
3, 2 (disk/objects), 1 (off site) |
| Immutable copy | The same bucket, in compliance mode with 35-day retention | 1 (immutable) |
| Disconnected copy | Monthly LTO tape in a bank safe deposit box in Zaragoza | 1 (real air gap) |
| Verification | Weekly restic check + monthly test restore + annual drill |
0 |
Why Rutalia also keeps the monthly tape, which looks old-fashioned: it is the only copy that is not connected to anything. A bucket with object lock is extraordinarily resistant, but it depends on the AWS account configuration being correct and on nobody with sufficient privileges having altered it. A tape inside a bank safe deposit box does not have that failure mode. Cost: €40 of media a month and one hour of work.
The lesson of the canonical scenario
In the Rutalia of module 1, the backups sat on a server reachable over the network with the same domain administrator credentials the attacker had obtained. On day 24 they deleted them in four minutes, before encrypting anything. That is what turns an incident into a catastrophe: not the encryption, but the encryption being irreversible.
The rule to internalise:
If a compromised domain administrator can delete your backups, you do not have backups: you have an operational convenience.
- Immutability and isolation: the difference against ransomware
There are three ways of making a backup survive an attacker with privileges. They can be combined.
| Mechanism | How it works | Resistance | Cost | Drawback |
|---|---|---|---|---|
| Physical disconnection (air gap) | The medium is not connected to any network | Maximum | Low (tape) or high (automated) | Manual; high RPO; requires discipline |
| Storage-level immutability | The system prevents objects being deleted or modified for a period, even by the owner | Very high | Medium | Requires correct, well-understood configuration |
| Append-only repository | The account that writes can create, but not delete or modify | High | Low | If the attacker compromises the maintenance account, it is not enough |
The correct threat model
To design backups you have to answer one specific question: what can an attacker who controls the source server and the domain administrator credentials do?
| Backup design | Does it survive? | Why |
|---|---|---|
| Network share with write permissions from the server | No | It encrypts or deletes the backup folder |
| Backup server in the domain, with a domain account | No | It signs in and deletes the repository |
| Backup server outside the domain that fetches the data (pull model) | Partly | The source has no credentials for the destination, but the destination does have credentials for the source |
| Append-only repository: the source can write but not delete | Yes, to a large extent | Even if it encrypts new data, the earlier snapshots remain |
| Object storage with a lock in compliance mode | Yes | Not even the account owner can delete before the date |
| Tape in a safe deposit box | Yes | It is not connected |
The two decisions that protect most, and that Rutalia applied after the EM-2028-01 exercise in May:
- A pull model with an append-only account.
srv-bkp01is outside the domain, has its own set of credentials and is the one that goes and fetches the data. The source server knows no credential at all for the backup system. An attacker onfs01has nothing with which to attack the repository. - Object lock in compliance mode on the S3 bucket. In compliance mode, not even the account's root user can delete an object before its retention expires. That is the difference from governance mode, which a user with the right permission can override — and that permission is exactly what an attacker will look for.
A detail it is expensive not to understand. Compliance mode is irreversible: once a retention is set, those objects take up space and are paid for until it expires, whatever happens. The retention has to be sized carefully (35 days at Rutalia, not 3,650) and tested first on a test bucket. It is real protection precisely because there is no way back.
- Retention, versions and the cost of storage
The two retention questions are how many versions and for how long, and the right answer is not «all of them, for ever».
The grandfather-father-son scheme, in a modern version
| Level | Frequency | Kept for | What it is for |
|---|---|---|---|
| Hourly | Every hour (A001, A005 only) | 24 h | An RPO of 1 hour |
| Daily | Every night | 30 days | The usual case: deletion, corruption, recent incident |
| Weekly | Sundays | 12 weeks | Late detection |
| Monthly | First day of the month | 12 months | Contractual and tax obligations |
| Annual | January | 5 years | Legal obligations, on tape |
Why long retention matters against ransomware
It is a counter-intuitive and very important argument. A modern attacker does not encrypt the day they get in: they do it after days or weeks inside. In the canonical scenario, twenty-five days. If your retention is fourteen days, on the day of the encryption every backup you have postdates the compromise: they may contain the implant, the created accounts and the persistence. Restoring from them is reinfecting yourself.
Practical rule: backup retention must comfortably exceed an attacker's typical dwell time. With 30 daily and 12 weekly snapshots, Rutalia can restore to a point before a three-month intrusion. With 7 days, it could not even restore to a point before the July intrusion.
The real cost
| Asset | Volume | Scheme | Effective storage | Estimated annual cost |
|---|---|---|---|---|
fs01 (A010) |
4 TB | restic, 30+12+12 snapshots |
~7.5 TB | ~€1,700 (S3 + local) |
| PostgreSQL (A005) | 180 GB | Hourly + daily + continuous WAL | ~0.9 TB | ~€210 |
| ERP (A002) | 600 GB | Daily + monthly | ~1.4 TB | ~€330 |
| M365 (A004) | 1.2 TB | Third-party backup, daily | ~2.2 TB | ~€2,400 (service) |
| Servers (images) | 900 GB | Weekly + monthly | ~1.8 TB | ~€400 |
| Monthly LTO tape | — | 12 tapes/year + safe deposit box | — | ~€780 |
| Total | ~€5,820/year |
€5,820 a year. Compare it with the €180,000 ransom, or with the €340,000 of the full scenario. It is, by a distance, the control with the best ratio of cost to damage avoided in the whole course.
- Encrypting the backups and looking after the keys
Backups contain exactly the same sensitive information as the source systems, concentrated and in a format that is convenient to carry away. They are always encrypted, in transit and at rest.
But encryption introduces a new and devastating failure mode:
If you lose the key, you have no backups. And if the key was in
claves.xlsxinside\\fs01\comun, you have none either: becausefs01has been encrypted by the attacker.
Rules for looking after backup keys
| Rule | Implementation at Rutalia |
|---|---|
| The key is not stored on any system the backup protects | Outside the domain, outside fs01, outside M365 |
| There are at least two copies of the key, in different locations | Management safe + bank safe deposit box |
| The key is on paper, as well as in digital form | Printed, in a sealed, numbered envelope |
| Recovering it requires two people | Laura + Andrés Vidal, with a written record |
| It is proved that the key works | Monthly test restore, which actually uses it |
| Rotation is planned and documented | Annual, with re-encryption or an overlap period |
| It is included in the succession plan | If Laura and Diego are unavailable, somebody can restore |
The scenario to avoid, and that does happen. A company with impeccable, immutable, verified backups. Ransomware. They go to restore. The repository passphrase was in the corporate password manager, which is on a domain server, which is encrypted. Perfect backups, unreachable. The check that prevents it takes five minutes: «if we lost every system today, where would we get the backup repository key from?». If the answer mentions any corporate system, there is a problem.
- Microsoft 365, the cloud and the «the cloud already backs it up» misunderstanding
It is probably the most widespread false belief in SMEs, and the one that has cost the most data.
What Microsoft 365 does and what it does not
| Microsoft 365 does guarantee | Microsoft 365 does not guarantee |
|---|---|
| That the service is available (high availability) | That you can recover a mailbox deleted six months ago |
| Redundancy of its infrastructure | Protection against deletion by a user or an attacker |
| Limited retention of deleted items (days or a few weeks, depending on configuration) | Retention of years |
| SharePoint and OneDrive recycle bins, with limited periods | Recovery after those periods expire |
| Retention if you configure specific policies | Granular recovery to an arbitrary point in time |
The model is the same shared responsibility model from 04-04: the provider is responsible for the availability of the service; you are responsible for your data. And it is written in the service terms.
The three scenarios that demonstrate the difference:
- An attacker with access to Nuria Campos's mailbox deletes two years of email. Once the deleted items retention period has passed, there is no recovery.
- An employee deletes a SharePoint library. It is discovered four months later, when someone looks for a contract.
- Ransomware encrypts files synced with OneDrive. The sync propagates the encryption to the cloud.
After the July incident, Rutalia bought a third-party backup service for M365 (mailboxes, OneDrive, SharePoint and Teams), with 12-month retention and granular restore. Cost: around €2,400/year for 180 mailboxes.
Backups of cloud systems and of configurations
And one category almost nobody includes in the backup plan: the configuration. If Rutalia's infrastructure has to be rebuilt from scratch tomorrow, the data is not enough.
| What to back up | Where it lives | How |
|---|---|---|
fw-zgz01 configuration |
nftables |
Daily export to a Git repository |
| Suricata rules and sensor configuration | sec-sensor01 |
Git repository |
| AD group policies (GPOs) | dc01 |
Weekly GPO backup, outside the domain |
| AWS infrastructure | Account 123456789012 |
Infrastructure as code in Git + configuration export |
| M365 and identity configuration | Portal | Documented periodic export |
| MiRutalia deployment configuration | srv-web01 |
Git repository + environment variables encrypted separately |
| Asset inventory, contacts and the plan itself | — | Paper + encrypted USB stick (05-01) |
A one-minute thought experiment. «If all our servers and our whole AWS account disappeared today, could we rebuild the infrastructure from what we have stored outside?». If the answer depends on what one person remembers, there is an outstanding action.
- Rutalia's backup plan, asset by asset
This is the operational table of the plan. Every column has an owner and every one is verified.
| Asset | RTO | RPO | Backup type | Frequency | Where (3-2-1-1) | Retention | Test | Owner |
|---|---|---|---|---|---|---|---|---|
| A001 MiRutalia | 4 h | 1 h | Server image + code in Git + configuration | Daily (image), continuous (code) | srv-bkp01 + immutable S3 |
30 d / 12 w | Monthly: full deployment in the test environment | Marta Ruiz |
| A002 ERP | 8 h | 4 h | DB dump + server image | Every 4 h (DB), daily (image) | srv-bkp01 + S3 + monthly tape |
30 d / 12 w / 12 m | Quarterly: restore into an isolated environment | Diego |
| A003 Active Directory | 2 h | 15 min | System state of dc01 and dc02 + GPO backup |
Every 12 h (state), weekly (GPO) | srv-bkp01 outside the domain + S3 |
30 d / 12 w | Twice yearly: full forest restore with CiberTest | Diego |
| A005 PostgreSQL DB | 4 h | 1 h | Full base backup + continuous WAL archiving | Daily full, continuous WAL | srv-bkp01 + immutable S3 |
30 d / 12 w / 12 m | Monthly: point-in-time restore | Diego |
| A004 Microsoft 365 | — | 24 h | Third-party backup service | Daily | The provider's cloud (independent) | 12 months | Quarterly: restore of one mailbox | Laura |
| A006 IoT probes | 30 min | 5 min | Configuration (there is no data to back up) | On change | Git | Indefinite | Annual | Diego |
| A007 Fleet tablets | — | — | Nothing local: everything is in M365 | — | Via A004 | — | Annual | Diego |
| A008 Corporate website | 24 h | 24 h | Files + DB + configuration | Daily | S3 + Git | 30 d | Twice yearly | Marta Ruiz |
| A009 S3 | — | — | Versioning + cross-region replication | Continuous | Replicated bucket | 90 d | Twice yearly | Diego |
A010 \\fs01\comun |
4 h | 4 h | restic with deduplication |
Every 4 h | srv-bkp01 + immutable S3 + monthly tape |
30 d / 12 w / 12 m / 5 y | Monthly: restore of 3 random folders | Diego |
Three details of the plan that make the difference:
- A003 (Active Directory) has the most demanding test — a full forest restore, twice a year, with the external provider — because it is the hardest to improvise and the one that has ruined the most incidents. A badly executed AD restore reintroduces compromised objects.
- A010 is tested with «3 random folders», not with a fixed folder. A test always on the same folder validates one folder, not the repository.
- A007 (tablets) has no local backup, and that is a design decision, not an oversight: the tablets store nothing that is not in M365. The backup of A007 is the backup of A004. Documenting it stops somebody «discovering» the gap two years from now and treating it as a failure.
- Verification: a backup with no tested restore is not a backup
This section is the most important in the lesson. The uncomfortable statistic in the industry is that a very high proportion of restores fail the first time they are attempted for real, and they are attempted for real on the worst possible day.
The three levels of verification
| Level | What it checks | What it does not check | Frequency |
|---|---|---|---|
| 1. The backup ran | That the task finished without error | That the data is readable or complete | Daily, automated |
| 2. The backup is intact | That the repository data is not corrupt (restic check --read-data) |
That it can be used after restoring | Weekly, automated |
| 3. The restore works | That the restored data is complete, intact and usable | — | Monthly and annually |
Almost everybody does level 1 and believes that is what having backups means. Level 1 does not detect: a corrupt repository, a configuration file that means only 40 % of the folders get backed up, a database copied live without consistency, an incorrect encryption key, or a file copied without its permissions.
What each test measures
| Test | Frequency | What it measures | Success criterion |
|---|---|---|---|
| Repository integrity check | Weekly | Data corruption | restic check --read-data-subset=10% with no errors |
| Restore of random files | Monthly | That the data is readable and correct | 3 folders restored; hashes match; permissions correct |
| Point-in-time restore of a database | Monthly | Point-in-time recovery | The DB starts, the test queries return what is expected |
| Restore of a whole server into an isolated environment | Quarterly | The real RTO | Service running in less than its RTO |
| Annual full recovery drill | Annual | The whole process, including the people | Critical services operational in the planned order and timings |
Recording the results
A test with no record is worth nothing: it does not demonstrate compliance, it does not let you see trends and it does not convince the insurer.
# registro_pruebas_restauracion.yaml
- test: "PR-2028-09"
date: "2028-09-15"
asset: "A010 \\\\fs01\\comun"
type: "Restore of random files"
source: "restic, snapshot 2028-09-14T02:00:00Z, S3 repository"
scope: ["\\Clientes\\C0142", "\\RRHH\\Contratos\\2027", "\\Tarifas\\2028"]
executed_by: "Diego Salas"
verified_by: "Laura Mendez"
result: "CORRECT with a caveat"
restore_time: "00:18:42"
files: 4812
matching_hashes: 4812
caveat: >
The NTFS permissions on \RRHH\Contratos\2027 were restored with the backup
account as owner, not the original one. Fixed by adding the ACL preservation
option. The test needs repeating.
action: "PR-2028-09b on 22/09/2028"
status: "Repeated on 22/09: CORRECT with no caveats"Look at the caveat. The test «worked»: the files were restored and the hashes matched. But the permissions did not. In a real restore of \RRHH, that would mean every employee could have accessed everybody's contracts. It is exactly the kind of failure that only shows up by testing, and that in a crisis restore nobody would have noticed until it became a data protection incident.
Restore verification script
#!/usr/bin/env python3
"""
verificar_restauracion.py - Checks that a restore is complete and intact by
comparing it against a hash manifest generated before the disaster.
Usage: verificar_restauracion.py <manifest.sha256> <restored_directory> <test_id>
"""
import hashlib
import json
import sys
from datetime import datetime, timezone
from pathlib import Path
def sha256(path: Path, block: int = 1 << 20) -> str:
"""Hash of a file, read in blocks so it is never loaded whole into memory."""
h = hashlib.sha256()
with path.open("rb") as f:
for chunk in iter(lambda: f.read(block), b""):
h.update(chunk)
return h.hexdigest()
def load_manifest(path: Path) -> dict:
"""Reads a file formatted as '<hash> <relative path>' per line."""
expected = {}
with path.open(encoding="utf-8") as f:
for line in f:
line = line.rstrip("\n")
if not line:
continue
h, _, rel = line.partition(" ")
expected[rel] = h
return expected
def main():
if len(sys.argv) != 4:
sys.exit("Usage: verificar_restauracion.py <manifest> <directory> <test_id>")
manifest, base, test_id = Path(sys.argv[1]), Path(sys.argv[2]), sys.argv[3]
expected = load_manifest(manifest)
missing, corrupt, extra, correct = [], [], [], 0
# 1) Everything that should be there: is it there and identical?
for rel, expected_hash in expected.items():
target = base / rel
if not target.is_file():
missing.append(rel)
continue
if sha256(target) != expected_hash:
corrupt.append(rel)
else:
correct += 1
# 2) Are there files that should NOT be there? (possible contamination)
for p in base.rglob("*"):
if p.is_file():
rel = str(p.relative_to(base))
if rel not in expected:
extra.append(rel)
report = {
"test_id": test_id,
"date_utc": datetime.now(timezone.utc).isoformat(timespec="seconds"),
"manifest": str(manifest),
"directory": str(base),
"expected": len(expected),
"correct": correct,
"missing": missing[:50],
"total_missing": len(missing),
"corrupt": corrupt[:50],
"total_corrupt": len(corrupt),
"extra": extra[:50],
"total_extra": len(extra),
"result": "CORRECT" if not missing and not corrupt else "FAILED",
}
output = Path(f"/evidencias/pruebas/{test_id}.json")
output.parent.mkdir(parents=True, exist_ok=True)
output.write_text(json.dumps(report, indent=2, ensure_ascii=False), encoding="utf-8")
print(f"[{report['result']}] {correct}/{len(expected)} correct - "
f"{len(missing)} missing - {len(corrupt)} corrupt - {len(extra)} extra")
print(f"Report: {output}")
sys.exit(0 if report["result"] == "CORRECT" else 1)
if __name__ == "__main__":
main()Explanation of the decisions:
- Reading in 1 MiB blocks makes it possible to hash files of several gigabytes without exhausting memory, which is essential when verifying a restore of
fs01. - Three things are checked, not one. Missing (incomplete restore), corrupt (damaged restore) and extra (contamination). The third is the one almost nobody checks and the one that would reveal that the restored directory contains files that were not in the original: for example, remnants of the attacker in a backup taken after the compromise.
- Each list in the report is capped at 50 items so that it does not become unmanageable, but the totals are kept.
- The exit code (
sys.exit(0 or 1)) lets you chain the script into an automated task so that a failure raises an alert, rather than an email nobody reads. - The report is written to disk with a date and an identifier: it is the documentary evidence handed to the insurer and the auditor.
For it to work, the manifest is generated beforehand, as a routine, over the data in production:
# Weekly manifest of \\fs01\comun (run from the backup server, in pull mode)
cd /mnt/fs01-comun && find . -type f -print0 \
| xargs -0 sha256sum > /manifiestos/fs01_$(date -u +%F).sha256
- Business continuity and disaster recovery: BCP and DRP
Two plans that are constantly confused and that answer different questions.
| BCP — Business Continuity Plan | DRP — Disaster Recovery Plan | |
|---|---|---|
| Question | How do we keep operating while the systems are down? | How do we recover the systems? |
| Scope | The whole organisation: processes, people, premises, suppliers | Technology |
| Owner | Senior management | IT |
| Horizon | From minute one of the disaster | From the decision to recover |
| Example at Rutalia | Dispatching goods with paper delivery notes | Restoring fs01 from restic in 4 h |
| If it is missing | The company stops even though IT is working well | The outage drags on indefinitely |
They are complementary and they need each other. An excellent DRP with no BCP means the company sits idle for four hours while IT works. An excellent BCP with no DRP means the company runs on paper... for ever.
flowchart TD
A["DISASTER<br/>Friday 17:12"] --> B["BCP: activate<br/>manual workarounds"]
A --> C["DRP: activate<br/>technical recovery"]
B --> D["The company KEEPS OPERATING<br/>paper delivery notes, telephone,<br/>printed listings"]
C --> E["The systems COME BACK<br/>in order of dependency and RTO"]
D --> F["RECONCILIATION<br/>enter what was done on paper<br/>into the systems"]
E --> F
F --> G["Normality"]
style B fill:#d1ecf1,stroke:#0c5460
style C fill:#fff3cd,stroke:#856404
style F fill:#f8d7da,stroke:#721c24
The reconciliation node is the one almost nobody plans and the one that creates the following month's problems: paper delivery notes that were never invoiced, duplicated deliveries, stock that does not balance. Getting back to normal is not the systems starting up: it is the systems reflecting reality.
- Rutalia's business impact analysis (BIA)
The BIA (Business Impact Analysis) is the study that answers: if this process stops, what happens, when does it start to hurt and how long can we hold out? It is the document that underpins the RTOs and RPOs; without it, RTOs are opinions.
How it is done, in four steps
- Identify the business processes, not the systems. «Dispatching goods», not «the ERP».
- For each process, determine the impact of it stopping in time bands: 1 h, 4 h, 1 day, 3 days, 1 week. Financial, operational, legal and reputational impact.
- Set the MTPD (Maximum Tolerable Period of Disruption): the maximum time the organisation can hold out without that process before suffering serious or irreversible damage.
- Derive the RTO of each process (always lower than the MTPD, with margin) and from there the RTO of the systems that support it.
BIA of Rutalia Logística (2028)
| Process | Impact at 1 h | At 4 h | At 1 day | At 3 days | MTPD | RTO set | Systems that support it |
|---|---|---|---|---|---|---|---|
| Route planning | Low: the day's routes are already assigned | Medium: incidents cannot be replanned | High: next day's routes unplanned | Critical: operational collapse | 12 h | 8 h | A002 ERP, A010 fs01 |
| Dispatch and deliveries | Medium: the warehouses cannot print delivery notes | High: trucks idle, €1,500/h | Critical: breach of contract | Catastrophic: penalties and loss of customers | 4 h | 2 h (with manual BCP) | A002, A010, A007 |
| Customer service | Low: handled by telephone | Medium: no access to the history | High: unresolved complaints | Sustained high | 24 h | 4 h | A001 MiRutalia, A005 |
| Invoicing and collections | None | None | Low | High: cash flow pressure at month end | 5 days | 8 h | A002, A005 |
| Payroll and HR | None | None | None | Low (except at month end) | 10 days | 24 h | A002, A010 |
| Fleet tracking | Medium: no position for the trucks | Medium | High: no temperature traceability | High (risk to the goods) | 24 h | 30 min (recovers on its own) | A006, A007 |
| Supplier contracting | None | None | Low | Medium | 10 days | 24 h | A004, A010 |
What this BIA reveals
- The most critical process is not the most visible one. MiRutalia is the customer-facing part, but the process that stops the company within four hours is dispatch: if the Zaragoza warehouse cannot get goods out at six in the morning, the €1,500/h really does start running.
- The MTPD for dispatch is 4 hours, and its RTO is set at 2 hours. The margin is not a whim: time always passes between the disaster and the start of the recovery (detection, decision, mobilisation).
- The systems' RTOs are derived from the processes, not the other way round. The ERP's 8 h RTO was not chosen on technical grounds: it was derived from the 12 h MTPD of route planning.
- And the most important conclusion: the 2-hour RTO for dispatch is unreachable through technical recovery alone. That is why the BCP exists: dispatch must be able to work without systems.
- Continuity strategies: operating without systems
The paper pad
Rutalia's most effective continuity measure costs €90 a year and sits in a cupboard at each warehouse.
## CONTINUITY PROCEDURE PC-01
## DISPATCH WITHOUT SYSTEMS
Location of the materials: red cupboard next to the office at each warehouse.
Responsible for maintaining it: warehouse manager. Review: quarterly.
CONTENTS OF THE CUPBOARD
1. Pad of pre-printed, numbered delivery notes (3 carbonless copies).
2. Printed list of the 50 highest-volume customers, with address, reference,
delivery terms and telephone number. Updated monthly.
3. Printed list of drivers, vehicle registrations and telephone numbers.
4. Blank route sheets.
5. Departures register (one sheet per day).
6. Copy of the response plan and the contact card.
7. Calculator, pens, company stamp.
PROCEDURE
1. The warehouse manager activates PC-01 when instructed by the incident
coordinator, or on their own initiative if the systems have been down for
more than 30 min and there is a load pending.
2. Every dispatch generates a numbered manual delivery note:
- Original -> customer (signed on delivery)
- Copy 1 -> warehouse "PENDING ENTRY" folder
- Copy 2 -> driver
3. Every departure is noted in the day's register: time, vehicle registration,
driver, delivery note numbers, destination.
4. Problems are noted on the same sheet, not on loose pieces of paper.
5. Customer queries are passed to 976 XXX XXX (customer service), who hold the
same printed list.
RECONCILIATION (mandatory)
6. Within 48 h of service being restored, administration enters into the ERP
every delivery note in the "PENDING ENTRY" folder.
7. Double check: the warehouse manager verifies that the numbering is
sequential and that no delivery note from the pad is missing.
8. A delivery note not entered is a delivery not invoiced. The folder is not
filed until the head of administration signs off the full reconciliation.Catalogue of continuity strategies
| Strategy | Cost | RTO it allows | When it makes sense |
|---|---|---|---|
| Documented manual workaround | Very low | Immediate | Always. It is the best cost/benefit ratio there is |
| Cross-trained staff | Low | Immediate | Avoids depending on a single person |
| Cold backups (restore when needed) | Low | Hours to days | Systems with a high RTO (A008) |
| Prepared environment (warm site) | Medium | Hours | Critical systems (A003, A001) |
| Active replication (hot site) | High | Minutes | Only if the MTPD genuinely demands it |
| Alternative site | Medium | Hours to days | Rutalia uses its own warehouses as mutual alternatives |
| Alternative logistics provider | Contractual | Days | Framework agreement with a haulier for peaks and contingencies |
| Alternative connectivity | Low | Minutes | 4G router from the kit + secondary line |
| Working from another site | Low | Hours | Zaragoza administration can operate from Valencia |
The relationship between RTO and cost
flowchart LR
A["RTO 7 days<br/>Restore from tape<br/>~EUR 0 extra"] --> B["RTO 24 h<br/>Cloud backup<br/>+ images<br/>~EUR 2,000/year"]
B --> C["RTO 4 h<br/>Prepared environment<br/>~EUR 8,000/year"]
C --> D["RTO 1 h<br/>Active replication<br/>~EUR 25,000/year"]
D --> E["RTO 5 min<br/>Real high availability,<br/>two sites<br/>>EUR 60,000/year"]
style A fill:#d4edda,stroke:#155724
style C fill:#fff3cd,stroke:#856404
style E fill:#f8d7da,stroke:#721c24
The curve is exponential: every step down in RTO multiplies the cost. That is why the BIA is essential: without it, the temptation is to ask for RTOs of minutes for everything, which produces an impossible budget and, in practice, means nothing gets done. Rutalia spends around €5,800/year on backups and around €3,000 on continuity, and with that it covers RTOs of between 2 and 24 hours depending on the asset, which is exactly what the BIA says it needs.
- Ransomware from start to finish
With all of the above in hand, you can now walk through the full attack. Modern ransomware is not «a virus that encrypts files»: it is a commercial operation lasting several weeks carried out by specialised teams.
How it arrives and what it does today
| Phase | What happens | Typical duration | Where it is cut off |
|---|---|---|---|
| Initial access | Phishing, bought credentials, exposed vulnerability, compromised supplier | — | Email, MFA, patching, supplier control |
| Reconnaissance | Mapping the network, identifying valuable data and the backups | Days | Segmentation, behavioural detection |
| Escalation and lateral movement | Credential theft, domain administrator | Days | Administrative tiering, EDR, segmentation |
| Exfiltration | Copying data for double extortion | Days | Volume alerting, egress control |
| Neutralisation | Disabling antivirus by GPO, deleting snapshots, destroying the backups | Hours | Immutable backups, alert on GPO changes |
| Encryption | Simultaneous deployment, usually in the small hours or at a weekend | Hours | Detection of mass encryption |
| Extortion | Ransom note, countdown, partial publication as proof | Days to weeks | A plan and a defined position |
The levels of extortion
| Level | Leverage | Countermeasure |
|---|---|---|
| Single | «You will not be able to access your data» | Immutable, verified backups |
| Double | «And we will publish your data» | Encryption at rest, minimisation, egress control, early notification of the data subjects |
| Triple | «And we will tell your customers and launch a denial of service against you» | Proactive communication: if your customers already know from you, the leverage disappears |
| Quadruple | «And we will report you to the regulator for not notifying» | Notify on time. It has happened: groups that report their victims to the data protection authority |
The progression has a very clear reading: each new level attacks precisely those who have solved the previous one. Double extortion exists because immutable backups worked. And the countermeasure for levels 2 to 4 is not technical: it is having notified, having communicated and having complied.
- The first hour: a checklist
This list is printed, laminated and kept in the kit. It is executed in this order.
# RANSOMWARE - FIRST HOUR
# Rutalia Logistica - PC-RANSOM v1.1 - Print and keep in the red cupboard
MINUTES 0-5 - STOP THE SPREAD
[ ] Do NOT power off any machine. Isolate, do not power off.
[ ] Isolate via EDR every machine with active encryption.
[ ] If there is no EDR: unplug the network cable (do NOT power off).
[ ] Cut SMB between VLANs on fw-zgz01.
[ ] PHYSICALLY DISCONNECT srv-bkp01 from the network. ABSOLUTE PRIORITY.
[ ] Check that the S3 bucket still has object lock in place.
MINUTES 5-15 - ACTIVATE
[ ] Declare S1 (automatic trigger: mass encryption).
[ ] Activate the Signal group RUTALIA-IR. NEVER by email or Teams.
[ ] Notify the Managing Director.
[ ] Call the INSURER (before any other external party).
[ ] Activate the CiberTest retainer.
[ ] Write the TIME OF KNOWLEDGE on the record (72 h clock).
MINUTES 15-30 - ASSESS
[ ] What is encrypted? A specific list of machines and servers.
[ ] What is NOT encrypted? (just as important)
[ ] Are the backups intact? Verify on srv-bkp01 and in S3.
[ ] Is there a ransom note? Photograph it. Do NOT reply.
[ ] Is there evidence of exfiltration? Outbound volume for the last 14 days.
[ ] Identify the ransomware family (extension, note, sample).
[ ] Capture memory from ONE affected machine before touching it (key may be there).
MINUTES 30-45 - CONTINUITY
[ ] Activate PC-01 at all three warehouses (dispatch on paper).
[ ] Internal statement by SMS and noticeboards.
[ ] Alternative customer service phone line operational.
[ ] Tell the warehouse managers the estimated duration.
MINUTES 45-60 - PLAN
[ ] Fix the date/time of the LAST CLEAN BACKUP (predating the compromise).
[ ] Define the recovery order: network -> A003 -> A010 -> A005 -> A001 -> A002.
[ ] Assign owners per system.
[ ] Set the time of the next situation meeting (max. 2 h).
[ ] Start the legal assessment (personal data, AEPD, police report).
NEVER IN THE FIRST HOUR
[X] Power off servers.
[X] Restore before containing and knowing the date of the compromise.
[X] Reply to the attacker.
[X] Promise timescales to customers.
[X] Delete the encrypted files (decryptors may appear).
[X] Format anything.The most important line in the whole list is «PHYSICALLY DISCONNECT srv-bkp01». In many real incidents, the encryption is detected while it is still under way, and the backups are lost in the minutes following the detection, while the team is getting organised. Disconnecting them is a five-second action with a potential value of hundreds of thousands of euros.
And the penultimate item on the negative list deserves an explanation: do not delete the encrypted files. Over time, decryptors appear — through implementation errors by the attacker, through police operations that seize the keys, or through leaks. The No More Ransom project, driven by Europol and several companies in the industry, publishes free decryptors for dozens of families. Keeping a copy of the encrypted data costs storage; deleting it removes the last possibility for ever.
- Pay or recover: Rutalia's numbers
Section 14 of 05-03 explained why you do not pay. Here are the numbers, which is what convinces a board.
Scenario: full encryption of fs01, the ERP, both domain controllers and 140 workstations. Demand: €180,000.
| Item | PAY | RECOVER from backups |
|---|---|---|
| Ransom | €180,000 | €0 |
| Intermediary and professional negotiation | €15,000 | €0 |
| Time until the first system is back | 48-72 h (negotiation + delivery of the decryptor) | 4 h |
| Total recovery time | 6-8 days (decryptors are slow and partly fail) | 26 h |
| Downtime (working hours × €1,500) | ~6 days → €108,000 | 26 h, of which 14 are working hours → €21,000 |
| Rebuilding systems (necessary anyway) | €25,000 | €25,000 |
| Internal and external hours | €22,000 | €18,000 |
| Additional storage and hardware | €4,000 | €4,000 |
| Legal, notification and communication | €6,000 | €6,000 |
| Insurance excess | €5,000 | €5,000 |
| TOTAL | €365,000 | €79,000 |
| Is all the data recovered? | No: decryptors typically recover part of it | Yes, up to the RPO |
| Is non-publication guaranteed? | No | No, but you are not paying for a promise either |
| Is there legal risk from international sanctions? | Yes | No |
| Does the policy cover it? | It depends, with many conditions | Yes |
| Are you marked as a victim who pays? | Yes | No |
Difference: €286,000. And the most counter-intuitive part of the table: paying does not avoid the rebuild. A decrypted system is still compromised — the implant is still there, the credentials are still stolen — and it has to be rebuilt anyway. You pay for the data, not for the clean-up.
The cost of getting the right-hand column: around €5,820/year on backups, plus around €3,000 on continuity. €8,820 a year against €286,000 of difference in a single incident.
And the honest nuance that has to be said out loud. There are companies that pay, and some of them had no reasonable alternative. The difference between being able to decide and not being able to decide is built years earlier, in boring decisions about retention, immutability and restore tests. On the day of the ransomware, the decision has already been made.
- A full drill: the Friday in October
On 20 October 2028 Rutalia ran its annual full recovery exercise, planned in PRI-RUT-2028 since April. It was not a tabletop exercise: it was a real recovery, carried out on isolated test infrastructure, with the scenario narrated as though it were happening, with the real people, the real procedures and the clock running.
Scenario: Friday, 17:12. Ransomware detected encrypting fs01, srv-erp01 and 62 workstations. Ransom note demanding €180,000. Vector: the ERP supplier's credentials (hypothesis H5), who came in through exception EXC-2027-014.
Timeline of the exercise
| Time | Action | Observer's notes |
|---|---|---|
| Fri 17:12 | An administrator calls: her files «have a strange extension» | The human call, once again, as the first signal |
| 17:14 | Diego confirms active encryption. Declares S1 | 2 min. Excellent |
| 17:16 | srv-bkp01 physically disconnected from the network |
The priority action in PC-RANSOM, executed from memory |
| 17:18 | EDR isolation of 62 workstations and 2 servers | 90 s for all 64 machines |
| 17:21 | SMB cut between VLANs; the ERP supplier's access revoked | — |
| 17:24 | Signal group active. Andrés Vidal online | — |
| 17:30 | Insurer notified. Retainer activated | Correct order |
| 17:35 | Confirmed: S3 bucket with the lock intact; September tape complete | The moment that changes the exercise |
| 17:40 | Time of knowledge recorded: 17:12 | The field on the record did its job |
| 17:45 | PC-01 activated in Zaragoza, Valencia and Seville | All three warehouse managers found the red cupboard |
| 18:00 | Internal statement by SMS. Alternative phone line operational | — |
| 18:30 | Situation meeting. Last clean backup fixed: Thursday 19, 02:00 | Real RPO: 39 h for fs01, 15 h for the ERP |
| 19:10 | Recovery order agreed. Owners assigned | — |
| 19:40 | Restore of A003 (AD) started in an isolated environment | — |
| Fri 22:05 | AD restored and validated. 2 h 25 min (RTO: 2 h) | Outside RTO by 25 min. Finding no. 1 |
| 22:30 | Handover: Diego rests, CiberTest carries on | Written handover, 12 min |
| Sat 02:15 | fs01 restored (3.8 TB). Hashes verified with the script |
4 h 10 min. Within expectations |
| Sat 03:00 | Validation of fs01: permissions correct (September's caveat had been fixed) |
The monthly test paid off |
| Sat 06:20 | PostgreSQL restored to a point in time (Thursday 23:50) | 1 h RPO met thanks to WAL archiving |
| Sat 07:00 | Warehouses open. Saturday half day, operating with PC-01 | The business did not stop |
| Sat 09:15 | MiRutalia operational after the 9 validations | 16 h from the disaster |
| 10:30 | Rebuilding of the 62 workstations from a clean image, in batches of 20 | 40 min per batch |
| Sat 14:40 | ERP operational. Entry of the paper delivery notes begun | — |
| Sat 17:00 | Full credential rotation, krbtgt included (1st time) |
— |
| Sat 19:20 | All services operational and validated | 26 h 8 min from the start |
| Sun 11:00 | Reconciliation: 214 paper delivery notes entered and verified | 3 discrepancies, all resolved |
| Mon 09:00 | Review of the exercise with all the participants | — |
Result: 26 hours and 8 minutes
| Metric | Target | Result | Assessment |
|---|---|---|---|
| Detection → declaration | < 15 min | 2 min | Excellent |
| Protection of the backups | < 10 min | 4 min | Excellent |
| A003 Active Directory | RTO 2 h | 2 h 25 min | Fail |
A010 fs01 |
RTO 4 h | 4 h 10 min from its start | Acceptable |
| A005 PostgreSQL | RTO 4 h | Within | Correct |
| A001 MiRutalia | RTO 4 h | Within, from its start | Correct |
| A002 ERP | RTO 8 h | Within | Correct |
| Dispatch operational | MTPD 4 h | 33 min (PC-01) | Excellent |
RPO of fs01 |
4 h | 39 h | Serious fail |
| Full recovery | 48 h | 26 h 8 min | Excellent |
The six findings from the exercise
| # | Finding | Action | Owner | Deadline |
|---|---|---|---|---|
| 1 | AD took 2 h 25 min: the forest restore procedure was not written out step by step and documentation had to be consulted | Write the detailed procedure and rehearse it separately | Diego + CiberTest | 15/12/28 |
| 2 | Real RPO of fs01: 39 h, against the 4 h target. The 4-hourly backup existed, but it postdated the compromise: it was necessary to go back to Thursday's |
Increase the retention of fs01 hourly snapshots from 24 h to 7 days, so there are more clean points to fall back to |
Diego | 30/11/28 |
| 3 | The customer list in the red cupboard in Seville was 7 months old | Put the quarterly review of the PC-01 materials in the calendar, with acknowledgement | Warehouse managers | 31/10/28 |
| 4 | Nobody knew where the key to the bank safe deposit box was outside banking hours | Document the procedure and the real access times for the tape | Laura | 15/11/28 |
| 5 | Delivery note reconciliation had no assigned owner in the procedure | Add a named owner and a 48 h deadline to PC-01 | Administration | 31/10/28 |
| 6 | It took 23 min to decide which backup to restore from, for lack of a timeline of the attack | Add the step «fix the date of the first compromise» to PC-RANSOM before choosing the backup | Laura | 30/11/28 |
Finding 2 is the most valuable of the exercise, and it is exactly the lesson of the July incident applied at a larger scale. The backup existed, it was intact and it was restorable. But it postdated the compromise, and therefore it was useless. The theoretical RPO of 4 hours was unrealistic against an attacker who had been inside for days: the effective RPO against ransomware is determined not by the backup frequency but by how many clean restore points you have before the date of the compromise. It is an idea that does not appear in the textbook definition of RPO and that is only discovered by running the exercise.
What would have happened to the Rutalia of module 1
| Element | Rutalia, January 2027 | Rutalia, October 2028 |
|---|---|---|
| Detection of the encryption | Monday at 06:00, on opening the warehouse | Friday 17:12, while it was running |
| Backups | On a domain server, deleted by the attacker on day 24 | Immutable in S3 + tape; intact |
| Decision on the ransom | The only real option: negotiate €180,000 | A five-minute conversation |
| Continuity | None. Warehouses at a standstill | PC-01 operational in 33 minutes |
| Recovery | 9 days (and partial) | 26 h 8 min |
| Cost | ~€340,000 | ~€79,000 in the real scenario; €0 in the exercise |
| The company a month later | Survival in doubt | Operating, with 6 improvement actions |
The difference between the two columns is not a tool. It is five modules of accumulated decisions, and the three that weigh most in this table are boring: a backup repository outside the domain, a bucket with object lock and a red cupboard with a pad of paper.
- Configurations and commands
17.1 restic repository with append-only and replication to immutable S3
#!/usr/bin/env bash
# copia_fs01.sh - Backup of \\fs01\comun. Runs on srv-bkp01 (OUTSIDE the domain).
# PULL model: it is the backup server that goes and fetches the data.
set -euo pipefail
export RESTIC_REPOSITORY="/copias/repos/fs01"
export RESTIC_PASSWORD_FILE="/root/.restic/fs01.pass" # 0400, root; key also on paper
export RESTIC_CACHE_DIR="/copias/cache"
MOUNTPOINT="/mnt/fs01-comun"
TAG="fs01-$(date -u +%F_%H%M)"
# 1) Mount the source READ-ONLY, with a read-only account
mount -t cifs //10.10.20.20/comun "$MOUNTPOINT" \
-o ro,credentials=/root/.smb/fs01-lectura.cred,vers=3.1.1,seal
# 2) Backup with deduplication. --one-file-system avoids following other mounts.
restic backup "$MOUNTPOINT" \
--tag "$TAG" --tag automatic \
--one-file-system \
--exclude-file=/etc/restic/excluir-fs01.txt \
--verbose
# 3) Unmount immediately: the exposure window must be minimal
umount "$MOUNTPOINT"
# 4) Retention policy. 'forget --prune' runs ONLY here, never from the source
restic forget \
--keep-hourly 168 --keep-daily 30 --keep-weekly 12 --keep-monthly 12 --keep-yearly 5 \
--prune
# 5) Integrity check on a sample of the repository
restic check --read-data-subset=10%
# 6) Replication to the immutable bucket (copies and adds only; never deletes)
rclone sync /copias/repos/fs01 s3rutalia:rutalia-backups-clientes/repos/fs01 \
--immutable \
--s3-no-check-bucket \
--transfers 8 --checkers 16 \
--log-file /var/log/rclone-fs01.log --log-level INFO
# 7) Record the result for the verification dashboard
echo "$(date -u +%FT%TZ) fs01 OK $(restic snapshots --json | jq 'length') snapshots" \
>> /copias/registro_copias.logAn explanation of the decisions:
- The script runs on
srv-bkp01, which is outside the domain. This is the central point of the design:fs01knows no credential for the backup system, so an attacker onfs01has nothing with which to attack it. mount ... -o romounts the source read-only: the backup process cannot modify the source, either by mistake or through compromise. Thesealoption forces SMB traffic to be encrypted.- The
fs01-lecturaaccount has read-only permissions on the share. Even if an attacker compromisedsrv-bkp01, that credential does not let them write tofs01. --one-file-systemstops the backup wandering into other mounts and ending up copying unexpected things.restic forget --pruneonly runs here. It is the only operation that can delete data from the repository, which is why the account used from anywhere else must not be able to run it.restic check --read-data-subset=10%really reads and verifies 10 % of the data, not just the metadata. By rotating the percentage, the whole repository has been verified in ten weeks without excessive cost.rclone sync --immutablereplicates to the bucket, and the--immutableoption makesrclonefail if it detects that an existing file has changed, rather than overwriting it. It is a safety net against corruption or encryption of the local repository propagating to the cloud.
17.2 Bucket with object lock in compliance mode
# WARNING: object lock can only be enabled WHEN THE BUCKET IS CREATED.
aws s3api create-bucket \
--bucket rutalia-backups-clientes \
--region eu-west-1 \
--create-bucket-configuration LocationConstraint=eu-west-1 \
--object-lock-enabled-for-bucket
# Versioning is mandatory for object lock
aws s3api put-bucket-versioning \
--bucket rutalia-backups-clientes \
--versioning-configuration Status=Enabled
# Default retention: 35 days in COMPLIANCE mode
aws s3api put-object-lock-configuration \
--bucket rutalia-backups-clientes \
--object-lock-configuration '{
"ObjectLockEnabled": "Enabled",
"Rule": {"DefaultRetention": {"Mode": "COMPLIANCE", "Days": 35}}
}'
# Encryption at rest with a key managed by Rutalia
aws s3api put-bucket-encryption \
--bucket rutalia-backups-clientes \
--server-side-encryption-configuration '{
"Rules": [{
"ApplyServerSideEncryptionByDefault": {
"SSEAlgorithm": "aws:kms",
"KMSMasterKeyID": "arn:aws:kms:eu-west-1:123456789012:key/backups-rutalia"
},
"BucketKeyEnabled": true
}]
}'
# Full block on public access
aws s3api put-public-access-block \
--bucket rutalia-backups-clientes \
--public-access-block-configuration \
"BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"COMPLIANCEversusGOVERNANCE: in governance mode, a user with thes3:BypassGovernanceRetentionpermission can delete objects early, and that permission is exactly what an attacker with IAM privileges will look for. In compliance mode nobody can, not even the account's root user. It is the only configuration that withstands the correct threat model.- 35 days of default retention comfortably cover the typical detection window without pushing the cost up. Remember that in compliance mode those objects are paid for until they expire, with no exception.
- Versioning is mandatory for the lock, and it also means that an overwrite creates a new version rather than destroying the previous one.
- The KMS key must have its own policy, preventing its deletion by the same credentials that manage the bucket. An immutable backup encrypted with a key the attacker can destroy is still destructible.
And the policy that lets the backup user write but not delete:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowWriteAndRead",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject", "s3:ListBucket", "s3:GetBucketLocation"],
"Resource": [
"arn:aws:s3:::rutalia-backups-clientes",
"arn:aws:s3:::rutalia-backups-clientes/*"
]
},
{
"Sid": "DenyAnyDeletionOrProtectionChange",
"Effect": "Deny",
"Action": [
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:PutBucketVersioning",
"s3:PutObjectLegalHold",
"s3:PutObjectRetention",
"s3:BypassGovernanceRetention",
"s3:PutLifecycleConfiguration"
],
"Resource": "arn:aws:s3:::rutalia-backups-clientes/*"
}
]
}- The explicit
Denyprevails over anyAllow, even if somebody grants administrative permissions to that credential by mistake. It is the exact application of least privilege from 04-04. PutLifecycleConfigurationis denied because a lifecycle rule is an indirect, silent way of deleting objects in bulk: the route an attacker would use on finding direct deletion blocked.
17.3 Checking snapshots and immutability
# How many snapshots do we have and from when? (the first thing in a ransomware case)
restic snapshots --compact
# Can a specific snapshot be restored? (a real test, not metadata)
restic restore 4f8a91c2 --target /restauracion/prueba \
--include "/mnt/fs01-comun/Clientes/C0142"
# Full verification of the repository (monthly, out of hours)
restic check --read-data
# Is the bucket retention still active?
aws s3api get-object-lock-configuration --bucket rutalia-backups-clientes
# Is a specific object really protected, and until when?
aws s3api get-object-retention \
--bucket rutalia-backups-clientes \
--key repos/fs01/data/4f/4f8a91c2b7...
# The acid test: try to delete a protected object. It MUST fail.
aws s3api delete-object \
--bucket rutalia-backups-clientes \
--key repos/fs01/data/4f/4f8a91c2b7...
# Expected output:
# An error occurred (AccessDenied) when calling the DeleteObject operation:
# Access Denied# Volume shadow copies on Windows: are they still there? (ransomware deletes them)
vssadmin list shadows /for=D:
# Space reserved for shadow copies: if it is 0, there is no protection
vssadmin list shadowstorage
# Log of shadow copy deletion: event 8224 and use of vssadmin/wmic
Get-WinEvent -FilterHashtable @{LogName='System'; Id=8224; StartTime=(Get-Date).AddDays(-7)} |
Select-Object TimeCreated, MessageRun the deletion «acid test» every quarter. It is the only way of knowing that the immutability is really in place. A configuration that looks right in the console and has never been tested is an assumption, and assumptions about backups are always discovered on the worst day. Do it on a test object and leave the result on record.
Common Mistakes and Tips
Mistake 1: confusing synchronisation with backup. OneDrive and replicas propagate encryption and deletion. Tip: the control question is «can I recover how this file was three weeks ago?». If not, it is not a backup.
Mistake 2: backups reachable from the domain with administrator credentials. It is what turned the canonical scenario into a catastrophe. Tip: a backup server outside the domain, a pull model, and at least one immutable or disconnected copy.
Mistake 3: short retention. With 14 days of retention and an attacker who has been inside for 25, every backup you have postdates the compromise. Tip: retention must comfortably exceed the typical dwell time; 30 daily + 12 weekly as a minimum.
Mistake 4: the encryption key inside what the backup protects. Perfect, unreachable backups. Tip: the key on paper, in two locations, under dual custody, and proved in every monthly restore.
Mistake 5: believing that «the cloud already backs it up». The provider is responsible for the availability of the service, not for your data. Tip: a third-party backup of M365, and a backup of the configurations as well as the data.
Mistake 6: not testing the restore. It is the central mistake of this lesson. A backup with no tested restore is a hypothesis. Tip: a monthly test with random folders, a quarterly full server test, an annual full recovery, and a written record of each one with its caveats.
Mistake 7: measuring the RTO as the time to copy data. The RTO includes detecting, deciding, restoring, validating and returning the service. Tip: the annual exercise is the only thing that gives you the real RTO.
Mistake 8: having no BIA. Without one, RTOs are opinions and the budget discussion has no basis. Tip: start with the business processes, not the systems, and derive the RTOs from the MTPDs.
Mistake 9: having a DRP and no BCP. The company sits idle while IT works well. Tip: documented manual workarounds, with physical materials, reviewed quarterly. It is the cheapest continuity measure there is.
Mistake 10: forgetting the reconciliation. Paper delivery notes that never get entered are deliveries that never get invoiced and stock that does not balance. Tip: a named owner and a 48 h deadline written into the procedure itself.
Mistake 11: powering off machines during a ransomware attack. It destroys the memory, which sometimes contains the encryption key. Tip: isolate, do not power off; and disconnect the backup server in the first five minutes.
Mistake 12: restoring before knowing the date of the compromise. Guaranteed reinfection. Tip: fix the date of the first compromise before choosing the backup; it is an explicit step in the first-hour checklist.
Mistake 13: deleting the encrypted files. It removes the possibility of using a decryptor that appears later. Tip: keep them in cold storage and check No More Ransom periodically.
Mistake 14: deciding about payment on the day of the attack. Tip: a written, pre-approved position, with the insurer and the legal advisers, and the mandatory international sanctions check. The real decision is taken years earlier, when the backups are designed.
Exercises
Exercise 1 — Auditing a backup design
A company of 60 employees describes its backups to you like this:
«We have a NAS in the office cupboard. Every night, a scheduled task on the file server copies the folders to the NAS with
robocopy. The NAS is in the domain and the task runs with an administrator account. On top of that, every employee's desktop and documents sync with OneDrive, so we are doubly covered. The backups have run without errors every day for the last two years.»
Identify at least six problems and propose a specific fix for each one. Then state exactly what would happen if an attacker obtained domain administrator.
Exercise 2 — Calculating effective RPO and RTO
Rutalia backs up the ERP database (A002) every 4 hours (02:00, 06:00, 10:00, 14:00, 18:00, 22:00), with 30 days of daily retention and 24 hours of hourly backups. A forensic analysis determines that the attacker compromised srv-erp01 on Tuesday at 11:30 and encrypted on Thursday at 23:40.
Answer: (a) which is the last usable clean backup? (b) what is the effective RPO in this case, against the theoretical RPO of 4 h? (c) what change in the backup policy would reduce that effective RPO, and roughly how much does it add in cost? (d) what information do you absolutely need before you can answer (a), and which phase of the response cycle does it come from?
Exercise 3 — Designing a continuity procedure
Design the continuity procedure PC-02: Customer service without systems for Rutalia, following the PC-01 format. It must cover: what physical materials are needed and where they are, who activates it and on what criterion, the step-by-step procedure, what is said to a customer who calls, how what happens is recorded, the subsequent reconciliation, and how the materials are kept up to date. One page maximum.
Solutions
Solution 1
| # | Problem | Fix |
|---|---|---|
| 1 | The NAS is in the domain and the task runs with a domain administrator. An attacker with those credentials deletes or encrypts the NAS | Take the NAS out of the domain, with its own credentials, and switch to a pull model: let the NAS fetch the data with a read-only account |
| 2 | robocopy synchronises: there are no versions. A file encrypted on Monday overwrites the good one that same night |
Use a system with snapshots and deduplication (restic, borg or equivalent) with 30+12 retention |
| 3 | A single copy, on a single medium, in the same office. It satisfies neither the 3, nor the 2, nor the 1 | Add replication to object storage off site and a disconnected copy (tape or rotating disk in a safe) |
| 4 | No immutable or disconnected copy | Object lock in compliance mode at the remote destination |
| 5 | OneDrive is not a backup: it propagates encryption and deletion, and its retention is limited | Buy a third-party backup for M365 with 12-month retention |
| 6 | «They have run without errors» is level 1 verification. It does not prove the data is restorable, or complete, or that permissions are preserved | Monthly restore test with random folders and hash verification; quarterly full server test; annual exercise |
| 7 | (Extra) No mention of encrypting the backups or of where the key is | Encrypt the repository and keep the key on paper, in two locations, outside the domain |
| 8 | (Extra) Configurations and AD system state are not backed up | Add GPO backup, system state and configurations to an external repository |
What would happen with domain administrator: the attacker signs in to the NAS with the same credential used to make the backup, deletes or encrypts the contents, and then encrypts the file server. OneDrive syncs the encryption to the cloud within minutes. The company is left with no usable backup at all, and the only realistic option becomes negotiating the ransom. The fact that the backups have run without errors for two years is irrelevant: they have worked perfectly against the wrong failure mode.
Solution 2
(a) The last usable clean backup is Tuesday's at 10:00. The 14:00 one postdates the 11:30 compromise and therefore may contain the implant, created accounts or persistence. Restoring it would mean reinfection. The hourly backups from the last 24 h are no use here: they only cover from Wednesday at 23:40 onwards, all of them after the compromise.
(b) Effective RPO: 61 hours and 40 minutes (Tuesday 10:00 → Thursday 23:40), against the theoretical RPO of 4 hours. The difference is a factor of more than fifteen.
This is the central concept of the exercise: the theoretical RPO measures the backup frequency; the effective RPO against an attacker measures the distance back to the last clean point. The second is what determines how much data you really lose, and it appears in no textbook definition.
(c) Changes that reduce it:
| Measure | Effect | Approximate cost |
|---|---|---|
| Extend the retention of hourly backups from 24 h to 14 days | There would be 336 restore points; the nearest clean one would be Tuesday at 11:00. Effective RPO: 60 h 40 min → barely an improvement | ~€600/year |
| Detect sooner (reduce dwell time from 2 days to 2 hours) | The clean point would be 2-3 h from the compromise. Effective RPO: ~6 h | Detection, not storage |
| Continuous transaction archiving (WAL), as A005 already does | Allows restoring to any instant, including 11:29 on Tuesday. Effective RPO: minutes | ~€400/year |
The conclusion is uncomfortable and very important: adding more backups barely improves the effective RPO. What really reduces it is detecting sooner and being able to restore to an arbitrary point in time. Against ransomware, the best RPO investment is not in storage: it is in detection and in the granularity of the recovery.
(d) You absolutely need the date and time of the first compromise, and it comes from the detection and analysis phase (05-02): specifically, from the timeline built out of the logs. Without it, choosing the backup is a gamble. This is why log retention and backup retention are related: you cannot restore to a point before the compromise if you cannot determine when the compromise was, and that is determined by the logs, not by the backups.
Solution 3 (proposed)
## CONTINUITY PROCEDURE PC-02
## CUSTOMER SERVICE WITHOUT SYSTEMS
Location: red cupboard in the Zaragoza office and a blue folder at each customer
service desk. Owner: customer service manager.
Review: QUARTERLY, with a signed acknowledgement.
MATERIALS
1. Printed list of the 400 customers: company name, reference, contact person,
telephone, terms and assigned warehouse. Updated monthly.
2. List of usual routes and delivery windows per customer.
3. List of drivers, vehicle registrations and telephone numbers.
4. Call log sheets (numbered).
5. Call script (below) and the text of the current statement.
6. Backup mobile phone with an independent line, charged.
7. CSIRT contact card.
ACTIVATION
- Activated by the incident coordinator, or by the customer service manager on
their own initiative if MiRutalia or the ERP have been down for over 30 min.
- It is announced by SMS to the whole team and the alternative number published.
PROCEDURE
1. Every call is noted on the log sheet: time, customer, reference, reason,
what they were told, and whether a reply is still outstanding.
2. Delivery queries: resolved with the route list and, if necessary, by calling
the warehouse manager or the driver.
3. New orders: noted on a numbered manual order sheet and passed by telephone
to the relevant warehouse. Do NOT promise timescales.
4. Complaints: recorded, with a commitment to reply within 24-48 h.
5. Questions about the incident: ONLY the script. Nothing more.
SCRIPT (word for word, not improvised)
"We are managing a technical incident affecting our portal. Your goods and your
deliveries are not affected / are affected in this way: {...}. I can help you
right now over the phone. I will confirm in writing as soon as the systems are
available."
- NOT said: cause, blame, timescales, or "nothing has been leaked".
- If they ask about their data: "I will pass you to the person responsible, who
will call you today", and escalate to the Managing Director.
RECONCILIATION (mandatory, owner: customer service manager)
6. Within 48 h of service being restored: enter every log sheet and order sheet
into the system.
7. Verify that the sheet numbering is sequential.
8. Contact every customer whose reply was left outstanding.
9. Sign off the reconciliation before filing the sheets.
MAINTENANCE
- Automatic monthly reprint of the customer list (a scheduled task that
generates the PDF on the 1st and sends an email reminder).
- Quarterly review of the cupboard with a signed checklist.
- The backup phone is tested monthly with a real call.A teaching comment. Three decisions make this procedure work: the word-for-word script, because dealing with an angry customer during a crisis is exactly the moment when somebody improvises a sentence that will later turn up in a letter of complaint; the reconciliation with a named owner and a signature, because an order noted on paper and never entered is a customer who does not get their goods; and the automatic monthly reprint, because finding number 3 from the drill was precisely a seven-month-old list in Seville. A continuity procedure that depends on somebody remembering to update it expires on its own.
Conclusion
You have completed the last line of defence, and with it the whole module.
You know what a backup is and what it is not, and above all you distinguish backup from synchronisation: OneDrive and replicas protect against a disk failing and faithfully propagate encryption and deletion, which are the failure modes that really matter. You know the backup types and their real effect on space and restore time, and why a block-level system with deduplication gives you the best of all three columns: 6.5 TB for thirty snapshots of a 4 TB fs01, each restorable as though it were a full backup.
You have the 3-2-1-1-0 rule applied asset by asset, with the two ones that matter — one copy off site and one immutable or disconnected — and the zero that almost nobody meets: zero errors in the verification. And you have the correct threat model for designing them, which is not «a disk breaks» but «an attacker controls the source server and the domain administrator credentials». Against that question, the two decisions that protect most are a backup server outside the domain in a pull model — where the source knows no credential for the destination — and a bucket with object lock in compliance mode, where not even the root user can delete early. Plus a tape in a bank safe deposit box, for €40 a month, because a tape has no configuration failure modes.
You know how to size retention with an argument that is not intuitive and is decisive: it must comfortably exceed an attacker's dwell time, because with fourteen days of retention and twenty-five days of intrusion every backup you have postdates the compromise. And you know that backups are always encrypted, with the key on paper, in two locations, under dual custody and never inside what the backup protects, because a key in claves.xlsx inside fs01 is a key encrypted by the attacker.
You have dismantled the misunderstanding that «the cloud already backs it up»: the provider is responsible for the availability of its service and you for your data, with three concrete scenarios that demonstrate it. And you have added the category nobody includes in the plan: the configurations — nftables, Suricata rules, GPOs, AWS infrastructure, MiRutalia's deployment, the inventory and the plan itself — without which the data is not enough to rebuild anything.
You have Rutalia's complete backup plan for A001-A010, with RTO, RPO, type, frequency, location, retention, test and owner on every row. And above all you have the central section of the lesson: a backup with no tested restore is not a backup. You know the three levels of verification and why level 1 — «the task finished without error» — does not detect a corrupt repository, a configuration that backs up 40 % of the folders, a database with no consistency or permissions restored with the wrong owner. You have the script that compares the restore against a hash manifest and that checks three things rather than one: what is missing, what is corrupt and what is extra, which is what would reveal remnants of an attacker in a backup taken after the compromise.
You distinguish BCP from DRP and you know they need each other: an excellent DRP with no BCP is a company sitting idle while IT works well. You have run a real BIA, starting from business processes rather than systems, and you have discovered what it reveals: the process that stops Rutalia within four hours is not the visible portal, it is dispatch; that the systems' RTOs are derived from the processes' MTPDs and not the other way round; and that a four-hour MTPD is unreachable through technical recovery alone, which is why there is a red cupboard with a pad of delivery notes at every warehouse. You know the exponential curve between RTO and cost, and why without a BIA the temptation to ask for minutes for everything ends in nothing being done.
You have walked through ransomware from start to finish: a commercial operation lasting weeks, with its neutralisation phase that specifically hunts for your backups before encrypting anything, and with the escalation from single to double, triple and quadruple extortion, where each new level attacks whoever solved the previous one — and where the countermeasure at the higher levels is not technical, it is having notified and communicated in time. You have the first-hour checklist with its most valuable line — physically disconnect the backup server in the first five minutes — the ban on powering off, and the ban on deleting the encrypted files because decryptors appear later, sometimes years later, on No More Ransom.
And you have the numbers: €365,000 paying against €79,000 recovering, with the most counter-intuitive part of the table, which is that paying does not avoid the rebuild, because a decrypted system is still compromised. Against that €286,000 of difference, Rutalia's backups and continuity cost €8,820 a year.
You have seen all of that carried out in the drill of 20 October: from the administrator's call at 17:12 to srv-bkp01 being disconnected at 17:16, from the red cupboard opened at three warehouses in thirty-three minutes to all services fully operational 26 hours and 8 minutes later. With its six findings, including the one that is worth the whole exercise: the effective RPO of fs01 was not 4 hours but 39, because the backup existed, was intact and was restorable... and postdated the compromise. The RPO against an attacker is determined not by the backup frequency but by how many clean points you have before the date of the intrusion, and that date comes from the analysis timeline, not from the backup system.
And with this, Module 5 closes. You came to it knowing how to defend and how to check whether your defence held. You leave it knowing how to respond when it does not: with an approved plan, a team with names and deputies, channels that survive the incident and a kit ready to go (05-01); with the ability to turn a signal into a verified fact, build a defensible timeline and collect evidence without destroying it (05-02); with a six-minute coordinated cut-off, an eradication that hunts down every foothold and a recovery ordered by dependencies (05-03); with a root cause analysis that does not stop at «the user clicked» and an action plan with an owner, a deadline and independent verification (05-04); and, here, with backups the attacker cannot touch and procedures that let you carry on dispatching goods without a single computer switched on.
Rutalia has suffered a real twelve-day intrusion, has lost 11.42 GB of information, has rebuilt three systems, has notified on time, has decided not to pay and has carried on operating. And it has rehearsed the worst possible scenario, coming out of it in twenty-six hours.
But notice how many times, throughout this module, the right answer has depended on something that was not technical. The 72-hour clock that started at 07:04 without anyone setting it going. The legal advisers who had to validate whether that was a breach. The 400 customers who had a right to know which of their information was in someone else's hands. The policy that required immutable backups and a documented restore test in order to cover the claim. The legal periods that decide how long evidence must be kept and when it must be destroyed. The international sanctions that turn a payment into a possible infringement. The acceptable use policy that made it admissible to look inside an employee's machine. And the question Andrés Vidal will ask at the January committee meeting: «are we complying with what the law requires of us?».
Responding well to an incident is not only about recovering the systems. It is also about answering to the law, to the regulator, to your customers and to the people whose data you hold. An incident handled impeccably from a technical point of view can still end in a fine if the notification was late, in a claim if the customer contract required something else, or in an employment dispute if the investigation was conducted without the proper safeguards.
Module 6 is about that terrain. You will start with Cybersecurity Regulations and Standards, where the GDPR, the NIS2 directive, the Spanish National Security Framework (ENS) and the ISO 27001 standards stop being acronyms and become specific obligations with deadlines, owners and consequences. Then come the security policies that give cover to everything you have done over five modules, personal data protection in practice, supplier security — the way in for the October drill, and hypothesis H5, which is still open — and the audits that check whether all of this is real or just written down.
You now know how to build the defence, check it, respond when it fails and recover when it collapses entirely. Time to learn how to prove it.
