Storage & Virtualization

Ransomware on Servers, NAS, RAID or VMware: What Can Be Recovered?

Ransomware Reverse Editorial TeamLast technical review: 13 min read

Whether data can be recovered after ransomware hits a server, NAS, RAID array or VMware environment depends on what was actually encrypted: individual files, configuration and metadata, or entire virtual disks. Parts of the storage structures or file contents often survive and can be reconstructed by specialists. The key is to change nothing before an assessment: no rebuild, no initialization, no CHKDSK and no reinstall on the same disks.

Key takeaways

  • First establish whether encryption happened at file, container or volume level, because that determines the right recovery path.
  • Do not start a RAID rebuild, initialisation or configuration import until the data has been secured by other means.
  • Do not run CHKDSK, fsck or other repair tools on original disks, and do not reset NAS systems to factory settings.
  • Partially encrypted VMDK, VHDX or database files may contain unencrypted areas – this can only be assessed reliably on copies.
  • Have every disk imaged read-only first, and hand recovered data over only to a rebuilt, verified environment.

Why storage systems are a special case

Ransomware operators targeting organizations stopped settling for individual workstations a long time ago. They deliberately go after file servers, NAS appliances, hypervisors and databases – the systems where most business-critical data sits in one place. A single encrypted ESXi host can take dozens of virtual servers offline at once.[1]

For recovery, that is both bad news and good news. Bad, because the damage is concentrated. Good, because large, structured storage systems offer many footholds for reconstruction: RAID parameters, file system metadata, snapshots, database pages and files that were not fully encrypted.

Whether those footholds can be used is often decided in the first hours after the attack. Well-intentioned repair attempts – a RAID rebuild, a CHKDSK run, a quick reinstall – tend to destroy exactly the structures a later recovery depends on.

What was actually encrypted? The question that drives everything

Before discussing recovery options, you need to know at which layer the ransomware operated. Broadly, there are three scenarios:

  1. File level: The malware encrypts individual files through the file system, for example via network shares or directly on a server. Volume, file system and RAID remain structurally intact.
  2. Container level: Large containers such as VMDK, VHDX or database files are encrypted – fully, partially, or only their configuration and descriptor files.
  3. Volume or system level: Attackers encrypt whole volumes, delete snapshots, reformat datastores or deliberately destroy metadata. This is less common but particularly severe.

This is not an academic distinction. It determines whether file system analysis, container reconstruction or deep storage recovery is the right path – and whether a decryptor can play any role at all. The article Ransomware decryption vs. data recovery explains the difference in detail.

RAID: controllers, parameters and why you should not rebuild

To the ransomware itself, a RAID set is usually invisible. It sees a logical drive and encrypts files on it. So the RAID is typically not damaged by the encryption – it is damaged by what happens next.

Typical risks after the attack

  • Rebuild or re-initialization: If a disk shows as failed after the incident or the controller reports a "foreign" configuration, it is tempting to start a rebuild or import the configuration. With the wrong disk order or stale metadata, the controller overwrites data that could still have been recovered.
  • Controller swap or firmware update: A different controller may interpret metadata differently. The array may appear unusable even though the data is physically present.
  • Already weakened drives: Older arrays often contain disks with read errors. The heavy read load of a rebuild can push them over the edge.

How a RAID reconstruction works

In professional data recovery, each disk is imaged individually through a write blocker. The RAID parameters are then derived from the data itself: RAID level, stripe size, disk order, parity rotation and offsets. A virtual array is assembled from the images – the originals stay untouched. Only at this virtual layer does the actual analysis of file systems and files begin.

NAS systems: share-level encryption vs. an attack on the NAS itself

NAS appliances from vendors such as Synology or QNAP are the central data store in many small and mid-sized organizations. In a ransomware incident, two fundamentally different scenarios apply. For a dedicated emergency and recovery guide see NAS encrypted by ransomware, with vendor-specific pages for QNAP NAS and Synology NAS.

Scenario 1: Encryption over network shares

An infected Windows client or server encrypts everything it can reach over SMB or NFS. The NAS operating system itself is not compromised. In this case:

  • The volume, the RAID group (often mdadm/LVM-based) and the file system are usually structurally intact.
  • Snapshots on the NAS may survive, provided they were not reachable via the share and were not deleted.
  • On copy-on-write file systems such as Btrfs or ZFS, older data blocks may still be present on disk.

Scenario 2: Attack directly on the NAS

