Skip to main content

Hit by ransomware? Isolate affected systems now. Do not reboot or reformat.

SheMo Noransom舍末无勒

Victim Q&A · First response

What should we do when a server is hit by ransomware?

Short answer

Isolate first and do not reboot: cut the affected server off at the switch or in the cloud security group, but leave it running. Then snapshot or image the system and data disks, keep the ransom note and encrypted samples, and check read-only whether shadow copies, cloud snapshots and backups survived. If several servers are down, set a restore order by business dependency, and bring nothing back online until the entry point is closed and every credential has been changed. What can be recovered depends on the family, the encryption mode and the backups.

Key points

  • Isolate, do not power off: unplug or isolate the switch port for physical servers, lock down the security group for cloud servers. Reboots and reinstalls destroy evidence and recoverable data.
  • Before any rollback or restore, snapshot or image the system and data disks exactly as they are now.
  • Shadow copies are usually deleted. Cloud snapshots are normally out of reach from inside the server - unless the console account or an AccessKey has leaked.
  • An older snapshot may already contain the attacker's back doors. Inspect it on an isolated new instance; never roll back in place.
  • Treat one encrypted server as several: shared passwords, open remote-access paths and a common domain let lateral movement happen quietly.
  • Restore in dependency order: identity and remote access, core databases, applications, then file services.

In this order

What to do now

  1. Isolate from the network and keep it running

    Unplug physical servers or isolate their switch ports. For cloud servers, restrict both inbound and outbound security group rules to the fixed IPs of the people doing the response. Disconnect mapped drives, shares and backup servers as well. Keep the machine running: no reboot, no shutdown, no instance release and no system disk replacement.

  2. Snapshot or image the current state first

    On cloud servers, take a manual snapshot of the system disk and of every data disk - the starting point for forensics and for every recovery attempt that follows. For physical and virtual machines, take a read-only disk image or a storage-layer snapshot, and capture memory where possible. From here on, analysis and trial restores happen on copies and nothing more is written to the originals.

  3. Preserve the note, samples and logs

    Keep the original ransom note and two or three encrypted samples. Export the Windows Security log, remote desktop logon records, database error logs, and firewall and VPN logs. Pause backup, sync and automation jobs that could overwrite data, and do not empty the antivirus quarantine.

  4. Map how far it reached

    List every server and check each one for ransom notes, changed extensions, new accounts, unfamiliar scheduled tasks and remote-access tools. Prioritise three groups: hosts sharing an administrator password with the encrypted server, hosts reachable from it over remote desktop, and hosts in the same domain. Check backup servers and hypervisor hosts separately.

  5. Rotate cloud credentials and review the audit trail

    From a computer you know is clean, sign in to the cloud console. Change the root and sub-account passwords, enable multi-factor authentication, and rotate any AccessKey that was ever stored on the servers. Then review the audit trail for newly created sub-accounts, AccessKeys and permission policies, and for deleted snapshots or images and newly launched instances.

  6. Check recovery sources, read-only

    Look, without changing anything, at shadow copies (for example with vssadmin list shadows), the cloud snapshot list, backup servers and offline media, and note the point in time of each copy. Do not restore a shadow copy or an old snapshot over the original disk; copy data out instead, or create a new disk from the snapshot and inspect it on an isolated new instance.

  7. Identify the family and assess recoverability

    Run the ransom note and extension through online identification, then combine the encryption mode with whatever copies survived to judge how far recovery can go - the criteria are explained in can encrypted files be recovered. The initial assessment is free and requires no payment up front.

  8. Close the entry point, then restore in order

    Restore onto freshly built instances or reinstalled hosts rather than carrying on with the compromised systems. Once the entry point is closed, every credential changed and patches applied, attach the restored systems to an isolated segment first, and move them back into production only after confirming no back doors remain.

Avoid making it worse

Do not

  • Do not reboot or shut down, and do not reinstall the OS or reinitialise the system disk to get the business back faster - memory evidence, logs and recoverable remnants on disk disappear together.
  • Do not roll the original disk back to an old snapshot. Rollback is irreversible and wipes everything written after the snapshot, and a snapshot taken after the intrusion brings the attacker's back doors straight back.
  • Do not release the instance or replace its system disk: automatic snapshots set to be released with the disk are deleted along with it, and deleted snapshots cannot be recovered.
  • Do not expose a restored server to the internet again before the entry point is closed and passwords are changed - above all remote desktop and database ports.
  • Do not sign in to the cloud console or online banking, or change passwords for other systems, from the compromised server. Leftover remote-control tools and keyloggers will take the new credentials too.
  • Do not attach backup drives, a NAS or external disks to a server that has not been cleaned just to copy data off first. That is an easy way to get the backups encrypted as well.
  • Do not delete the ransom note or empty the antivirus quarantine, and do not contact the attackers or run decryptors of unknown origin.

