Skip to content

Ransomware protection: backups, segmentation and a recovery plan

B2Bnetwork team · · 6 min

Security

In brief

Three things together protect a company from ransomware: backups isolated from the network and from domain accounts, regularly verified by an actual restore; segmentation of the network and accounts, so one compromised computer cannot reach servers and backups; and a written, rehearsed recovery plan that sets the order of systems. Only in combination do they give the company a choice: restore data on its own in a predictable time instead of negotiating with criminals. Antivirus alone will not provide that.

What the attack you are defending against looks like

Ransomware is rarely a single click that encrypts disks right away. It usually has several stages, and each is a chance to stop it:

  1. Entry: phishing, a VPN or remote desktop password without MFA, an unpatched vulnerability in an edge device.
  2. Reconnaissance and lateral movement: the attacker looks for admin accounts, file servers, the ERP and the backup console.
  3. Data theft: criminals increasingly demand a ransom not only for decryption but also for not publishing stolen data, as Poland's Ministry of Digital Affairs notes.
  4. Backup deletion: many ransomware variants look for and delete accessible backups, as the CISA guide points out.
  5. Encryption of everything the compromised accounts can reach.

The list shows where to invest. A backup visible to a domain account will be lost at step 4. A flat network makes step 2 easy. And without a recovery plan, after step 5 the company starts improvising.

Backups an attacker cannot delete

The popular 3-2-1 rule says: three copies of data, on two different media, one of them off site. Against ransomware, what matters more than the number of copies is whether at least one is out of the attacker's reach.

RequirementHow to do itWhy
An offline or immutable copymedia disconnected from the network, object storage with a time-based deletion lockan attacker with admin rights cannot delete or encrypt it
Separate backup accountsthe backup console outside the company domain, its own accounts with MFA, passwords different from the domaintaking over the domain does not give access to backups
Encrypted backupsthe key stored outside the backup systema stolen medium does not mean a data leak
Retention longer than the attacker's dwell timecopies going back several weeks, not only last night'sattackers often sit in the network long before encryption
A restore testevery quarter, restore a chosen system to a clean environment and time ita backup nobody has restored is just a hope

The CISA guide recommends offline, encrypted backups and regular checks of their availability and integrity in disaster recovery scenarios. It also notes that immutable storage does not meet the compliance criteria of some regulations, so the choice is worth agreeing with your compliance team. Backups of cloud services, including email and files, are covered in Cloud backups.

Network and account segmentation

Segmentation limits how far one compromised computer can reach. In practice it means:

  • Network zones: office computers, servers, backups and production systems (OT) in separate segments, with traffic allowed only where it is needed. The accountant's computer has no reason to connect to the backup console or a line controller.
  • No remote desktop exposed to the internet. Remote access only through a VPN with MFA and current patches.
  • Tiers of admin accounts: one account to manage workstations, another for servers, another for the domain controller. An administrator never signs in to an ordinary computer with a domain admin account.
  • Phishing-resistant MFA for email, VPN and accounts with access to critical systems, as covered in MFA and passkeys.
  • An allowlist of installed applications and restrictions on macros in documents from the internet.

When a company uses Microsoft 365, the same logic applies in the cloud: separate admin accounts, legacy protocols blocked, the audit log on. The list of settings is in Microsoft 365 security.

The recovery plan: order matters

The recovery plan answers what the company does after an attack, in what order and who decides. The CISA guide recommends setting restoration priorities from a predefined list of critical systems and their dependencies. An example for a manufacturing company:

OrderSystemTarget timeDepends on
1identity and network: domain controller or directory service, DNS, firewallfirst daywithout it nobody can sign in
2ERP and its database1–2 daysidentity, database server
3email and department files2–3 daysidentity
4production and warehouse systemsdepends on the plantERP, OT network
5other applicationsonce things are stablein order of the list

Golden system images and infrastructure described as code speed up recovery. A server whose configuration lives in a repository is rebuilt from scratch in an hour instead of being reconstructed from an administrator's memory. The principles are in Infrastructure as code, and the full continuity plan in Business continuity: BCP and DRP.

The plan has to be rehearsed. Once a year, the team restores one important system to a clean environment, times it and improves the runbook. A tabletop exercise (who calls whom, who decides to disconnect the network) takes two hours and catches gaps that do not show on paper.

The first hours after an attack

  1. Isolate infected computers and segments, for example by disconnecting them from the network. Powering devices off is a last resort, because it wipes traces in memory.
  2. Preserve evidence: disk and memory images of a few infected machines, firewall and server logs.
  3. Communicate outside the company network, by phone, because the attacker may be reading email.
  4. Report the incident: in Poland to CERT Polska, the national computer emergency response team, through its incident form, or to the relevant CSIRT. Entities covered by NIS2 have reporting deadlines, and a personal data breach is reported to the supervisory authority.
  5. Check the backups before you start restoring: are they encrypted, and which day is the last clean version from?

A detailed plan for the first day is covered in Security incident response. Backups with a restore test and order in accounts were also the first tasks in the case study on Elevate at a family-owned manufacturing plant. The B2Bnetwork platform and DevOps team describes infrastructure as code, so an environment can be rebuilt from a repository rather than from one person's memory.

Questions and answers

Does a cloud backup protect against ransomware?

Only if the attacker cannot delete it. File sync to the cloud also carries over encrypted versions, and a backup service admin account that shares a password with the domain can be taken over. You need a copy with a deletion lock or an offline copy, and separate accounts with MFA.

How often should backup restores be tested?

Good practice is a quarterly test of a chosen system and a full recovery exercise for the most important systems once a year. Every test should measure time and end with an update to the runbook. A backup nobody has restored gives no assurance that it will work on the day of an attack.

Does a small company need network segmentation?

Yes, in a simpler form. It is enough to separate the guest network, office computers, the server or NAS holding backups and production devices, and to allow remote access only through a VPN with MFA. Most routers and firewalls for small businesses support such zones without extra hardware.

Does paying the ransom bring the data back?

There is no such guarantee. The decryption tool may be slow or unreliable, and paying does not remove the stolen copies of the data or the attacker's access to the network. A company with working offline backups and a rehearsed plan does not have to consider that option at all.

What it looks like in a project

Want to check your application's security? Talk to an engineer.

Let's talk

Read more: Security

All in Security →