EN · $ USD
Security, Backups and Cloud Storage

How to Recover From a Ransomware Attack and Prevent the Next One

7 min read Updated: Sunucu Atlas technical team

In short

Ransomware is malware that encrypts your files and demands payment to unlock them. When you spot an attack, disconnect affected devices from the network immediately, protect your backups, change passwords from a clean device, document and report the incident, then rebuild the system and restore from a verified backup made before the attack. Lasting protection comes from isolated backups the attacker cannot reach.

In this guide
  1. How Does Ransomware Work?
  2. During the Attack: What to Do in the First Hour
  3. Scoping the Incident and Reporting It
  4. Cleanup and Restoring From a Clean Backup
  5. Why You Need Isolated (Unencryptable) Backups
  6. Prevention Checklist
  7. Next Step: Set Up a Backup the Attacker Can't Reach

Ransomware is malware that encrypts the files on a computer or server and demands a ransom in exchange for the decryption key. When you detect an attack, the first move is not to panic and reboot, but to disconnect affected devices from the network and protect your backups. This guide walks through incident response in the right order: isolation, scoping, reporting, restoring from a clean backup, and setting up isolated backups that can't be encrypted so it doesn't happen again.

How Does Ransomware Work?

Attackers usually get in through a phishing email, Remote Desktop exposed to the internet (RDP, default port 3389), unpatched software or a stolen password. Once inside, the attacker often doesn't encrypt right away; first they explore the network, escalate privileges, delete any backups they can reach and, as is common today, copy data out. This last tactic is known as double extortion: the threat of publishing the data is added if the ransom isn't paid.

Typical signs include:

  • File extensions changing en masse and files no longer opening
  • Ransom notes such as README.txt or HOW_TO_DECRYPT in folders
  • The desktop wallpaper replaced with a ransom message
  • Network shares and mapped drives breaking at the same time

During the Attack: What to Do in the First Hour

  1. Disconnect the device from the network, but don't shut it down. Unplug the network cable and turn off Wi-Fi. Shutting down can destroy evidence such as traces in memory and possible encryption keys; don't reboot without expert guidance.
  2. Stop the spread. Check other devices on the same network. Temporarily close access to shared folders and NAS shares, and disconnect VPN connections.
  3. Protect your backups. Unplug attached external drives and disconnect backup locations mapped as network drives. Don't log in to your backup system from the affected devices.
  4. Document everything. Photograph the ransom note, the changed extensions and the screens; note the time the attack was first noticed. You'll need this for both technical analysis and reporting.
  5. Change passwords from a clean device. Reset passwords for email, admin accounts, the hosting control panel, the domain panel and cloud accounts from an unaffected device; turn on two-factor authentication wherever possible.
Paying the ransom is not recommended. Payment does not guarantee the decryptor will work or that stolen data will be deleted, and it can make you a target again.

Scoping the Incident and Reporting It

Identify which ransomware it is

The ransom note and the encrypted file extension are the fastest way to identify the variant. The No More Ransom project, a joint initiative of Europol and security companies, offers free decryptors for some older or flawed variants. Even if there is no decryptor, knowing the variant helps you understand how the attacker got in.

How much data was affected?

List which devices, servers and shares were encrypted. Pinning down when the attack started is critical: the backup you restore must be from before that date. On Linux servers, you can see recently changed files and suspicious logins like this:

# Files changed in the last 2 days (first 50)
find /home /var/www -type f -mtime -2 2>/dev/null | head -50

# Most recent successful logins
last -a | head -20

# Failed SSH attempts (Ubuntu/Debian)
grep "Failed password" /var/log/auth.log | tail -20

On Windows, attackers often delete shadow copies. In an elevated Command Prompt, run vssadmin list shadows to check whether a shadow copy you can still roll back to exists.

Reporting obligations

If the affected systems contain personal data, this is a data breach. Under KVKK, Türkiye's Personal Data Protection Law, the data controller is expected to notify the Personal Data Protection Board without delay after learning of the breach, and per the Board's decision within 72 hours at the latest; affected individuals must also be informed. To file a criminal complaint, you can contact the Turkish National Police cybercrime units. Work with your legal advisor throughout the process.

Cleanup and Restoring From a Clean Backup

"Cleaning" an encrypted system and continuing to use it is risky; the attacker may have left a backdoor behind. The safe path is:

  1. Wipe the disk and reinstall the operating system from scratch. On servers, reinstall from a clean image.
  2. Close the entry point. Take RDP off the internet or put it behind a VPN, install updates and delete compromised accounts.
  3. Choose a backup from before the attack. Open the backup in an isolated environment first and verify the files are intact.
  4. Restore in stages. Bring back critical systems first (accounting, email, website), then the rest of the data.
  5. Keep monitoring. Closely watch login logs and unexpected processes in the first weeks.

If your website was also affected, see the cPanel backup and restore guide for the steps to restore from a cPanel backup; on WordPress sites, also replace plugin and theme files with current versions after restoring.

Why You Need Isolated (Unencryptable) Backups

