Encrypted .BAK files by ransomware

1️⃣ Problem Overview

.BAK files are backup files created by applications or databases (e.g., SQL Server, MySQL, ERP software). They are intended to restore data in case of failure or corruption. When these files are infected by ransomware, they usually undergo encryption or corruption. This encryption makes it impossible to access the data without the corresponding key.

2️⃣ Symptoms of an infected .BAK file

  1. Modified extension
    • The ransomware may rename the file: e.g., db_backup.bak → db_backup.bak.lockbit or db_backup.bak.anubis.
  2. Unchanged file size but unreadable content
    • The file appears normal in size, but its content is encrypted.
  3. Impossible to open
    • Standard tools used to read .BAK files show a format error or refuse to open it.
  4. Presence of a ransom note
    • An HTML or TXT file is left in the same folder to inform you of the attack.
  5. Partial corruption if the ransomware combined encryption + deletion
    • Some ransomware destroys the header or critical blocks, making classical recovery nearly impossible.

3️⃣ Impact on data recovery

3.1 Technical complexity

  • .BAK files are often large (several GB).
  • If they are encrypted by a modern ransomware (e.g., ECIES, AES-256 with a unique key), standard recovery tools cannot decrypt them.
  • Since .BAK files are not meant to be encrypted, the malware can corrupt internal metadata, complicating decryption or reconstruction.

3.2 Risk of total data loss

  • If the encryption key is unique and not brute-forced, recovery without paying the ransom is nearly impossible.
  • If the .BAK file is stored on a NAS or network backup and the ransomware reached the entire volume, all copies may be compromised.

3.3 Dependency on backups

  • Encrypted or corrupted .BAK files must be restored from uncompromised copies, ideally offline or disconnected from the network.
If no clean copy exists, advanced forensic techniques may be required, but success is not guaranteed.

4️⃣ Time required to recover the data

The recovery time depends on several factors :
Factor Impact on time
.BAK file size The larger the file, the longer the recovery (hours to days for files > 100 GB)
Type of encryption Strong encryption (AES-256, ECIES) = recovery impossible without the key; weak encryption = faster recovery
Number of files and redundancy Multiple encrypted or corrupted .BAK files = more time required for reconstruction
Backup status Intact backups = fast recovery (hours); no backups = advanced, lengthy recovery (days to weeks)
Technical expertise Specialized teams = optimized time and minimized losses; DIY methods = failure or very long delays
In practice:
  • With healthy offline copies, a 20 GB .BAK file can be restored in 1 to 3 hours or less.
Without a clean copy and relying solely on forensic techniques or advanced recovery tools, the process may take several days to weeks, with a very limited success rate.

5️⃣ Best practices after infection

  1. Do not manipulate the .BAK file
    • Avoid opening, copying, or attempting to modify the file, as this may further corrupt its content.
  2. Isolate the storage device
    • Disconnect the drive or NAS from the network to prevent further ransomware propagation.
  3. Analyze the ransomware type
    • Identifying the ransomware family and group helps determine whether a decryption tool exists.
  4. Assess the backups
    • Check for offline copies or data stored on unaffected volumes.
  5. Contact experts
Specialized companies can sometimes recover .BAK files even when partially corrupted thanks to advanced forensic tools and manual repair of file structures.

6️⃣ Summary

  • Symptoms: modified extension, unreadable file, ransom note, possible corruption.
  • Impact on recovery: depends on the encryption, file size, and backup status. An encrypted .BAK file without a clean copy can be irreversible.
  • Recovery time:
    • With intact backup: hours
    • Without backup: days to weeks, low success rate
Immediate actions: isolate the storage device, analyze the ransomware, and seek specialized expertise.