Skip to content
Back to Blog
Security11 min read

Ransomware Recovery Plan: 9 Steps to Restore Systems

A structured incident response playbook to recover encrypted systems without paying ransom—isolate, verify backups, restore from immutable snapshots, and patch entry points.

Written by Abdul AbrorTechnical Hosting Support Engineer
Ransomware Recovery Plan: 9 Steps to Restore Systems
On this page

The second you discover encrypted files and a ransom note on your server, your adrenaline spikes. But paying the ransom funds criminal operations and offers zero guarantee your files will decrypt cleanly. A methodical recovery process—built on verified backups and disciplined forensics—gives you control back.

I've walked hosting clients through dozens of ransomware recoveries. The ones who recover fastest follow a checklist, not instinct. This playbook assumes you already run regular backups; if you don't, your options narrow to paying or accepting data loss. Let's walk through the nine steps that get systems back online without handing money to attackers.

Step 1: Isolate infected systems immediately

Disconnect compromised machines from the network the moment you confirm encryption. Pull the Ethernet cable or disable the network interface—do not rely on firewall rules alone because some ransomware strains scan for and disable security controls.

# Disable all network interfaces on a Linux server
sudo ip link set eth0 down
sudo ip link set eth1 down

If the server is a VM, snapshot the current state before powering it down. That snapshot preserves forensic evidence and the encrypted disk state. For bare-metal hosts, photograph the ransom note and any on-screen messages before isolation.

Check your monitoring logs to identify when encryption started. Ransomware often runs for hours or days before triggering the ransom screen, so the blast radius might include backup jobs that ran during the silent period. Assume any system that communicated with the infected host in the past 72 hours is suspect until you verify otherwise.

Isolation stops lateral movement. Modern ransomware hunts for network shares, domain controllers, and backup repositories. Every minute an infected system stays online increases the chance it encrypts something else.

Step 2: Verify backup integrity and recency

Your backups are only useful if they predate the infection and passed integrity checks. Log into your backup console and locate the most recent snapshot taken before encryption began. Run a verification job against that snapshot to confirm the files are readable.

# Verify a tarball backup's integrity
tar -tzf /backups/server-backup-2026-08-05.tar.gz > /dev/null
echo $?  # Must return 0

For block-level backups or VM snapshots, mount the backup read-only and inspect a handful of critical files. Open a database dump, check a config file, verify directory structures. Automated verification is good; manual spot-checks catch edge cases.

If your most recent clean backup is weeks old, you face a data-loss decision. Restoring means losing everything created or modified since that snapshot. Document that gap for stakeholders before you proceed. Some hosting environments keep incremental backups; check if any intermediary snapshots escaped encryption.

Immutable or append-only backups—stored on systems the infected server cannot modify—are the gold standard. If your backups lived on a network share the ransomware could reach, assume they're compromised until verified.

Step 3: Identify the ransomware strain

Knowing which ransomware hit you helps in two ways: it tells you if free decryptors exist, and it reveals typical attack vectors so you can patch them. Upload the ransom note and a sample encrypted file to a ransomware identification service. Many strains leave signatures in file extensions, note filenames, or payment instructions.

Some older or poorly coded ransomware has known decryption tools released by security researchers. Check if your strain has a published decryptor before you spend hours restoring from backup. That said, modern ransomware families almost never have free decryption options.

Identifying the strain also surfaces threat intelligence. If the strain is known for exploiting unpatched VPN appliances or phishing macros, you know where to focus your post-incident hardening. In support tickets I handled, the usual culprit was an unpatched RDP service or a credential stolen from an email compromise.

Document the strain name, file extension, and ransom note text. You'll need those details when reporting to authorities and when writing your internal incident timeline.

Step 4: Assess encryption scope

Before restoring anything, map out exactly what got encrypted. Boot a live USB or attach the infected disk to a forensic workstation as a secondary drive. Scan the filesystem to identify encrypted files by extension, creation timestamp, or file magic numbers.

# Find recently modified files (adjust time window)
find /mnt/infected_disk -type f -mtime -2 -ls | head -n 50

Check if the ransomware hit only user data or also system binaries and configuration files. Some strains encrypt selectively to keep the OS bootable so victims see the ransom screen. Others trash the entire root partition.