The most painful outcome of a ransomware attack is finding your backups encrypted too. The reason is simple: if the backup is always reachable from the infected computer, it's just another folder to the attacker. That's why a NAS on the same network, a permanently plugged-in USB drive or a network folder mapped to a drive letter is not safe on its own.

An isolated backup is one that is logically or physically separated from production systems and cannot be deleted or modified with an account the attacker has taken over. In practice, it's built on these principles:

  • Different location: Keep the backup outside the office network, with a separate provider.
  • Separate credentials: The backup storage password shouldn't match your everyday accounts; keep 2FA on.
  • No permanently mapped drive: Instead of keeping backup storage mounted as a network drive, use a tool that connects over SFTP only while the backup runs.
  • Dated copies: Write each backup to a separate dated folder; that way, even if encrypted files arrive, older versions are untouched.
  • Regular restore tests: A backup that won't open is not a backup.

To send backups from a Linux server to dated folders over SFTP with rclone:

# Copies to a separate folder each day; older days are untouched
rclone copy /var/backups atlasdrive:yedekler/$(date +%F) --transfers 4

# Example crontab line: every night at 03:30
30 3 * * * /usr/bin/rclone copy /var/backups atlasdrive:yedekler/$(date +\%F) --log-file /var/log/rclone-yedek.log

Because the % character has a special meaning in crontab, it is escaped as \%. For remote setup and scheduling details, see automatically sending server backups to the cloud with rclone, and for the overall strategy, read about the 3-2-1 backup rule.

How often should you back up?

Backup frequency is set by how much data you can afford to lose. This is known as RPO (Recovery Point Objective): if you back up once a day, in the worst case you lose a day of work. For data that changes often, such as orders and accounting, daily or even multiple daily backups, and weekly backups for archive folders, are a reasonable starting point for most businesses. Plan retention too: attackers sometimes sit in a system undetected for weeks, so keeping only the last few days of backups may not be enough.

Prevention Checklist

MeasureWhat it prevents
Operating system and software updatesEntry through known vulnerabilities
Taking RDP and admin panels off the internetPassword guessing and direct access attacks
2FA on all admin accountsLogins with stolen passwords
Principle of least privilegeSpread from one account to the whole network
Email attachment and macro policyInfection via phishing
Isolated, dated, tested backupsData loss after an attack

Another effective measure is hosting your business website and email on professional infrastructure, separate from office computers. An infection on the office network doesn't directly affect the server your site runs on, and by monitoring access and error logs you can spot suspicious activity early.

Next Step: Set Up a Backup the Attacker Can't Reach

To survive the next attack with your backups, the backup has to live apart from your production network. Sunucu Atlas's AtlasDrive cloud storage plans in Istanbul give you a dedicated, isolated space, SFTP access, two-factor authentication and brute-force attack protection; you can send dated backups automatically with tools like rclone, WinSCP and FileZilla. For large archives, you can start with the AtlasDrive 1 TB plan.

If you want to keep your website independent of the office network, check out the business hosting plans with access and error logs. If you get stuck during setup, open a support ticket for help in Turkish.

Frequently asked questions

Should I shut down my computer if it's infected with ransomware?

First cut the network connection, and leave the device as it is instead of shutting it down. Shutting down can destroy evidence in memory; don't reboot without expert guidance.

Will paying the ransom get my files back?

There's no guarantee. The decryptor may not work properly, stolen data may still be published and organizations that pay can be targeted again; that's why paying is not recommended.

Can encrypted files be decrypted for free?

The No More Ransom project offers free decryptors for some older or flawed variants. For most current variants, the only reliable path is restoring from a clean backup.

Can backups in cloud storage get encrypted too?

Yes, if the cloud storage is permanently mapped as a network drive and the attacker can access the same account. Sending backups to dated folders, with separate credentials and 2FA, using a tool that connects only while the backup runs reduces this risk.

Do I have to report a ransomware attack under KVKK?

If the affected systems contain personal data, the incident counts as a data breach, and per the Board's decision it is expected to be reported to Türkiye's Personal Data Protection Board within 72 hours at the latest. Handle the process with your legal advisor.

For this guide

Recommended plans

AtlasDrive lets you keep backups in an isolated space in Istanbul, separate from your office network, with SFTP and 2FA, making it a practical way to build an isolated backup that ransomware can't reach.

Recommended

50 GB Storage

$13.76/mo

+VAT

  • LocationIstanbul
  • Web File Manager (Browser Access)
  • SFTP Access
  • WebDAV (Mount as a Network Drive)
  • SSL-Encrypted Connection

100 GB Storage

$27.53/mo

+VAT

  • LocationIstanbul
  • Web File Manager (Browser Access)
  • SFTP Access
  • WebDAV (Mount as a Network Drive)
  • SSL-Encrypted Connection

250 GB Storage

$68.82/mo

+VAT

  • LocationIstanbul
  • Web File Manager (Browser Access)
  • SFTP Access
  • WebDAV (Mount as a Network Drive)
  • SSL-Encrypted Connection

Cloud Storage — tüm paketler Business Hosting — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.