In short
When a Synology NAS has been encrypted, one question largely determines the recovery path: were only the shared folders encrypted from an infected client, or did the attackers have administrator rights in DSM? In the first case, Btrfs snapshots, the recycle bin and Hyper Backup versions are often still intact and can be restored as a copy. In the second case, recovery starts from images of every drive: SHR or mdadm, LVM and older Btrfs structures. Image the drives before any repair, reset or reinstall.
Synology encrypted: the first minutes
Files on your shared folders suddenly carry an unfamiliar extension, there is a ransom note in every folder, or DSM shows accounts and processes you don't recognise? Right now the priority is not to make things worse.
- Disconnect it from the network. Pull the cable, disable port forwarding on the router, block QuickConnect and VPN access.
- Don't repair, don't reset, don't reinstall.
- Take screenshots: Storage Manager, the snapshot list, shared folders, User & Group, Log Center.
- Copy the ransom note and two or three encrypted sample files to a separate drive.
- Record the model, DSM version, drive order and bay assignment, and photograph them.
- Find out whether Windows servers, clients or backup systems are affected too.
Powering off versus leaving it running is a trade-off. During the SynoLocker outbreak in 2014, Synology advised shutting the device down immediately to stop further encryption.
General emergency measures are on the ransomware emergency page. This page covers the questions specific to Synology. For a cross-vendor overview, see NAS data recovery after ransomware.
How ransomware gets onto a Synology NAS
For data recovery, the attack path is not a side issue. It determines whether the snapshots and backups on the device can still be trusted.
Encryption through SMB shares from a client
A common scenario in businesses: a Windows client or server is infected, and the ransomware encrypts everything it can write to through mapped drives and SMB shares. DSM itself is not compromised. Volumes, storage pool and the Btrfs file system remain structurally intact. A regular share account cannot touch snapshots, because Synology documents that users have no write permission on snapshot copies.
Brute force against DSM accounts
In July 2019, Synology warned of a ransomware wave in which administrator passwords were guessed through dictionary attacks rather than exploited vulnerabilities.
eCh0raix for Synology
The eCh0raix family reportedly hit Synology devices as early as 2019 using guessed admin credentials./volume0 to /volume9, appends .encrypt and drops a note named README_FOR_DECRYPT.txtt (with a double "t").
SynoLocker (2014)
In 2014, SynoLocker exploited a vulnerability that Synology had already fixed in December 2013. Older DSM versions up to 4.3-3810 were affected. Synology stated that it could not decrypt files that had already been encrypted.
Attackers with admin rights
Once attackers hold an administrator account, the picture changes. They can delete snapshots and snapshot schedules, empty recycle bins, remove Hyper Backup tasks and local backup targets, and encrypt shared folders directly on the NAS. Such access comes from guessed DSM passwords, but also from credentials harvested inside the corporate network, for example from password stores on admin workstations.
Under the hood: SHR, LVM, Btrfs and ext4
Recovering a Synology NAS means understanding its layers. From the bottom up:
- Linux software RAID (mdadm): According to Synology, Synology Hybrid RAID (SHR) is based on the Linux RAID management system. SHR divides drives of different sizes into chunks and builds several redundant arrays from them.
[6] Classic RAID types (RAID 1, 5, 6, 10) also use mdadm. - LVM: With SHR, and with pools holding multiple volumes, an LVM layer sits on top. Synology's own guide to reading data on a PC shows volume groups such as
vg1000orvg1with logical volumes such asvolume_1, and md arrays with version 1.2 superblocks.[7] - File system: Btrfs or ext4. This choice is decisive for ransomware recovery.
Btrfs uses copy-on-write: changed data is written to a new location rather than over the old one. Synology only offers shared folder snapshots on Btrfs volumes.
ext4 often writes changes in place. Shared folder snapshots are not available on ext4 volumes.
The general differences between ext4, Btrfs, XFS and ZFS in recovery are covered in the guide Ransomware on servers, NAS, RAID and VMware.
What survives ransomware? Snapshots, recycle bin, backups
Synology offers several protective layers. Which of them still helps after an attack almost always comes down to the same point: did the attackers have administrator rights?
| Feature | After encryption via SMB share | After a DSM admin compromise | Requirement |
|---|---|---|---|
| Snapshots (Snapshot Replication) | usually intact, read-only for users | may have been deleted | Btrfs volume, active schedule |
| Immutable snapshots | intact | cannot be deleted during the protection period | DSM 7.2 or later, supported model |
| Snapshot replication to a second NAS | intact | intact if the target has separate credentials | separate administration |
Recycle bin (#recycle) | may hold originals if the ransomware deletes rather than overwrites files | may have been emptied | enabled per shared folder |
Hyper Backup (multi-version, .hbk) | intact if the target was not reachable as a share | at risk if the target can be deleted from the NAS | target outside the NAS |
| Active Backup for Business | intact if storage is separate | at risk on the same NAS | Btrfs destination |
| WriteOnce shared folders | cannot be changed within the retention period | cannot be changed within the retention period | DSM 7.2 or later |
Three details that are often overlooked in practice:
- Recycle bin and snapshots are linked. Synology documents that recycle bin contents are recorded in snapshots.
[23] With the recycle bin disabled, deleted files are removed permanently straight away. [12] - Encrypted shared folders have limits. Snapshots of encrypted shared folders cannot be browsed, and Restore to this snapshot is not available for mounted encrypted shared folders.
[8] [9] Without the folder's key file or password, you won't get any further. - Hyper Backup data uses its own format. Multi-version backups are stored in the
.hbkformat and can only be read with Hyper Backup, Hyper Backup Explorer or Hyper Backup Vault.[13] An encrypted .hbkstructure therefore cannot be treated like an ordinary collection of files.
How to verify that a backup is clean before restoring it is explained in the guide Restoring backups after ransomware. If the NAS served as a repository for backup software, also see Veeam backup after ransomware.
Checking snapshots safely without making things worse
Snapshots are the fastest way back. Used carelessly, though, they destroy exactly the state you need for analysis and for your insurer. Work in this order:
- Keep the network disconnected. Check locally or through an isolated management connection, not from the compromised network.
- Document the snapshot list. In Snapshot Replication > Snapshots, open the list for each shared folder and photograph it: timestamps, locks, and the shield icon marking immutable snapshots.
[10] - Establish when encryption started. Older snapshots are only clean if they were taken before the attackers' first access. In an admin compromise, incident response has to establish that.
- Look first, then copy. Browse lets you view a snapshot's contents and copy them out without changing the shared folder.
[9] - Restore as a copy. Clone with a new name creates a new shared folder from the snapshot.
[9] The encrypted state stays untouched alongside it. - Don't roll back. Restore to this snapshot resets the entire shared folder to the earlier state.
[9] That only makes sense once data is secured, evidence is documented and the root cause has been dealt with. - Don't delete snapshots. Not even "redundant" ones. After deletion, Btrfs frees the space in the background, and Synology explicitly refers to ongoing space reclamation.
[8] Older states that a later reconstruction could have used disappear along with it.
A clone needs free space: Synology states at least 100 MB per shared folder for a restore or clone, but in practice you need as much as has changed since the snapshot.
What not to do
Many Synology data losses only happen after the attack. The following steps write to the drives or erase traces:
- Don't repair the volume or start a pool Repair. Repair is meant for degraded pools and rebuilds redundancy onto a replacement drive.
[16] With ransomware, the pool is rarely the problem, but the write load is. - Don't delete or recreate a storage pool, and don't attach it to another unit via Online Assemble. Online Assemble brings in pools whose drives come from a different Synology NAS.
[17] Any read-write mount writes new Btrfs transactions and can overwrite precisely the areas that hold older states. - Don't reset or reinstall DSM. Synology distinguishes two modes. Mode 1 resets the admin account, disables its two-factor authentication, switches the network to DHCP and turns off Auto Block and firewall rules. Mode 2 additionally wipes the entire system configuration, including the admin password and the encryption key vault, and requires DSM to be reinstalled.
[15] Synology stresses that a reset does not affect stored data. [15] What is lost, though, is the configuration, the account state and the logs needed for the investigation. For encrypted volumes, the recovery keys are required after a reset. [15] - Don't move, swap or transplant drives into another NAS. A second unit may detect them as a foreign pool or offer to install DSM.
- Don't run
btrfs check --repairover SSH. The Btrfs documentation advises using--repaironly when told to by a developer or experienced user, as no checking tool can fix every kind of damage.[18] - Don't install recovery software on the NAS, and don't copy data back onto the affected volume.
- Don't delete encrypted files. They are needed to identify the family, for any decryption and for reconstruction.
If you need the drives as evidence for an insurer or a criminal complaint, see the guide Forensic evidence preservation after cyberattacks.
Reconstruction when there are no snapshots
If no snapshots are left, or they were never set up, the actual data recovery begins. It is carried out exclusively on sector-level images, never on the device itself.
Step 1: rebuild RAID and LVM from the images
Each member drive of an md array carries a superblock with the array information. With format 1.2, it sits 4 KiB from the start of the device.
Step 2: evaluate older Btrfs states
Btrfs writes changes to new locations via copy-on-write. When ransomware overwrites a file, the old blocks therefore often remain on the volume until the space is reallocated. Btrfs also keeps a list of several previous file system tree roots in the superblock.btrfs restore only read and do not modify the file system image.
Step 3: ext4 and deleted originals
On ext4, the search shifts to inodes, the journal and free space. Ransomware that writes an encrypted copy and deletes the original often leaves usable remnants there. If it overwrites in place, little can usually be recovered without the key.
Damage pattern and recovery path
| Damage pattern | Likely cause | Recovery path |
|---|---|---|
| Shares encrypted, DSM looks normal, snapshots present | Infected client via SMB | Clone the snapshot or copy via Browse; check the timestamp first |
| Shares encrypted, no snapshots, Btrfs | Client via SMB, snapshots never scheduled | Images, analysis of copy-on-write remnants and older tree generations |
| Shares encrypted, ext4 | Client via SMB | Images, ext4 analysis, search for deleted originals; check the recycle bin |
.encrypt files, note README_FOR_DECRYPT.txtt | eCh0raix after admin login | Identify the variant and decryptor status, review snapshots, otherwise reconstruction |
| Snapshots deleted, admin accounts changed | Compromised DSM admin account | Incident response first; images, reconstruction at mdadm, LVM and Btrfs level |
| Immutable snapshots present | Admin compromise, protection period still running | Clone the snapshot and secure data before the period ends |
| Pool "crashed" or volume no longer mountable | Attack plus hardware fault or mishandling afterwards | Stabilise drives, image them, reconstruct the RAID virtually |
| Hyper Backup target encrypted as well | Target writable from the NAS | Analysis of the .hbk structure on the target drive |
Whether a decryptor exists for a family is covered on the ransomware decryption page. The fundamentals of reconstruction after ransomware are on the ransomware data recovery page. DATA REVERSE provides background on Btrfs and ext4 on its page on operating system and file system recovery (in German) (external link).
Incident response or data recovery?
The two often run in parallel but have different goals.
- Incident response establishes how the attackers got into the network and into DSM, whether data was exfiltrated, and when the device can be operated safely again. It is essential as soon as admin accounts are involved or the ransomware came from a Windows system on the corporate network.
- Data recovery reconstructs from drive images whatever can still be retrieved without a clean backup. DATA REVERSE handles Synology systems including SHR arrays; models and failure scenarios are listed on the page Synology data recovery at DATA REVERSE (in German) (external link).
[22]
Which route fits your situation?
How a Synology analysis works
- Intake: model, DSM version, SHR or classic RAID, Btrfs or ext4, encrypted shared folders or not, snapshot and backup configuration, steps taken so far.
- Images: every drive is imaged read-only at sector level; failing drives are stabilised first.
- Virtual reconstruction: mdadm arrays, LVM and the file system are rebuilt from the images, not inside the NAS.
- Analysis: snapshots, recycle bin, older states, deleted originals and unencrypted regions of large files.
- Assessment and handover: which data is fully, partially or not recoverable? Handover on new drives.
For units with many drives, it is often simpler to hand over the complete NAS with all drives in their original order. General information on other vendors is available at NAS data recovery at DATA REVERSE (in German) (external link).
After the incident: don't run the NAS the same way again
Putting the device back on the network unchanged after recovery invites the next wave. Synology's own recommendations from the 2019 and 2021 attack waves make a good minimum standard:
- Disable the default
adminaccount; use named admin accounts with strong, unique passwords and two-factor authentication. - Enable Auto Block and account protection, turn on the firewall and only open services when needed. Don't expose DSM directly to the internet; use a VPN for remote access.
- Run Security Advisor regularly and keep DSM and packages up to date.
- Schedule snapshots for all important shared folders, on supported models as immutable snapshots with the 7 to 14 day protection period Synology recommends.
[10] - Keep a backup that can be neither changed nor deleted from the NAS, for example on a second unit with separate credentials. The concept is explained in the guide Immutable backup.
- Don't do admin work from ordinary workstations, and don't store DSM passwords in client browsers.
Data recovery by system
- NAS Encrypted by Ransomware: Data Recovery for NAS Systems
- QNAP NAS Encrypted by Ransomware: Data Recovery and First Steps
- Veeam Backups Encrypted or Deleted by Ransomware: What Can Still Be Recovered
- Hyper-V After Ransomware: Recovering Encrypted VHDX Files and VMs
- Proxmox VE after Ransomware: Recovering VMs, ZFS and Backups
- Recovering SQL Server, Exchange & Databases After Ransomware
- DATEV Data Encrypted by Ransomware: Recovery and First Steps
- Ransomware on VMware ESXi: Attack Paths, First Response and Recovery
- Ransomware on Servers, NAS, RAID or VMware: What Can Be Recovered?
Frequently asked questions
Can I recover an encrypted Synology NAS from a snapshot?
Often, yes, provided the volume uses Btrfs, snapshots were scheduled and the attackers lacked the administrator rights needed to delete them. Rather than using Restore to this snapshot, first expose the snapshot as a new shared folder with Clone with a new name, or copy individual data out of it. That keeps the encrypted state intact for analysis and for your insurer.
Will resetting my Synology NAS delete my data?
According to Synology, a reset does not affect stored data. Mode 1, however, resets the admin account, network settings, Auto Block and firewall rules and disables two-factor authentication for the admin account, while Mode 2 wipes the entire system configuration including the encryption key vault and reinstalls DSM. Evidence and possibly keys are lost in the process, so image the drives before any reset.
Is a Synology NAS with ext4 harder to recover than one with Btrfs?
With ext4 you lose shared folder snapshots, which Synology only offers on Btrfs volumes, and with them the easiest way back. Reconstructing deleted originals is still possible on ext4, but it depends heavily on how much was written to the volume after the attack.
Do immutable snapshots protect against ransomware?
They protect against deletion by compromised administrator accounts for as long as the protection period runs. Synology has offered them since DSM 7.2 on supported models and recommends a period of 7 to 14 days. They do not help if encryption goes unnoticed for longer than the protection period, so a separate backup is still needed.
Can I put the drives into a PC and read the data myself?
Synology documents this route for failed units using Ubuntu, mdadm and lvm2 with a read-only mount. After ransomware, be careful: assembling the array can update metadata, and the most valuable traces are in older, invisible states. Create sector-level images of all drives first and only work on copies.
Is there a decryptor for Synology ransomware?
For SynoLocker, Synology stated in 2014 that it could not decrypt files that had already been encrypted. For other families such as eCh0raix it depends on the specific variant. File extension, ransom note and sample files show whether a tool exists, and the snapshot and reconstruction route should be checked in parallel.
Related ransomware profiles
- eCh0raix
.encrypt - Akira
.akira - Lockbit 3.0
.lockbit - Phobos
.phobos
Read next
- Ransomware on Servers, NAS, RAID or VMware: What Can Be Recovered?
- Backups after Ransomware: Why “We Have a Backup” Does Not Mean “We Can Recover”
- Getting Immutable Backups Right: What Immutable Storage Does Against Ransomware – and What It Doesn't
- Forensic Evidence Preservation after a Cyberattack: Secure the Evidence Before It Disappears
Sources and further reading
- [1]Synology – Synology Encourages Users to Update as SynoLocker Ransomware Affects Older DSM Versions (6 Aug 2014) synology.com
- [2]Synology – Synology Urges All Users to Take Immediate Action to Protect Data from Ransomware Attack (23 Jul 2019) synology.com
- [3]Synology – Synology Investigates Ongoing Brute-Force Attacks From Botnet (4 Aug 2021) synology.com
- [4]Palo Alto Networks Unit 42 – New eCh0raix Ransomware Variant Targets QNAP and Synology NAS Devices (10 Aug 2021) unit42.paloaltonetworks.com
- [5]BleepingComputer – eCh0raix ransomware now targets both QNAP and Synology NAS devices (10 Aug 2021) bleepingcomputer.com
- [6]Synology Knowledge Center – What is Synology Hybrid RAID (SHR)? kb.synology.com
- [7]Synology Knowledge Center – How can I use a PC to recover data when my Synology NAS malfunctions? kb.synology.com
- [8]Synology Knowledge Center – Snapshot Replication: Snapshots (DSM 7) kb.synology.com
- [9]Synology Knowledge Center – Snapshot Replication: Recovery (DSM 7) kb.synology.com
- [10]Synology Knowledge Center – What is an immutable snapshot? How do I use it? kb.synology.com
- [11]Synology – Press release: DSM 7.2 – Immutable storage, full-volume encryption, and more (22 May 2023) synology.com
- [12]Synology Knowledge Center – Enable Recycle Bin (DSM 7) kb.synology.com
- [13]Synology – Hyper Backup software specifications (DSM 7.2) synology.com
- [14]Synology – Active Backup for Business software specifications (DSM 7.2) synology.com
- [15]Synology Knowledge Center – How do I reset my Synology NAS? (For DSM 6.2.4 or above) kb.synology.com
- [16]Synology Knowledge Center – Repair a Storage Pool (DSM 7) kb.synology.com
- [17]Synology Knowledge Center – Assemble a Storage Pool (DSM 7) kb.synology.com
- [18]Btrfs documentation – btrfs check btrfs.readthedocs.io
- [19]Btrfs documentation – Mount options (backup roots) btrfs.readthedocs.io
- [20]Btrfs documentation – btrfs restore btrfs.readthedocs.io
- [21]mdadm(8) – Linux manual page man7.org
- [22]DATA REVERSE – Synology data recovery (German) datareverse-datenrettung.de
- [23]Synology – Snapshot Replication software specifications (DSM 7.2) synology.com