Look for signs of data exfiltration. Many modern ransomware operations steal files before encrypting them, threatening to publish stolen data if you don't pay. Check outbound network logs for large transfers to unfamiliar IPs during the infection window. That evidence affects your disclosure and reporting obligations.

Assess whether databases got encrypted. MySQL and PostgreSQL data directories are common targets. If your backup strategy relied on a nightly database dump and the dump file got encrypted, you need to restore the database from the backup host, not the infected machine.

Step 5: Restore from immutable snapshots

Now you rebuild. Provision a clean system—either a fresh OS install on the same hardware or a new VM—and restore your verified backup to it. Do not attempt to decrypt the infected system in place or copy encrypted files to the new system.

# Example: restore a tarball to a clean system
tar -xzf /backups/server-backup-2026-08-05.tar.gz -C /

For application data, restore databases from SQL dumps or backup tools:

# Restore a MySQL database
mysql -u root -p database_name < /backups/database_backup.sql

If you're restoring a cPanel server, use the built-in restore interface or the command-line tools. Match the restored environment to the backup snapshot exactly—same PHP version, same Apache modules, same user accounts—to avoid configuration drift.

Test each restored service before moving to the next. Start the web server and verify sites load. Connect to the database and run a few queries. Check file permissions and ownership. Restoration is not complete until you confirm functionality.

Keep the infected system offline until forensic analysis finishes. You might need logs or artifacts from it later. Some organizations keep infected systems in isolated storage for months to support law enforcement investigations.

Step 6: Patch the entry vector

Restoring from backup puts you back at the starting line. If you don't close the door the ransomware walked through, you'll get reinfected. Review system logs, firewall logs, and application logs to identify the initial compromise.

Common entry points:

  • Exposed RDP or SSH with weak credentials
  • Unpatched web applications or CMS plugins
  • Phishing emails with malicious macros or links
  • Vulnerable VPN appliances or remote access tools
  • Credential stuffing attacks against control panels

Patch everything. Update the OS, update all installed packages, update web applications and plugins. Rotate every password, SSH key, and API token on the system. Revoke any service account credentials that might have leaked.

# Update all packages on a Debian-based system
sudo apt update && sudo apt upgrade -y

# Force password reset for a user
sudo passwd --expire username

If the attack came through an open port, close it. If the entry was a phishing click, mandate email filtering and user training. The specific remediation depends on your attack vector; the principle is the same—eliminate the vulnerability before bringing the system back online.

So how do you confirm the restored system is truly clean?

Run a full malware scan using updated signatures. Install or update ClamAV or a commercial antivirus suite, then scan the entire filesystem. Check for webshells, backdoors, and persistence mechanisms the ransomware might have planted before encrypting files.

# Scan with ClamAV
sudo freshclam  # Update signatures
sudo clamscan -r --bell -i /

Inspect cron jobs, systemd timers, and startup scripts. Ransomware sometimes schedules reinfection tasks or phone-home beacons. Review /etc/crontab, per-user crontabs under /var/spool/cron, and systemd unit files in /etc/systemd/system.

Check for unauthorized user accounts or SSH keys. The attacker might have created a backdoor account to regain access later.

# List all user accounts
cat /etc/passwd

# Check for unexpected SSH authorized_keys
find /home -name authorized_keys -exec cat {} \;

Review firewall rules and network configurations. Some ransomware adds rules to allow inbound connections on unusual ports. If the restored system is a web host, verify file ownership and permissions on all web roots—attackers often plant webshells disguised as legitimate PHP files.

Step 7: Test restored systems under load

Before declaring victory, put the restored system through realistic testing. If it's a web server, generate traffic against it. If it's a database host, run queries. If it's a mail server, send and receive test messages.

Monitor CPU, memory, disk I/O, and network traffic during testing. Compare metrics to baseline values from before the attack. Anomalies might indicate lingering malware or corruption you missed during restoration.

Test every customer-facing service. A hosting environment might serve dozens of websites or mailboxes; spot-checking the first few isn't enough. Automate testing where possible—write a script that hits each virtual host or queries each database and logs the result.

