Removing Ransomware From External Hard Drives Safely
An external hard drive can carry encrypted files, ransom notes, malicious shortcuts, or the ransomware itself. Connecting it to another computer without a plan may expose additional documents and backups, especially when the host system has weak security or automatic file execution enabled.
Safe cleanup begins with containment. The priority is to prevent the infection from spreading, preserve the encrypted data for possible recovery, and determine whether the external disk is infected or simply storing files encrypted elsewhere.
Recognize The Signs Of Ransomware
Common indicators include files that suddenly have unfamiliar extensions, ransom notes in multiple folders, renamed documents, and error messages stating that data is locked. A drive may also contain suspicious executables, shortcut files, or hidden directories that were not present before the incident.
Do not open the ransom note’s links, run unknown programs, or pay immediately. Payment does not guarantee a working decryptor and can expose victims to follow-up fraud. Record the file extension, ransom note name, approximate time of infection, and affected operating system. These details may help identify the ransomware family.
Disconnect And Contain The Infection
If ransomware is active, disconnect the external drive from the computer without browsing its contents. Unplug the USB cable after closing open applications, and disconnect the computer from Wi-Fi or Ethernet if files on network shares may be affected. Avoid connecting other backup devices until the system has been checked.
Use a separate, trusted computer for research and recovery whenever possible. If the host computer shows signs of compromise, such as pop-ups, disabled security tools, or browser redirect guidance becoming necessary, treat the computer as unsafe until it has been scanned and cleaned.
Preserve Encrypted Files Before Cleaning
Do not format the external hard drive, delete ransom notes, or rename encrypted files. Even when no decryptor is currently available, security researchers may release one later. Preserve a complete copy of the affected data if the drive has enough capacity, and keep the original disconnected.
A forensic image is safer than repeatedly opening the disk. Advanced users can create a sector-by-sector image with trusted software, while less experienced users should consider a reputable data-recovery professional. If the drive is making clicking sounds, disconnect it immediately; continued operation may worsen physical damage.
Before attempting recovery, identify whether the files are encrypted or merely hidden. Some malware changes folder attributes or replaces files with shortcuts, while other threats encrypt the contents. This distinction affects the correct cleanup and recovery method.
| Situation |
Recommended response |
Avoid |
| Files have a new extension and ransom note |
Preserve copies and identify the ransomware family |
Deleting encrypted files |
| Folders contain suspicious shortcuts |
Scan the host and inspect the drive safely |
Opening unknown executables |
| Drive is physically failing |
Stop using it and seek professional recovery |
Repeated scans or repairs |
| A known decryptor exists |
Verify its source and test on copies |
Downloading cracked tools |
| The host computer is infected |
Clean or reinstall the host before reconnecting storage |
Attaching other backups |
Clean The Computer Before Reconnecting
Removing ransomware from an external hard drive is ineffective if the computer reconnecting to it remains infected. Run a full scan with a reputable, updated security product, preferably after starting Windows in Safe Mode when ordinary malware interferes with security software. On macOS, review login items, configuration profiles, applications, and security alerts before mounting the drive again.
Use a second-opinion scanner when the initial scan finds nothing but suspicious behavior continues. Spyware can steal credentials or monitor activity without encrypting files, so review this spyware removal guide if you suspect broader compromise. Change important passwords from a clean device and enable multifactor authentication.
Do not rely on a ransom note’s instructions to install a decryptor. Download tools only from recognized security researchers, established incident-response organizations, or official vendors. Test any decryptor on duplicate files first, because an incompatible tool may damage data permanently.
Recover Data Without Reinfecting Devices
After the host is clean, connect the external drive only when necessary, and keep real-time protection enabled. Scan the drive before opening documents. If the security product quarantines a malicious file, do not restore it unless its identity and purpose are verified.
Recovery should begin with clean offline backups, cloud version history, or system snapshots. Check whether the backup predates the infection and whether it contains unencrypted copies. If a decryptor is available, preserve the original files and work on copies stored in a separate location.
Some ransomware deletes shadow copies, while others leave them intact. Recovery software may help with deleted files, but installing it directly onto the affected disk can overwrite recoverable data. Use a different drive for recovered output and stop if the disk shows physical failure.
Prevent Another External Drive Attack
External storage is often treated as a backup even when it remains permanently connected. A ransomware attack can encrypt both the computer and attached disks. Use a rotation system in which at least one backup remains disconnected, and maintain copies in separate locations.
Apply operating system and application updates, disable unnecessary autorun behavior, and avoid unknown cracks, email attachments, and unsolicited remote-access tools. Limit write access where practical, and label backup drives clearly so they are not accidentally reformatted or overwritten.
Build recovery habits around verification rather than assumption:
- Keep at least one offline or immutable backup.
- Test file restoration on a regular schedule.
- Scan removable media before opening its contents.
- Store recovery keys and account credentials securely.
- Document the ransomware extension, note, and affected devices.
A clean backup is more valuable when its contents and restoration process are known in advance. Businesses should also preserve logs and contact an incident-response specialist before wiping systems, particularly when customer, financial, or regulated information may be involved.
If an external drive contains irreplaceable data, avoid experimental commands and random decryption utilities. Isolate the equipment, preserve copies, and obtain qualified help before making changes. Following a careful sequence protects evidence, reduces reinfection risk, and gives legitimate recovery options the best chance of working.