How do attackers usually get into servers?

Internet-facing servers are usually entered through a handful of doors that are always left open:

  • Remote desktop exposed to the internet. Port 3389 forwarded directly, or a cloud security group open to any source, combined with a weak password or an administrator password shared across servers. Families such as Phobos, Makop and BeijingCrypt mainly get in this way, brute-forcing a logon and deploying the encryptor by hand.
  • SQL Server exposed to the internet. Port 1433 plus a weak sa password, followed by system commands through features such as xp_cmdshell. Mallox and its successor Weaxor are built around this route.
  • Unpatched internet-facing applications. Critical flaws in ERP, OA, finance software and middleware are scanned for and exploited in bulk; TellYouThePass is the best-known family on this route.
  • The cloud account itself. With a leaked AccessKey or console password, an attacker can manage instances and delete snapshots straight from the console - Alibaba Cloud's own guidance on AccessKey leaks lists extortion among the consequences.

Finding the entry point is not paperwork. If it stays open and passwords stay the same, being encrypted again by the same crew after the restore is far from rare; see why ransomware keeps coming back.

Why treat one encrypted server as several?

Ransomware operations rarely stop at one server. Once the first host falls, the spread is usually unsophisticated: the same local administrator password opens the next server, saved remote-desktop connections and credentials on the first machine point to others, or domain administrator rights let the attacker deploy everywhere at once.

So establish the scope first:

  • Which servers show ransom notes, changed extensions or new accounts? Were they encrypted at different times? Staggered timestamps usually mean the attacker is still moving through the network.
  • Which servers share an administrator password with the encrypted host, can reach it inside the same security group or VPC, or belong to the same domain?
  • Has anyone logged in to the hypervisor hosts, the backup server or the NAS?

If domain controllers show unfamiliar logons, mass-deployed scheduled tasks or pushed group policies, handle it as domain-wide encryption. If the encrypted data is virtual disks on ESXi or Hyper-V hosts, the work centres on the datastore; see virtualization platforms encrypted. Linux servers and BT Panel hosts on the same network need checking too - see Linux server ransomware.

Can shadow copies and cloud snapshots still be used?

Yes, but work out where each one stands before deciding how to use it.

Shadow copies (VSS) are usually gone, but check every server. Deleting shadow copies and disabling system recovery is routine for ransomware - MITRE ATT&CK files it under Inhibit System Recovery (T1490), with vssadmin, wmic and wbadmin among the commonly abused built-in tools. Deletion does not always succeed, so check every volume on every server. A read-only query such as vssadmin list shadows is enough. If a copy survived, copy the files you need to a different disk rather than restoring the whole volume in place.

Cloud snapshots live in the provider's control plane, normally out of reach of an encryptor running inside the server. That is a real advantage of cloud servers, with two conditions. First, the console account and AccessKeys must not have leaked - otherwise the attacker can simply delete snapshots, and deleted snapshots cannot be recovered. Second, you must not delete them yourself by accident: Alibaba Cloud's documentation states that automatic snapshots set to be released with the disk are deleted when the instance or disk is released.

An old snapshot is not automatically a clean one. Days or longer often pass between intrusion and encryption, so the snapshot from the day before encryption may already hold new accounts, remote-control tools and scheduled tasks. Rolling back in place has three further problems: rollback is irreversible and wipes data written after the snapshot, the evidence on the original disk is overwritten, and Tencent Cloud requires the instance to be shut down before rolling back an attached disk. The safer sequence:

  1. Snapshot the current state first (see the steps above).
  2. Create a new disk from the candidate snapshot and attach it as a data disk to a new instance in an isolated security group.
  3. Inspect accounts, scheduled tasks, services and remote-access tools on that disk, and check against the intrusion timeline whether the snapshot predates the intrusion.
  4. Once it is confirmed clean, extract only the business data and move it onto a newly built or reinstalled server.

If the backup server and backup files were deleted or encrypted too, work through the other data sources listed in backups destroyed.

Several servers are down - which one comes back first?

Restore order follows business dependencies, not whichever server happens to be fixed first. CISA's ransomware response guide makes the same point: prioritise restoration against a predefined list of critical assets, and restore onto a clean network. A typical order:

OrderServer typeWhy it sits here
1Identity and remote access: domain controllers, jump hosts, VPNEvery other logon and admin task depends on it, so it must be confirmed clean and re-credentialed first
2Core databasesERP, OA and hospital system data lives here, and repair usually takes longest
3Application serversApplications can only be verified once the databases are ready
4File servers and sharesCan be handed back department by department
5Test, archive and everything elseLast

A few working rules:

  • Recover the data, not the server. Compromised servers should be rebuilt rather than cleaned and kept; data is extracted from snapshots, backups or repair output and moved onto new instances.
  • Restored systems go to an isolated segment first. Move them back into production only after confirming no back doors remain, patches are applied and credentials are changed.
  • Databases are a separate workstream. Page-level repair and log replay for encrypted SQL Server, MySQL and Oracle data files are covered in database encrypted by ransomware; file servers and NAS are covered in servers and NAS encrypted.

