Exchange server ransomware recovery starts with isolation and ends with a restored copy of the database.
Disconnect the server from the network and preserve its disks for investigators. Restore .edb files from an offline backup, a snapshot or a lagged copy onto a new PC. Encrypted data stays unreadable without a key.
Ransomware on an Exchange server locks all mailboxes in the encrypted database. In March 2021, CISA added ransomware activity tied to Exchange Server exploits, including DearCry, to its Exchange alerts.
Exchange server ransomware recovery follows a fixed order. You contain the attack, find a copy attackers never reached and export mail before rebuilding anything.
What Comes First When Ransomware Hits Exchange?
Cutting the server off the network starts Exchange server ransomware recovery. CISA's #StopRansomware Guide says to determine which systems are affected and isolate them immediately.
Power down only when you cannot disconnect the server. CISA says shutdown prevents your team from preserving infection artifacts and evidence in volatile memory.
- Unplug network cables or disable switch ports. Do not wipe or reinstall anything yet.
- Take a system image and memory capture of sample devices, as CISA advises. Exchange EDB Forensic Analysis covers hashing database files.
- Restore onto a new machine, never onto the attacked server. CISA says to identify dropper malware before you rebuild from backups so compromise does not continue.
- In the US, report incidents to CISA and your local FBI field office. Online reports go to ic3.gov.
- Save your encrypted EDB file in case a decryptor appears later.
How to Spot an Encrypted EDB File
Copy the file, use eseutil /mh on your copy and check the database folder for signs of attack. Eseutil Commands Reference lists the switches used here.
| Sign | What you see |
|---|---|
| Changed name | Extension added to .edb name. CISA's DearCry analysis lists .CRYPT |
| Ransom note | Message with payment demands in the database folder |
| Header check fails | Eseutil /mh shows an error in place of header fields |
eseutil /mh "F:\Restore\DB01.edb"
Microsoft lists ESE codes for a file that is no longer a valid database, per Extensible Storage Engine Error Codes.
| Value | Name | Microsoft description |
|---|---|---|
| -1206 | JET_errDatabaseCorrupted | Non database file or corrupt database |
| -1028 | JET_errInvalidDatabase | Not a database file |
| -531 | JET_errBadDbSignature | Bad signature for a database file |
Where to Find an Unaffected Copy of Your Mailboxes
Exchange server ransomware recovery needs one database copy that ransomware never reached. Check these sources from newest to oldest.
| Source | Mail is behind by | Watch for |
|---|---|---|
| Lagged database copy | Replay lag you set, 14 days at most | Attacker reached that server too |
| Offline backup | Time of last backup | Test the restore first |
| Storage or VM snapshot | Time of last snapshot | Snapshot sat on storage the attacker could reach |
| Windows Server Backup copy | Time of last backup | Original location restores all backed up databases on the volume |
| Old .edb from a migration | Date of that copy | Old mail only |
CISA says to maintain offline, encrypted backups and to test their availability and integrity regularly. FBI guidance says to store backups apart from the computers and networks they back up.
In its Exchange 2013 help, Microsoft says to choose another location when you prepare a recovery database from a Windows Server Backup copy. Use Windows Server Backup to restore a backup of Exchange explains it. Choosing the original location restores all backed up databases on the volume.
How to Restore Mail From a Lagged Database Copy
Suspend your lagged copy before its logs replay, then replay logs only up to a point before the attack. Microsoft allows a replay lag of up to 14 days, per Set-MailboxDatabaseCopy.
Suspend-MailboxDatabaseCopy DB01\EX3 -SuspendComment "Ransomware recovery" -Confirm:$false
eseutil /r E00 /a /l "c:\DBRecovery" /s "c:\DBRecovery" /d "c:\DBRecovery"
Before eseutil starts, copy the database and logs to another volume, move logs created after the attack to another folder and delete the checkpoint (.chk) file. Microsoft says your copy needs all log files up to your chosen point.
Replay leaves your database in Clean Shutdown state. Microsoft publishes the activation procedure for a lagged copy in How to activate lagged mailbox database copy. Coverage spans Exchange 2016 and 2019 plus Subscription Edition.
How to Export Mailboxes Without Rebuilding Exchange First
Open the restored copy on a separate PC and export mailboxes before you rebuild servers. Exchange server ransomware recovery continues there while new servers take shape.
Your restored ransomware copy opens offline in Exchange EDB Converter from Univik. Univik Software installs on Windows 10 and 11 PCs. Your recovery PC needs neither an Exchange Server install nor an Outlook install.
Logs stored beside your database replay into a working copy, mirroring eseutil /r. Univik Software repairs that copy when no logs exist, so steps 3 and 4 become optional.
Your restored file stays unmodified. Univik Software duplicates a dirty or locked ransomware database into your working folder before it opens anything. Plan free disk space for the .edb size and another 256 MB in that folder.

