On this page

10.5 Ransomware early warning

The ransomware early warning evaluates every file backup and every image backup and raises an alarm when the data looks like the result of mass encryption. On an alarm the run becomes a warning, the ransomware notification goes out, and the last unremarkable snapshot is protected against deletion by retention. The check runs on the server; no setup in the job is needed.

Measured values

Every file backup reports two values for the files that are new or changed:

  • Change rate: share of new and changed files among all files of the run.

  • Entropy: randomness of the data. The agent reads the first 64 KiB of every changed file (at least 512 bytes) and computes the Shannon entropy in bits per byte (0 to 8). A sample with at least 7.5 bits per byte counts as high entropy, because encrypted and compressed data looks random. The measured value is the share of samples with high entropy.

The values of each run are compared with the moving average of the previous runs of the same job. Only runs without a warning enter this baseline, so an attack cannot shift it.

The charts are in the job details under Change history (toggle Chart and Table):

Element

Meaning

Changed files

Change rate per backup, with the latest value ("last … of …") below.

Looks encrypted

Share of high entropy per backup, with "last … of … sampled" below.

Entropy (last)

Histogram of the entropy of the latest backup, from 0 to 8 bits per byte.

Table

Columns Backup, Files, Changed, and Encrypted-looking; runs with a warning are marked as ransomware warning.

As long as no file backup with change statistics exists, the section reads "No file backups with change statistics yet."

When a warning is raised

Entropy signal

The signal triggers when a baseline exists (at least min_baseline_runs runs) and one of two conditions holds:

  • Entropy jump: The share of high entropy is at least entropy_ratio_jump above the baseline average, and at least min_samples files were sampled.

  • Change jump: The change rate is at least change_rate_min, at least change_rate_factor times the baseline average, and at least half of the samples have high entropy. Mass changes of ordinary files (for example after a software update) therefore do not trigger anything.

Thresholds and defaults are in the table in the section "Thresholds in server.toml".

Indicators

The check also looks for indicators in the changed files. For file backups the agent does this; for image backups the server walks the file tree of the new and the previous image and compares them.

Indicator

Code

Meaning

Ransom note

N

At least note_min_files files are named like a known ransom note. Names that are too generic, such as ReadMe.txt, are deliberately not in the list.

Onion address

O

At least one small text file (.txt, .html, .htm, .hta) contains an onion address (version 3).

Known extension

X

At least known_extension_min_files files carry an extension that known ransomware families append.

Mass rename

R

At least rename_min_files files and at least rename_min_share of the files read received the same new extension after a document extension (a.docx.zzz). Ordinary suffixes such as .bak, .gz, .zip, .old, and numbers never count.

Uncommon extension

U

At least rename_min_files files and at least rename_min_share of the files read carry the same uncommon extension.

Entropy

E

The entropy signal from above.

No single indicator triggers a warning, because a user's own README.txt, a Tor bookmark file, or a log rotation that compresses hundreds of files is harmless. A warning only appears when one of these combinations holds (rule name in the log in parentheses):

Combination

Rule

N and O

note+onion

N and X

note+extension

N and R

note+rename

N and U

note+extension-group

N and E

note+entropy

R and E

rename+entropy

R and X

rename+extension

O and X

onion+extension

The entropy signal alone keeps triggering a warning, even without indicators.

Image backups

Image backups have no entropy statistics. Instead, the server walks the file tree of the stored images when image_scan and the indicators are enabled. The walk is limited to image_scan_seconds seconds and image_scan_max_entries directory entries; if it ends early, the run log says so ("the time or entry budget ended the scan early"). If an image is not checked (for example because the file system is unreadable), the log notes the reason and the run is not affected. The change rate is the share of new or changed files compared with the previous image.

What happens on an alarm

  1. The run log gets the line "ransomware warning" with the reason (change rate, entropy, rule that fired) and up to listed_paths example paths. The run ends with the warning (see section 10.1 Runs).

  2. The server places a retention hold with the reason ransomware on the last snapshot of the baseline, that is, the last run without a warning. Retention, maintenance, and copy targets never remove a held snapshot. If there is no earlier snapshot, the message says "No earlier snapshot to hold."

  3. The audit log gets the entry ransomware.warning (see section 11.4 Audit log).

  4. The ransomware notification (severity critical) goes to every channel that subscribes to this event (see section 10.4 Notifications). It names the reason, the held snapshot, and up to five example paths.

  5. The dashboard shows a red message "Ransomware warning" with the age and the reason for as long as the hold is active.