Attackers exploit vulnerabilities or stolen admin credentials to run code on the NAS itself. Snapshots may then be deleted, volumes encrypted or configurations tampered with. The damage is usually deeper, and reconstruction has to start at the RAID, LVM and file system layers.

SAN and LUNs

In SAN environments, a storage array presents block storage (LUNs) to servers and hypervisors. Ransomware never sees the SAN itself – only the file systems on the LUNs, such as NTFS on a Windows server or VMFS on an ESXi cluster.

For recovery, this means analysis usually starts with the LUN as a block device. Array-side snapshots or replicas can be a valuable fallback, as long as the attackers had no access to storage management. Whether that was the case is a question for incident response before any snapshot is treated as clean.

If a LUN is reformatted, remapped or presented to a host that initializes it, metadata is lost. Again: secure first, analyze second.

VMware ESXi and VMFS: what is possible with encrypted VMs

ESXi hosts are a preferred target because one foothold reaches many virtual machines. Several ransomware families ship dedicated Linux or ESXi variants.[3][5]

Not every file is fully encryptedFully encrypted: Content cannot be rebuilt without the key – backup or decryptor needed. File header only: Content survives; the header can often be rebuilt. Intermittent (every n-th block): Large files such as VMDKs or databases are often partly usable. Interrupted: The unencrypted remainder can be used directly. encryptednot encryptedFully encryptedContent cannot be rebuilt without thekey – backup or decryptor neededFile header onlyContent survives; the header can oftenbe rebuiltIntermittent (every n-thblock)Large files such as VMDKs or databasesare often partly usableInterruptedThe unencrypted remainder can be useddirectly © 2026 ransomware-reverse.de
Not every file is fully encryptedFully encrypted: Content cannot be rebuilt without the key – backup or decryptor needed. File header only: Content survives; the header can often be rebuilt. Intermittent (every n-th block): Large files such as VMDKs or databases are often partly usable. Interrupted: The unencrypted remainder can be used directly. encryptednot encryptedFully encryptedContent cannot be rebuilt without the key – backup ordecryptor neededFile header onlyContent survives; the header can often be rebuiltIntermittent (every n-th block)Large files such as VMDKs or databases are often partlyusableInterruptedThe unencrypted remainder can be used directly © 2026 ransomware-reverse.de
Not every file is fully encrypted. Many ransomware families encrypt only parts of large files to save time. Which pattern applies depends on family and configuration and only shows in an analysis of disk images.

Typical damage patterns

  • Only configuration files encrypted: In the 2023 ESXiArgs campaign, CISA reported that configuration files were encrypted while the flat files holding the actual disk data were not.[2] In some cases this allowed the configurations to be rebuilt, and CISA published a dedicated recovery script.[2][4]
  • Partial or intermittent encryption: To save time, some variants encrypt large files only in sections. CISA describes, for BlackSuit/Royal, an approach where only a selectable portion of each file is encrypted.[3] For Akira, whose Akira_v2 variant specifically targets ESXi systems, CISA likewise describes an encryption percentage that can be set by parameter.[5] With VMDK files of several hundred gigabytes, unencrypted regions can then remain between the encrypted sections.
  • Full encryption: Other variants or configurations encrypt files completely. Reconstruction without the key is then severely limited.

What can be salvaged from partially encrypted VMDKs

A virtual disk itself contains partition tables and file systems – NTFS for Windows servers or ext4/XFS for Linux VMs, for example. If large regions remain unencrypted, parts of the guest file system, individual files or database pages can often be reconstructed. How much is actually usable depends on the ransomware family and variant, the encryption pattern, where critical metadata sits on the virtual disk, and whether thin or thick provisioning was used.

Blanket statements are not credible here. A reliable assessment only emerges after the encryption pattern has been analyzed on copies of the affected files.

VMFS metadata

Besides VM files, the datastore itself can be hit, for example when attackers delete or reformat datastores. VMFS metadata can sometimes be reconstructed from raw data, provided it has not been overwritten by subsequent writes.

Hyper-V and VHDX

In Hyper-V environments, virtual disks are stored as VHDX files on NTFS or ReFS volumes, often on Cluster Shared Volumes. Because ransomware on Windows hosts works through the file system, VHDX files are hit like any other file.

The situation mirrors VMware: what matters is whether containers were fully or only partially encrypted. VHDX files also carry their own header and metadata regions plus a log. If those are encrypted but the data region is not, the virtual disk layout can sometimes be recreated. Differencing disks (AVHDX) from checkpoints are another possible starting point. For concrete dos and don'ts see Hyper-V after ransomware; for KVM-based environments see Proxmox VE after ransomware.