| Point | Rebuild Exchange first | Univik Software |
|---|---|---|
| Exchange Server needed | Yes | No |
| Database versions | Recovery database takes Exchange 2016 and later only | Exchange 2000 to 2019 |
| Dirty database | Replay logs with eseutil /r first | Replays logs into a copy or repairs a copy |
| Price and trial | Not applicable | Trial saves 10 messages per folder, licences from $99 for 2 PCs |
Exchange Recovery Database covers its limits. Microsoft restricts a recovery database to Exchange 2016 and later mailbox databases in its Recovery databases in Exchange Server article. How to Convert EDB to PST and Import EDB to Office 365 explain the export step for PST files and Office 365 mailboxes.
For log replay after a Dirty Shutdown header, see Exchange Database Dirty Shutdown. Exchange Server Crashed covers a server that will not start.
What if No Unaffected Copy Exists?
Exchange server ransomware recovery stalls when no unaffected copy survives. Save encrypted files and look for a decryptor, because nothing opens them without the key.
CISA says to consult federal law enforcement about possible decryptors. No More Ransom lists decryptors for some ransomware families and says some ransomware types have no solution.
FBI guidance does not support paying a ransom. Univik Software does not decrypt files, so a locked .edb needs a decryptor before a converter opens it.
Eseutil /p decrypts nothing either. Before You Run Eseutil /p covers data loss from a hard repair.
How to Prevent the Next Exchange Ransomware Attack
Patching, one offline backup and a tested restore cut damage from your next Exchange attack.
- Install Exchange security updates as they ship. Microsoft released fixes for CVE-2021-26855, CVE-2021-26857, CVE-2021-26858 and CVE-2021-27065 on March 2, 2021, per HAFNIUM targeting Exchange Servers with 0-day exploits.
- Move off Exchange 2016 and 2019. Microsoft lists October 2025 as the extended end date on Exchange Server 2016 - Microsoft Lifecycle and Exchange Server 2019 - Microsoft Lifecycle. Exchange 2019 End of Support covers old databases.
- Store one backup offline, as CISA and the FBI advise.
- Place a lagged copy on a server with separate admin accounts.
- Test a full restore on a schedule and time it.
“The backup you never tested is a hope, not a plan. Restore one database to a spare PC every six months and time it.”
- Exchange server ransomware recovery starts with isolating the server, not wiping it.
- Mail comes back from a database copy that attackers never reached.
- Lagged copies delay replay by up to 14 days, so suspend one before its logs replay.
- Restore to a new PC and export mailboxes before you rebuild Exchange.
- Encrypted data stays unreadable without the key. No converter changes that.
Opens a restored ransomware copy in Univik Software to preview mailboxes before Exchange is rebuilt. Trial edition saves 10 messages per folder. Licences start at $99 for 2 PCs.
Free Download See all featuresQuestions About Exchange Server Ransomware Recovery
Can eseutil /p repair an encrypted Exchange database?
No. Exchange 2007 help from Microsoft warns that a repair can complete and still leave a database too damaged to mount. Repair invalidates previous backups and decrypts nothing, so restore a backup instead, per How to Run Eseutil /P (Repair).
Can a lagged database copy bring mail back after ransomware?
Yes, when attackers never reached the server with that copy. Microsoft allows a replay lag of up to 14 days, so you replay logs to a point before the attack, per Set-MailboxDatabaseCopy.
Should you restore onto the old Exchange server?
No. Restore onto a new machine. CISA says to identify dropper malware before you rebuild from backups so the compromise does not continue.
Should you power off the server after an attack?
No, unless you cannot disconnect it from the network. CISA says powering down prevents your team from preserving infection artifacts and evidence in volatile memory.
Should you pay the ransom?
No. FBI guidance does not support paying a ransom and says payment does not guarantee you get your data back.
Can Univik Software decrypt a database that ransomware encrypted?
No. Univik Software does not decrypt files. Restored backup copies open because they are readable databases.
Can you open mail from a restored EDB while the network is rebuilt?
Yes. Univik Software converts mailboxes from a restored ransomware database to PST on a standalone Windows PC without Exchange Server.
Where do you report an Exchange ransomware attack?
In the US, report it to CISA and your local FBI field office. Online reports go to ic3.gov.