# Simple HTTP availability check for multiple domains
for domain in site1.com site2.com site3.com; do
  curl -I --max-time 5 https://$domain && echo "$domain OK" || echo "$domain FAIL"
done

If testing reveals issues—missing files, broken configurations, permission errors—address them before going fully live. The goal is to restore not just data but full functionality. Your users should not be able to tell the system was restored from backup.

Step 8: Document the incident timeline

Write down everything. Start with the discovery timestamp, then list every action taken: when you isolated systems, which backup you restored, what patches you applied, what accounts you reset. Include the ransomware strain, the estimated infection window, and the scope of encrypted data.

This documentation serves three audiences: your internal team (for post-mortem analysis), your compliance or legal team (for disclosure requirements), and law enforcement (for investigation). The more precise your timeline, the more useful it becomes.

Note any data loss. If you restored from a backup that was 48 hours old, you lost 48 hours of changes. Quantify that: how many customer uploads, how many database transactions, how many emails. Stakeholders need those numbers to assess business impact.

Capture screenshots of ransom notes, encrypted file samples, and any attacker communications. Save log excerpts showing the infection progression. Store this evidence securely—encrypt it and restrict access—because it contains sensitive details about your security posture.

Step 9: Report to authorities and affected parties

Ransomware is a crime. Report the incident to local law enforcement and, depending on your jurisdiction, to cybersecurity agencies. In many countries, organizations must also report breaches that compromise personal data to data protection regulators.

If the ransomware exfiltrated customer data, you likely have a legal obligation to notify affected individuals. Check your local data breach notification laws for timelines and content requirements. Even if no data was stolen, transparency with customers builds trust—tell them what happened, what you restored, and what you're doing to prevent recurrence.

Some hosting providers notify customers proactively after an incident even when no customer data was at risk. That communication reassures users and demonstrates accountability. Keep the message factual: what occurred, what you restored, what protective measures you added.

Collaborate with authorities if they request forensic data or log files. Law enforcement agencies run ransomware disruption operations and track payment flows; your incident report contributes to those efforts.

Frequently asked questions

Should I pay the ransom if I have no backups?
Paying is a business decision, not a technical one. Payment does not guarantee decryption, funds criminal enterprises, and often leads to repeat targeting. Consult legal counsel and weigh the cost of data loss against the risk of paying and still losing data.

Can I restore only some files instead of the whole system?
Yes, if you have file-level backups. Selective restoration works for user data but risks leaving malware in untouched system files. For servers, a full restore from a known-good snapshot is safer.

How often should I test backup restores?
Quarterly at minimum. Ransomware incidents are the worst time to discover your backups are corrupted or incomplete. Scheduled restore drills catch issues before they matter.

Do I need to tell customers if no data was stolen?
Legal requirements vary by jurisdiction. Even without a legal duty, proactive communication prevents rumors and demonstrates transparency. Brief, factual updates work better than silence.

What if the ransomware encrypted my backup server too?
This is why offsite, immutable, or air-gapped backups matter. If your backup infrastructure was compromised, recovery options narrow dramatically. Offsite cloud backups with object lock or tape backups stored offline survive most ransomware attacks.

Build the plan before the attack

Ransomware recovery succeeds or fails based on decisions you made months earlier. Backups must be automated, tested, and isolated from production. Patching must be routine. Monitoring must alert you to anomalies before encryption starts.

The nine-step playbook works only if you have clean backups to restore. If you don't, create that infrastructure now. Schedule weekly full backups, daily incrementals, and quarterly restore tests. Store at least one backup copy somewhere the production environment cannot modify—cloud object storage with versioning, offsite tape, or a dedicated backup appliance with immutable snapshots.

Harden entry points. Disable unnecessary remote access services, enforce multi-factor authentication, keep software patched, and train users to recognize phishing. Ransomware exploits the weakest link; address all of them.

Document your recovery process before you need it. Write down the exact commands to restore each service, the location of backup archives, the contact information for your backup vendor's support line. Panic makes people forget steps; a printed checklist keeps recovery on track.

Test the plan. Schedule an exercise where you simulate an infection, isolate a system, and restore from backup. Time how long each step takes. Identify gaps in your documentation or tooling. The first time you run this playbook should not be during an actual incident.