Ransomware protection step by step

How a ransomware attack unfolds today, which controls stop it, and what to do in the first hours once it has happened.

Topic
IT security
Author
ARLITECH expert team
Published
Updated

Ransomware today is a business model, not a random infection. Attackers pick their victims deliberately and spend weeks inside the network before they encrypt anything. They exfiltrate the data first, so having backups does not spare the victim from paying. This article shows where that chain can be broken.

How an attack unfolds

Encryption is the last step of the attack, not the first. The stages before it typically take weeks, and that is the window in which the attack can be stopped.

  1. minutes Entry Phishing, stolen VPN password, exposed RDP, vulnerable edge device 1. MFA
  2. hours Foothold Setting up remote access, scheduled tasks, use of legitimate tools
  3. 1-7 days Discovery Mapping the network, the domain, backups, and valuable data 4. Detection
  4. 1-3 days Privilege escalation Obtaining domain admin rights
  5. hours Backup destruction Reaching the backup server, deleting snapshots 2. Isolated backup
  6. 1-5 days Data theft Exfiltration of hundreds of GB
  7. 1-4 hours Encryption All at once, typically in the early hours of a weekend or public holiday 3. Segmentation
The stages of a ransomware attack An organization typically has one to two weeks to notice something. The tags mark which of the four controls takes effect at each stage.

The attack seeps in slowly, and most victims simply do not see it.

The four controls that stop the attack

There is a lot you can do, but analysis of real incidents shows that four controls form the backbone of the defense.

1. MFA on everything reachable from outside

The vast majority of break-ins use stolen credentials. VPN, remote desktop, webmail, cloud services: if any of them relies on a single factor, that is the way in.

The exceptions have to go too. A single service account or legacy protocol without MFA is enough to bypass the whole defense. A phishing-resistant method (a FIDO2 hardware key) is the strongest, but number-matching push is still orders of magnitude better than nothing.

2. Isolated, tested backups

This decides whether recovery takes a few days or several months. There are three requirements:

  • Backups must not be reachable with the same credentials as the production systems. If the backup server is a domain member and the attacker is a domain admin, you have no backup.
  • Keep an immutable or offline copy. Object lock or tape still does the job today.
  • Test restores regularly. Having a backup proves nothing on its own. Only a real restore test, run every quarter, shows that it works.

3. Segmentation

Encryption does so much damage because on a flat network it reaches everything at once. If critical systems sit in separate segments with strict inbound rules, the damage is only a fraction of that.

The minimum: domain controllers, backup infrastructure, and financial systems each in their own segment. Add client isolation on top, so that one workstation cannot reach another one's administrative ports.

4. Detection during the discovery phase

During discovery the attacker does things nobody does in normal operation: bulk domain queries, sweeps of network shares, privilege escalation attempts, running suspicious tools.

These can be detected if logs are collected and someone actually looks at the alerts. An EDR is worth nothing if it is not switched on or nobody monitors it.

What is missing most often is attention, not technology. Many victims find out afterwards that the alert did appear, but nobody looked at it, or there was no procedure for what to do with it at night and on weekends.

What to do in the first hours

Once the attack has happened, the order of the steps matters.

Do not power off the machines. Evidence in memory is lost, and in some cases the encryption key is there too. Do disconnect them from the network, though.

Isolate the network, but without rushing. In an industrial environment, disconnecting a segment can stop the process, so make that decision together with operations.

Do not overwrite anything. Logs, the memory image, and disk images are the basis of the investigation. The "let's just reinstall quickly" reflex is the most common mistake: afterwards nobody can say how the attackers got in, and they will come back.

Report it. Under NIS2, the deadline for the early warning is 24 hours. If personal data is affected, the 72-hour GDPR notification obligation applies as well.

Do not rush to pay. Paying guarantees neither recovery nor deletion of the stolen data, and in a number of cases it makes the organization a repeat target. Decide on it only after you have assessed your ability to recover.

We covered this in detail in our article on the first 24 hours of an incident.

What to do afterwards

Recovery does not end when the systems are restored.

  • Root cause analysis. If the entry point is not found, the restored system stays just as vulnerable.
  • Full credential rotation. Every password, service account, API key, and certificate, including the domain keys.
  • Handling the stolen data. Notification obligations, informing the data subjects, legal consequences.
  • Putting the missing controls in place. The incident showed what was missing, and this is the rare moment when the organization is willing to invest.

A realistic expectation

No single control gives one hundred percent protection. The goal is for the attack to be detectable before encryption, and for the organization to be able to recover without paying.

Both capabilities can be measured. A penetration test and an alert handling exercise measure the first, a real restore test the second. If you run both once a year, you are doing more than most organizations.

We have written about backup strategy and network segmentation in detail in separate articles.

Contact

Ready to secure your critical systems?

Our experts will assess where your security stands and build a roadmap that fits your organization.

ARLITECH's office in Gödöllő

Visit us

You are welcome to visit our Gödöllő office in person.

Address
Centrum Office Building, 2100 Gödöllő, Dózsa György út 13, 3rd floor, office 309
Office hours
Mon–Fri, 9 a.m. to 5 p.m.
Get directions (opens in a new tab)