Victim Q&A · Systems & software
What should we do when a Linux server or BT Panel is hit by ransomware?
Short answer
First work out which kind of incident you have: website and database files that have genuinely been encrypted (new extensions, ransom notes in the directories), or databases that were dropped and replaced with a ransom table. The second involves no encryption, nobody can prove beforehand that the attacker kept a copy, and paying is not a recovery path. In both cases cut public access but keep the host running, do not reinstall or keep restarting the database, snapshot or image the data partition, then look for the data in backups, binlogs and disk remnants - and remove every back door before going live again.
Key points
- File encryption and database wipe-and-ransom are different incidents: the first turns on the family and backups, the second on backups, binlogs and disk remnants.
- With a wiped database there is no way to verify before paying that the attacker kept the data - in documented cases some crews deleted without downloading anything.
- Entry is usually on the exposed side: web application flaws, hosting control panels, database and Redis ports, weak SSH passwords.
- BT Panel has had an unauthorised database-management access flaw and an episode of widely reported Nginx tampering; the panel should not face the internet directly.
- Before going live, check authorized_keys, crontabs, systemd services and web shells one by one - changing passwords does nothing against them.
In this order
What to do now
Cut public access, keep the host running
Block public inbound traffic in the cloud security group or host firewall, allowing only the responders' fixed IPs. Keep the host running: no reboot, no OS reinstall, and no reinstalling MySQL or PHP into the original directories. If SSH no longer works, get in through the cloud console's VNC terminal or out-of-band management.
Stop everything that writes over the data
Pause scheduled tasks in the panel and the system, above all backup jobs that keep a fixed number of copies - they will push the last good backup out with an empty or encrypted one. Do not upload, extract or export large files onto the data partition, and do not keep restarting mysqld: the disk blocks of deleted data files can be overwritten by any new write.
Snapshot or image the data partition
On cloud servers snapshot the system and data disks; on physical machines take a read-only disk image. Data extraction, binlog replay and disk-level recovery all happen on the copies from now on, and nothing more is written to the originals.
Preserve logs and intrusion traces
Save Nginx or Apache access logs (usually under /www/wwwlogs on BT Panel hosts), /var/log/secure or auth.log, every user's crontab and bash history, systemd units, authorized_keys files, the MySQL error log and binlogs, and the panel's operation log. Keep ransom notes as they are, export any ransom table unchanged, and copy the existing binlog files somewhere else as soon as possible.
Establish the incident type and family
Changed extensions and ransom notes in the directories mean an encryption incident - confirm the family with online identification. Intact files but missing databases or tables, plus a new ransom table or ransom database, mean wipe-and-ransom, and the work shifts to backups and binlogs. Both can happen together.
Inventory every recovery source
Go through the panel's local backup directory, backups on other hosts or in object storage, cloud disk snapshots, replicas, binlog files and older exports in development or test environments, noting the point in time of each. Local backups on the same machine as the database are often deleted or encrypted along with it, so do not assume they survived.
Restore on a new host, clear back doors, then go live
A compromised host should be rebuilt. Patch the new host fully, keep the panel, database and cache ports off the internet, change every password and key, and only then load the recovered data. Old website code needs a web shell sweep and an integrity comparison before it is deployed again.
Avoid making it worse
Do not
- Do not reinstall the OS, reinstall MySQL into the original data directory, or let the panel's repair or reinstall functions overwrite the environment - remnants of deleted data files and the intrusion evidence are overwritten together.
- Do not keep starting mysqld against the original data directory or step through innodb_force_recovery levels; every attempt belongs on the image.
- Do not pay the address in a ransom table or note. With a wiped database there is no way to verify beforehand that the attacker kept the data, and documented cases include crews that deleted without downloading and crews overwriting each other's notes.
- Do not keep writing large files to the data partition, and do not let rotating automatic backups keep running.
- Do not go live again after only changing SSH and panel passwords - keys in authorized_keys, crontabs, systemd services and web shells are unaffected by a password change.
- Do not restore a website backup straight over the original directory: the backup may already contain web shells, and overwriting flushes away the entry-point evidence.
- Do not download and run a ".locked decryptor" from the internet: .locked is shared by several families, and a mismatched tool only causes further damage.
Encrypted files versus a wiped database: what is the difference?
"Ransomware" on a Linux web server comes in two forms that call for entirely different responses, so tell them apart first.
| Files encrypted | Database wiped and ransomed | |
|---|---|---|
| What you see | Website files, .ibd data files and backup archives renamed with a new extension, ransom notes in the directories | Files intact, but databases or tables gone and a ransom table or ransom database added |
| Where the data is | Still on the host, encrypted | Deleted from the host; the attacker may or may not have taken a copy |
| What payment buys | A key that may or may not work | Data that cannot be shown to exist before you pay |
| Main recovery paths | Family identification, backups and snapshots, structure-level file repair | Backups, binlog replay, disk-level recovery of deleted data files |
Wipe-and-ransom needs no malware at all - a database logon is enough. The PLEASE_READ_ME operation disclosed by Guardicore (now part of Akamai) started in January 2020: it brute-forced internet-facing MySQL, archived and exfiltrated the data, deleted it from the server and left a ransom table named WARNING. Its dashboard listed 250,000 databases from 83,000 servers and used a leak site for pressure. The MongoDB wiping wave of early 2017 showed the other side: BleepingComputer reported rival gangs overwriting each other's ransom notes, some groups deleting data without downloading it at all, and victims who paid getting no reply.
So the question with a wiped database is not only whether to pay, but that nobody can confirm beforehand whether the attacker holds the data, or which crew holds it. Even if they did keep it, the exposure has already happened and paying does not undo the compliance consequences. Our position matches should you pay the ransom: no payment, no negotiation - spend the time finding the data. The two techniques can also appear together: in its published incidents, JadePuffer encrypted configuration fields in place and also dropped application databases, leaving a README_RANSOM table.
Where can data come from after a MySQL database is dropped?
Work down this list, most reliable first.
1. Backups and snapshots. mysqldump exports from the panel or scripts, physical backups, cloud disk snapshots, replicas. Check where each backup lives: backups on the same machine and the same disk as the database are often deleted with it, so copies on another host, in object storage or on offline media matter most.
2. Binlog replay. MySQL's documentation describes the binary log as the data source for point-in-time recovery: restore a full backup, then use mysqlbinlog to re-execute the changes made after it, stopping just before the DROP statements. Binary logging is on by default in MySQL 8.0; older versions and manually initialised instances need checking one by one. Know the limits, too. A binlog records changes, so without a full backup as a starting point it can rebuild a table on its own only if the retained binlogs cover the table's entire history since creation. An attacker with high privileges may also purge binlogs, so copy the existing files out as soon as possible.
3. Recovering deleted data files at disk level. This depends on tablespace layout. MySQL's documentation states that InnoDB creates a separate tablespace file (.ibd) per table by default, and that dropping such a table returns the disk space to the operating system. In other words the .ibd was deleted at filesystem level, but its blocks may remain on disk until something overwrites them, so the file can be recovered from the image or rows can be extracted by scanning for InnoDB page structures. A table in a shared tablespace leaves its space marked reusable inside InnoDB, and pages not yet reused can be scanned in the same way. Either way, stop all writes to the partition immediately and work only on the image. How much comes back depends on how much was written after the wipe, and we do not promise a ratio in advance.
4. Rebuilding from the business side. Payment platform statements, third-party marketplace orders, caches, logs and notification records can fill in orders, members and other critical data.
If ibdata1 or .ibd files were genuinely encrypted and renamed, page-level repair and encryption-coverage analysis are covered in MySQL encrypted by ransomware. When MongoDB, Elasticsearch or Redis is wiped the logic is the same: secure the persistence files on disk, snapshots and replica nodes first, analyse copies, and do not rush to restart the service or rebuild the instance.
How do attackers usually get into Linux web servers?
Entry to Linux web servers is almost always on the internet-facing side. Check these categories one at a time:
- Web application and component flaws. Critical vulnerabilities in frameworks, middleware, CMS plugins and business applications are scanned for and exploited in bulk; the attacker writes a web shell, then encrypts the web root and the database directory. TellYouThePass is the best-known family on this route: in December 2021 it was deployed through Log4j, and its Linux build harvests SSH keys to move across the internal network.
- Hosting control panels. In August 2020 BT Panel disclosed an unauthorised database-management access flaw affecting Linux 7.4.2, test build 7.5.14 and Windows 6.8, where requesting a specific URL opened the database management page directly; the fixes were 7.4.3, 7.5.15 and 6.9.0. In December 2022 a number of BT Panel users reported the Nginx binary being replaced, malicious JavaScript injected into pages and logs wiped. BT's official notice said no vulnerability had been found in the panel or Nginx so far and advised upgrading the panel, changing the security entrance and passwords, enabling two-factor authentication and tamper protection; no public conclusion on the entry point has emerged since. In February 2026 Datadog Security Labs documented attackers who, after exploiting React2Shell, used a script written specifically for BT Panel to rewrite the Nginx configurations it manages and hijack traffic. cPanel/WHM is a target as well - the Sorry ransomware spread in bulk through its authentication bypass.
- Database and cache ports. 3306, 27017, 6379 and 9200 exposed to the internet with weak passwords or no authentication are the entry for wipe-and-ransom. Redis's own documentation advises against exposing it directly to the internet and notes that clients can use the CONFIG command to write files to arbitrary paths, which can lead to compromise of the whole host.
- Weak and reused SSH passwords. Once one host falls, the attacker uses the same password or harvested keys to log in to other Linux hosts on the network.
The evidence for the entry point sits mainly in web access logs, panel logs and SSH authentication logs - which is exactly why reinstalling first is a mistake.
Which back doors must be removed before going live?
Most back doors on a Linux host survive a password change, which is exactly why so many servers are encrypted or wiped again after recovery. A compromised host should be rebuilt; where it genuinely has to be examined in place, check at least the following:
- Accounts and keys: new accounts or accounts with UID 0 in /etc/passwd, unfamiliar public keys in every user's authorized_keys including root's, and changes to sudoers.
- Scheduled jobs: every user's crontab, /etc/crontab, /etc/cron.d and the cron.hourly-style directories, plus unfamiliar entries in the panel's scheduled tasks.
- Services and start-up hooks: new or modified systemd services and timers, /etc/rc.local, and start-up commands in /etc/profile.d and users' shell profiles.
- Web directories: new php or jsp files in upload directories and the web root, files with odd timestamps, and anything that differs from the code repository.
- Binary integrity: whether long-running programs such as Nginx and sshd have been replaced - in the December 2022 BT Panel episode it was precisely the Nginx binary - plus executables under /tmp and /dev/shm and unexplained processes.
- The panel itself: whether panel accounts, the security entrance or the allowed IP list were changed, and whether the panel is on the latest version.
After the sweep, change every password and key: system accounts, SSH keys, panel accounts, database accounts, and the database connection strings and cloud AccessKeys in application configuration. For the wider root-cause picture see why ransomware keeps coming back.
Does the same apply to ESXi, NAS devices and Windows servers?
Not entirely. These cases have their own pages:
- VMware ESXi hosts encrypted. These encryptors are often described as Linux builds, but they target virtual disks on the datastore; the shutdown, snapshot deletion and vmdk encryption behaviour and the recovery paths differ from a web server's. See virtualization platforms encrypted.
- Synology, QNAP and other NAS devices encrypted. NAS operating systems are Linux-based too, but the work centres on storage volumes and snapshots. See servers and NAS encrypted.
- Windows and cloud servers on the same network. Remote desktop and SQL Server entry points and shadow copies are covered in what to do when a server is hit by ransomware.
Mixed environments are common: after a web server falls, the attacker may go on to the database server, the backup server or even the hypervisor management interface on the same segment. Scope the investigation by actual network reachability and credential reuse, not by operating system.
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
- First response
What should we do when a server is hit by ransomware?
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.
- First response
What should I do if I've been hit by ransomware?
Isolate first and keep the power on: unplug the network cable or turn off Wi-Fi, but do not reboot, format, delete the ransom note or contact the attackers. Then work in order: confirm it is ransomware and whether it is still spreading, preserve the note, encrypted samples and logs, identify the family, inventory backups and snapshots to assess recovery paths, and report the incident. Do not reconnect restored systems until the entry point is closed, credentials are rotated and backdoors are removed.
- Aftermath
Why do we keep getting hit by ransomware, and how do we stop it for good?
Repeat infections are rarely bad luck; the previous incident was almost always left unfinished. The real entry point was never found or never closed, accounts, scheduled tasks, remote-access tools or web shells left by the attacker are still there, credentials were only partly changed, or systems were restored from backups that already contained the backdoor. Environments that paid, or whose access was resold, also get revisited. The fix follows an order: forensics to find the real entry point, a rebuild-or-clean decision, closing the entry and removing persistence, a full credential reset, then verified hardening and ongoing monitoring.
- Aftermath
A ransomware gang is threatening to publish our data - what should we do?
Do not respond or pay yet. First establish with evidence whether data actually left and what it was: check outbound traffic, archive staging, transfer tools such as Rclone, MEGA or WinSCP, and cloud sign-in and export logs, and compare any samples the attackers released against your own data - some threats are bluffs or recycled old leaks. Paying does not buy deletion: the UK's National Crime Agency found data belonging to victims who had paid still on LockBit's systems. Close the exfiltration path, rotate credentials, and assess notification duties under the PIPL and related rules.
Related ransomware families
- No public decryptor
TellYouThePass
TellYouThePass is the archetypal vulnerability-driven ransomware family in China, mass-deployed against internet-facing ERP, OA, finance and middleware systems. It appends .locked and hits both Windows and Linux servers. No public decryptor exists.
- No public decryptor
Sorry
Sorry is a Go-based Linux ransomware that broke out in 2026, mass-deployed through the cPanel/WHM authentication bypass CVE-2026-41940. It appends .sorry, drops a README.md note in every directory and negotiates only over Tox. Attribution is contested: AsiaInfo and some Chinese responders treat it as a new TellYouThePass variant, while China's CVERC and Western researchers treat it as a new family that appeared in 2026.
- No public decryptor
JadePuffer
JadePuffer is the operation Sysdig disclosed in July 2026 and described as the first fully documented case of agentic ransomware. An LLM-driven agent moved from a Langflow flaw into an Alibaba Nacos configuration centre, then deployed the Go payload ENCFORGE (.locked) against AI model weights and training data.
Related solutions
MySQL / MariaDB Database Encrypted by Ransomware
When MySQL's ibdata1, .ibd and .frm files are encrypted, websites, online stores, OA and other web workloads all go down. Most cases start at a web application flaw or an exposed management panel. This page covers what InnoDB's file layout means for recovery, the value of binlogs, and the correct sequence.
Database Encrypted by Ransomware
When database files are encrypted, every business system that depends on them stops at once. This page explains how we triage an encrypted database, how recoverability is assessed, and when file repair, backup-plus-log restore, or rebuild is the right path.
ESXi / Hyper-V Virtualization Encrypted by Ransomware
Hypervisor-level encryption causes the widest blast radius of any ransomware event: dozens of production VMs go dark within an hour or two. This page covers what Linux ESXi encryptors actually do — shut down guests, encrypt vmdk, delete snapshots — the recovery value of flat disk files, and how Hyper-V and Proxmox cases differ.
File Servers and NAS Encrypted by Ransomware
When shared folders on a file server or NAS are encrypted, drawings, contracts, archives, quotations and design sources all become unusable at once — and mapped drives spread the impact to every endpoint. This page covers how to gauge spread, what shadow copies and snapshots realistically offer, and how to sequence recovery by business value.
Backups Deleted or Destroyed
Modern ransomware follows a fixed sequence: destroy the backups, then encrypt the data — deleting shadow copies, encrypting repositories, disabling jobs, and exploiting backup software flaws to steal credentials. This page covers what can still be inventoried once backups fail, why replication propagates encrypted files off-site, and what offline and immutable copies are really worth.
Related services
Data Recovery
Recovery beyond decryption: backup repair, database repair and remnant extraction.
Incident Response
Round-the-clock intake: contain first, preserve evidence second, recover third.
Attack Forensics & Attribution
Establish the intrusion path, timeline and impact — in a report usable for police reporting and compliance.
Security Hardening
Close the handful of paths attackers actually use: exposure, weak credentials, patches, privilege, backups.
FAQ
Follow-up questions
Can we keep using BT Panel?
What matters is less the panel than how it is exposed. Do not open it directly to the internet: restrict it to allowed IPs, change the security entrance, enable two-factor authentication and keep it updated - BT's own December 2022 notice likewise advised upgrading the panel and enabling two-factor authentication and tamper protection. Keep phpMyAdmin, database and Redis ports off the internet too. If this host has already been compromised, do not harden it and carry on; redeploy the panel and environment on a new host, then load data and code that have been checked.
Our database was wiped and the ransom table asks for Bitcoin - will paying bring the data back?
We advise against it. With a wiped database there is no way to confirm before paying that the attacker kept the data: in the 2017 MongoDB wave, gangs overwrote each other's notes, some deleted without downloading anything, and victims who paid got no reply. Even where the data really was exfiltrated, as with PLEASE_READ_ME, paying only buys back from criminals data that has already leaked, and the compliance obligations that follow do not go away. The more effective move is to stop writes immediately, image the data partition and look for the data through backups, binlogs and disk-level recovery, in that order. We do not pay ransoms and do not negotiate on anyone's behalf.
No backups and no binlog - is there any hope?
There is a chance, but it depends on what has been written to the disk since, and sooner is better. InnoDB keeps one .ibd file per table by default, so a dropped database means files deleted at filesystem level whose blocks may remain until overwritten; pages of tables dropped from a shared tablespace may not have been reused yet either. How much comes back depends on how much was written to that disk after the wipe, the filesystem, whether TRIM is enabled, and whether the database has already been reinstalled or rebuilt. The priority now is to stop writing to the partition, take a read-only image and assess on the image. We will tell you plainly what we find and will not promise a ratio.
The attacker says they downloaded our data - will it be published?
It is possible, so treat the data as potentially exposed. The PLEASE_READ_ME operation listed stolen databases for sale on its own site to apply pressure. Whether data actually left is judged from bulk queries and exports in web and database logs, the volume and direction of outbound traffic, and archive files or transfer tools on the host. Assessment methods, leak-site checks and notification duties are covered in ransomware gangs threatening to publish data.
SSH suddenly stopped working and every database process is down - is this ransomware?
It may be. Some Linux ransomware stops the SSH service and kills database processes right before encrypting - Sorry is a typical example. Do not rush to reboot. Get in through the cloud console's VNC terminal or out-of-band management, check the web and data directories for new extensions and ransom notes and /tmp for unfamiliar executables, tighten inbound rules in the security group, and then preserve the scene following the steps on this page.
Sources
- PLEASE_READ_ME: Opportunistic ransomware devastating MySQL servers(Guardicore Labs,WARNING 勒索表、8.3 万台服务器 25 万个数据库)— Akamai
- MongoDB Apocalypse: Professional Ransomware Group Gets Involved, Infections Reach 28K Servers(2017-01-09,团伙互相覆盖勒索信、只删除不下载)— BleepingComputer
- Point-in-Time Recovery Using Binary Log(MySQL 8.0 默认开启 binlog)— MySQL 8.0 Reference Manual
- File-Per-Table Tablespaces(默认独立表空间、删除后空间归还操作系统)— MySQL 8.0 Reference Manual
- 安全通告|宝塔面板数据库管理未授权访问漏洞风险通告(2020-08)— 安全脉搏
- 【官方公告】关于外传宝塔面板或 Nginx 异常的公告(2022-12)— 宝塔面板论坛
- Web Traffic Hijacking: When Your Nginx Configuration Turns Malicious(2026-02,针对宝塔 Nginx 配置的 bt.sh 脚本)— Datadog Security Labs
- TellYouThePass ransomware revived in Linux, Windows Log4j attacks(2021-12-17,Linux 版本收集 SSH 密钥横向移动)— BleepingComputer
- Redis security(不应直接暴露公网、CONFIG 命令可把文件写到任意路径)— Redis 官方文档
- JADEPUFFER: Agentic ransomware for automated database extortion(加密配置、删除业务库、README_RANSOM 表)— Sysdig
External links are provided for reference only. The content is published by third parties and does not represent our position.
Updated