Databases: SQL Server, Exchange and others

Databases are large files with a highly structured interior. That makes them fragile – but also analyzable.

  • SQL Server: MDF/NDF files are organized into fixed-size pages. With partial encryption, unencrypted pages – and with them table contents – may remain readable. Transaction logs (LDF) and older backup files are additional sources.
  • Exchange: Mailbox databases (EDB) are built on the ESE database engine. Reconstruction at page and mailbox level is possible in some cases if enough structure survives.
  • Other systems: The same principle applies to other databases, such as ERP or line-of-business software – each with its own effort.

Database recovery is demanding specialist work. The result is often not a complete original state but a set of reconstructed tables or mailboxes that the business owners then need to validate.

File systems and damaged metadata

Beneath shares, VMs and databases sits the file system. Its metadata determines whether file names, folder structures and timestamps can be restored.

File systemTypical useStructures relevant to recovery
NTFSWindows servers, Hyper-V, VMsMFT, journal, Volume Shadow Copies (if not deleted)
ext4Linux servers, older NASSuperblocks, inodes, journal
XFSLinux servers, some NASAllocation groups, inodes, journal
BtrfsSynology NAS, LinuxCopy-on-write trees, older tree generations, snapshots
ZFSTrueNAS, storage serversCopy-on-write, uberblocks, snapshots

Copy-on-write file systems write modified data to new locations. When a file is encrypted and rewritten, the old blocks may remain on disk for a while – until new writes overwrite them. Every bit of continued use reduces that window.

With classic file systems such as NTFS, a lot depends on how the ransomware operates: whether it overwrites files in place or writes encrypted copies and deletes the originals. In the second case, original data may still exist in unallocated space.

Overview: system type, damage pattern, recovery paths and limits

System typeTypical damage patternPossible recovery pathsLimits
Hardware RAID in a serverFiles encrypted; array degraded or incorrectly imported after the incidentPer-disk imaging, parameter reconstruction, virtual array, file system analysisLimited if a rebuild with wrong parameters already ran or disks are physically failing
NAS (shares encrypted)Files on SMB/NFS shares encrypted, NAS itself intactSnapshots, copy-on-write remnants, file system analysisSnapshots may be deleted or never configured; overwriting through continued use
NAS (system compromised)Volumes encrypted, snapshots deleted, configuration alteredRAID/LVM reconstruction, analysis of Btrfs/ext4 structuresFull volume encryption severely limits options
SAN / LUNFile systems on LUNs encrypted or reformattedArray snapshots (after verification), analysis of the LUN as a block deviceSnapshot integrity must be confirmed; reformatting overwrites metadata
VMware ESXi / VMFSVMDK and configuration files fully or partially encryptedRebuilding configurations, reconstructing partially encrypted VMDKs, VMFS analysisDepends on family/variant; full encryption is hardly reversible without the key
Hyper-V / VHDXVHDX and AVHDX files encryptedAnalysis of unencrypted regions, header reconstruction, guest file systemAs with VMDK, depends on the encryption pattern
SQL Server / ExchangeMDF/LDF or EDB encryptedPage-level reconstruction, analysis of logs and older copiesLabor-intensive; results often incomplete and need validation
Standalone server (NTFS, ext4, XFS)Files encrypted, shadow copies deletedFile system analysis, search for original data in unallocated spaceDepends on whether originals were overwritten[3]

What admins should not do before data recovery

The following actions are often sensible in day-to-day operations but risky after a ransomware incident, as long as it is unclear whether data needs to be recovered:

  • No RAID rebuild and no initialization. No "import foreign configuration" without prior images either.
  • No CHKDSK, fsck, xfs_repair or btrfs check with repair options on original disks.
  • No operating system reinstall on the affected disks.
  • Do not reinstall ESXi on the same disks, and do not create or reformat datastores.
  • No factory resets or firmware resets on the NAS.
  • Do not run recovery software directly on the original if it writes to the same disk.
  • Do not delete or rename encrypted files. They are needed for analysis and any later decryption.
  • Do not restore backups onto the affected volumes before it is clear whether anything there still needs to be secured. The article Ransomware backup recovery explains how to validate backups safely.

How a storage recovery after ransomware works