The hold stays until an admin releases it. A snapshot without a hold is subject to the job's retention again.

Managing retention holds

The Retention holds window opens from the Holds tile on the dashboard, from the Holds button in the job details, or from the command palette ("Show retention holds"). Under Active and Released it shows the columns Snapshot, Reason, Job, Repository, Placed (with time and author), and for released holds Released. A ransomware hold carries the reason ransomware plus the justification.

Admins have two options:

  • Place hold: Enter the snapshot ID (at least 8 characters) and optionally a reason (at most 200 characters), then choose Place hold. This protects any snapshot by hand.

  • Release…: After checking the machine, choose Release… and confirm with Release (Keep cancels). Retention may then remove the snapshot again.

If four-eyes approval is enabled and protects the action "Release a retention hold", a second admin decides (see section 11.3 Four-eyes approval).

Scanning a backup for malware

In addition to the early warning, a snapshot can be checked on purpose with an agent's virus scanner, without changing anything at the original location. In the snapshot menu on the restore page, Scan backup… opens the Scan backup window. The function does not exist for image, Hyper-V, and database snapshots.

Option

Effect

Default

Scan on agent

Agent that restores and scans the data. The source of the snapshot is marked; agents without support are disabled ("cannot scan, update the agent"). If the agent is offline, the scan starts when it connects.

Agent that made the snapshot, otherwise the first suitable one

Folder of the backup

Folder in the snapshot (slash as separator).

/ (everything)

Largest selection (MiB)

Fails the run before anything is restored if the selection is larger.

no limit

The agent restores the data into a temporary folder below its state directory, scans it with Microsoft Defender or ClamAV (plus YARA rules if scanner.json in the agent folder names any), and deletes the copy again. Only the agent decides which scanner applies, never the request. The run has the kind scan. Findings or an incomplete scan end it with a warning; a missing scanner makes it fail. The result shows the table File and Threat; a finding triggers the backup_threat_found notification. The option Scan the restored files for malware in restore tests and the secure restore use the same scanner (see chapter 09 Restore).

Thresholds in server.toml

The thresholds are in the sections [ransomware] and [ransomware.indicators]. The server reads server.toml at startup.

Option

Effect

Default

enabled

Turns the whole early warning on or off.

true

min_baseline_runs

Runs without a warning that must exist before the entropy signal can trigger.

3

baseline_runs

Number of runs in the moving baseline.

10

change_rate_factor

Factor by which the change rate must exceed the baseline average.

4.0

change_rate_min

Minimum share of changed files (0.25 = 25%) for the change jump.

0.25

entropy_ratio_jump

Rise of the high-entropy share over the baseline (0.4 = 40 percentage points).

0.4

min_samples

Minimum number of sampled files for the entropy jump.

20

Option in [ransomware.indicators]

Effect

Default

enabled

Master switch for all indicators (file and image backups).

true

note_names

Checks file names of known ransom notes (N).

true

onion_links

Checks small text files for onion addresses (O).

true

known_extensions

Checks extensions of known ransomware families (X).

true

mass_rename

Checks mass renames and uncommon extensions (R, U).

true

note_min_files

Files needed for indicator N.

1

known_extension_min_files

Files needed for indicator X.

5

rename_min_files

Files with the same new extension needed for R and U.

20

rename_min_share

Share of the files read needed for R and U (0.25 = 25%).

0.25

image_scan

Walks the file tree of image backups on the server.

true

image_scan_seconds

Time budget of one image walk (both file trees together).

60

image_scan_max_entries

Maximum directory entries visited per image walk.

2000000

listed_paths

Example paths in the run log and the notification.

20

[ransomware]
enabled = true
baseline_runs = 10
entropy_ratio_jump = 0.4

[ransomware.indicators]
enabled = true
listed_paths = 20

The server rejects unknown keys in these sections at startup.

Last updated Nov 16, 2026