The most common question is whether the business can be brought back first. It can run in parallel with the investigation, provided the original servers stay isolated and untouched and the restore happens on a different, clean host.

What needs doing in the cloud console?

The consoles of Alibaba Cloud ECS, Tencent Cloud CVM and Huawei Cloud ECS differ only in detail. A few tasks can only be done there, and they decide how much usable material is left for everything that follows:

  • Isolate with security groups, not by shutting down. Restrict inbound and outbound rules to the responders' fixed IPs, close every port that is not needed, and then check whether remote sessions established earlier are still alive. When you need to get into the OS, use the console's own management terminal - on Alibaba Cloud, for example, VNC connections are not restricted by security group settings.
  • Snapshot before anything else. CISA's guide recommends snapshotting cloud volumes to keep a point-in-time copy for forensic review, and Alibaba Cloud's anti-ransomware guide lists snapshotting the system and data disks of an affected instance as a response step.
  • Protect the instance from being released. Pay-as-you-go instances on Alibaba Cloud support release protection, which rejects manual release requests from the console, API or CLI. It covers manual release only and does not apply in cases such as overdue payment.
  • Change the keys and review the audit trail. From a clean computer, change the root and sub-account passwords, enable multi-factor authentication and rotate every AccessKey that was stored on the servers. Then review the audit trail: new sub-accounts, new AccessKeys and newly attached permission policies usually mean the attacker is planting a back door, and deleted snapshots or images and newly created instances need checking too.
  • Confirm whether anti-ransomware backups survived. If Alibaba Cloud Security Center's anti-ransomware backup, Huawei Cloud host security ransomware backup or Cloud Backup and Recovery (CBR) was enabled, check the available backup points in the console, and restore to a new instance rather than the original.

None of this replaces forensics and recovery inside the servers, but it keeps a way back open for every later step.

Emergency response

Data already encrypted? Stop and let an engineer look first

We do not pay ransoms and we do not negotiate with attackers. Engineers run a free assessment first, then propose a recovery plan and a firm quote.

Related questions

Related ransomware families

Related solutions

FAQ

Follow-up questions

  • Can the cloud provider decrypt a ransomware-hit cloud server?

    Do not count on it. The help documentation from providers such as Alibaba Cloud and Huawei Cloud covers prevention and recovery tools - snapshots, backups, anti-ransomware protection - and makes no promise of decryption. Whether encrypted data inside the instance's operating system can be decrypted still depends on the family and version. Where the platform genuinely helps is in two places: whether snapshots and anti-ransomware backups survived, and whether the audit trail shows what the attacker did in the console. Decryption and data repair need their own assessment, and the initial read is free.

  • Only one server was encrypted - do the others need checking?

    Yes, and before you restore anything. An encrypted server means the attacker held administrative control of at least that machine, and a shared administrator password, saved remote connections and credentials, or a common domain may mean other servers were already accessed and simply not encrypted yet. Look for new accounts, unfamiliar scheduled tasks and services, remote-access tools, remote logons outside maintenance hours, and deleted shadow copies. Until the scope is settled, keep server-to-server connectivity cut and keep the backup server off the network.

  • We rolled back to a snapshot and were encrypted again days later - why?

    Usually three causes stacked together. The snapshot postdated the intrusion, so the attacker's accounts, scheduled tasks and remote-access tools came back with it. The entry point was never closed, so remote desktop or database ports were still open to the internet with the same passwords. Or the cloud account or an AccessKey had leaked and the attacker could still come in through the console. The right approach is to create a new disk from the snapshot, inspect it on an isolated new instance, confirm it predates the intrusion, extract only the data onto a rebuilt server, and close the entry point and change every credential at the same time.

  • The SQL Server database on the server was encrypted too - can it be repaired?

    Often far enough to get the business data out, but it needs assessing first. Large data files are frequently encrypted only at the header or intermittently, so untouched pages can still be extracted, and if full backups and transaction logs survived, replay can reach close to the time of the incident. With full-file encryption and wiped backups there is little room. Never keep restarting the database service or running repairs against the original data directory; image the data volume and make the judgement on the copy. The database page linked above covers the repair paths in full.

  • Should we report it, and what should we prepare before an assessment?

    We recommend reporting it; channels and the document checklist are in reporting ransomware to the police. Before an assessment, please have the ransom note text, two or three encrypted samples without sensitive data, a list of affected servers (OS version, what each one runs, whether it is a cloud server and with which provider), the time of discovery, and the state of snapshots, shadow copies and backups. The first conversation and an initial read on the family are free; if a full assessment requires access to the environment, whether it is chargeable is stated before any work starts.