Professional data recovery follows a traceable process. The most important rule: work on copies, not on originals.

  1. Inventory: Which systems, volumes, VMs and databases are affected? Which data is business-critical? Which backups exist?
  2. Preserve the current state: Every involved disk is imaged read-only – for RAID systems, each disk individually. Failing drives are stabilized first.
  3. Analyze the encryption: Samples reveal which files are affected, whether encryption was full or partial, and which structures are intact. It is also worth checking against known ransomware families, for example to see whether a decryptor exists.
  4. Reconstruct the storage layer: RAID parameters, LVM, VMFS or other volume structures are rebuilt virtually.
  5. Reconstruct containers and file systems: Virtual disks, guest file systems and databases are analyzed on copies.
  6. Prioritized restoration: Critical data first, then the rest. Results are checked with the business owners for completeness and plausibility.
  7. Hand-over into a clean environment: Recovered data does not go back onto compromised systems but into rebuilt, verified infrastructure.

Ideally, incident response runs in parallel: the attack path, compromised credentials and possible data exfiltration are investigated. The article Ransomware incident response process describes the phases.

Which route fits your situation?

Keep incident response and data recovery separate

In storage incidents, roles blur quickly. Yet these are two distinct jobs:

  • Incident response contains the attack, preserves forensic evidence, identifies the attack path, reviews compromised credentials and plans a safe return to operations.
  • Data recovery reconstructs encrypted or damaged drives, RAID and NAS systems, virtual disks, file systems and databases.

The two complement each other. Images created for data recovery can also serve forensics, if this is coordinated. Conversely, containment measures should be chosen so they do not destroy recoverable data. More on the ransomware data recovery and incident response pages.

Conclusion

Ransomware on a server, NAS, RAID array or VMware environment does not automatically mean total loss. Depending on the family, variant and system design, structures often survive that a reconstruction can build on: unencrypted regions of large files, snapshots, copy-on-write remnants, database pages or RAID metadata. How much of that is usable cannot be promised in advance.

What can be said with confidence: every write to the affected disks narrows the options. If you hold off on rebuilds, repair tools and reinstalls before the assessment and create images first, you put yourself in the best possible position – whichever recovery path is chosen in the end. In the long run, a well-designed cyber resilience strategy and tested backups help ensure it does not come to this.

Data recovery by system

Frequently asked questions

Can data be recovered from an encrypted NAS?

It depends on whether the encryption happened over a network share from an infected client or directly on the NAS itself. In the first case the volume, file system and possibly snapshots often remain intact; in the second case the damage usually goes deeper. A reliable assessment is only possible after analyzing images of the drives.

Should I start a RAID rebuild after a ransomware attack?

No, not before an assessment. A rebuild writes to every member disk and, with wrong parameters, a shifted disk order or an already weak drive, can overwrite structures needed for reconstruction. Image each disk individually first.

Are encrypted VMDK files always lost?

Not necessarily. Some ransomware variants encrypt large files only partially or intermittently, others only encrypt the virtual machine configuration files. In those cases parts of the virtual disk and the file systems inside it may be reconstructable. How much is possible depends on the family, variant and configuration and can only be determined through analysis.

Can I simply reinstall ESXi after an attack?

Not on the same disks that hold the affected datastores, as long as it is unclear whether data needs to be recovered. A reinstall can overwrite partition tables and VMFS metadata. It also destroys traces that incident responders need.

Why shouldn't I run CHKDSK or fsck?

File system repair tools write changes directly to the disk. They may discard damaged metadata or merge entries that a professional analysis could still have used. If such tools are used at all, they belong on a copy, never on the original.

Can databases such as SQL Server or Exchange be recovered after ransomware?

In some cases, yes, especially when database files were only partially encrypted or when older versions, transaction logs or shadow copies survive. Reconstruction then happens at the level of database pages or mailbox structures and is technically demanding. Promising a specific outcome in advance would not be honest.

What is the difference between incident response and data recovery for storage systems?

Incident response determines how the attackers got in, contains the attack and preserves evidence. Data recovery focuses on technically reconstructing encrypted or damaged drives, RAID sets, virtual disks and databases. The two complement each other but are separate services.

Related ransomware profiles

Read next

Sources and further reading

  1. [1]CISA – #StopRansomware Guide cisa.gov
  2. [2]CISA – AA23-039A: ESXiArgs Ransomware Virtual Machine Recovery Guidance cisa.gov
  3. [3]CISA – AA23-061A: #StopRansomware: BlackSuit (Royal) Ransomware cisa.gov
  4. [4]VMware – ESXiArgs: Questions & Answers vmware.com
  5. [5]CISA – AA24-109A: #StopRansomware: Akira Ransomware cisa.gov