A sophisticated new Linux ransomware, dubbed Pay2Key, is actively targeting organizational servers, virtualization hosts, and cloud workloads, posing a significant threat to businesses that have long relied on the operating system’s perceived security. First detected in late August 2025, this variant, attributed to Iranian threat actors, is engineered for scalability and speed, aiming to disrupt critical infrastructure rather than individual user machines.
The Pay2Key ransomware group, known for intermittent periods of activity, has now demonstrably shifted its focus. While initially associated with Windows-based attacks, this new Linux-specific build represents a deliberate strategic pivot. Unlike traditional ransomware that often targets endpoints, Pay2Key’s Linux version directly infiltrates and compromises the foundational infrastructure that powers modern enterprises, including vital server environments and cloud-based operations.
Researchers at Morphisec identified the malware, noting that its Linux variant, Pay2Key.I2, is configuration-driven and critically requires root-level privileges to execute. This design implies that attackers are not seeking to escalate privileges after gaining initial access. Instead, they aim to deploy the ransomware only when they already possess the highest level of system control, ensuring maximum impact and broad access to sensitive data and operational systems. The implications for organizations relying on Linux-based infrastructure are substantial, with servers hosting databases, applications, and virtual machines becoming immediate targets.
The Expanding Threat of Linux Ransomware: Pay2Key’s Impact
The emergence of Pay2Key’s Linux variant underscores a growing trend in cybersecurity: the increasing sophistication and prevalence of ransomware targeting Linux environments. While Linux has historically been lauded for its robust security features, it is not immune to advanced threats. Pay2Key’s ability to precisely classify and encrypt various types of mounted file systems means it can inflict extensive damage while potentially keeping affected systems responsive enough to display ransom demands, creating a dire situation for affected organizations.
Furthermore, public security research on Linux ransomware remains relatively scarce, leaving many organizations unprepared to defend against this evolving threat landscape. Pay2Key’s Linux build exemplifies how threat actors are actively exploiting this gap, developing potent tools that organizations may not yet have the resources or strategies to counter effectively. This development necessitates a proactive approach to security, moving beyond traditional endpoint defenses to encompass a comprehensive strategy for server and cloud infrastructure protection.
Encryption Mechanism and Defense Evasion by Pay2Key
Before initiating its encryption routine, Pay2Key meticulously prepares the compromised system to minimize resistance. The ransomware actively halts running services, terminates active processes, and disables two prominent Linux security frameworks: SELinux and AppArmor. This aggressive disabling of defenses aims to strip the host of its active security measures, creating an unimpeded environment for the encryption process. This systematic dismantling of security protocols ensures the ransomware can operate with minimal interference.
To guarantee its persistence across system reboots, Pay2Key installs a cron entry that automatically triggers its execution upon restart. This self-preservation mechanism ensures that even in the event of a system administrator detecting an anomaly and restarting the server, the ransomware will resume its malicious activities immediately. This persistence is a common tactic used by ransomware to complicate recovery efforts and increase pressure on victims to pay the ransom.
For its file targeting, Pay2Key enumerates the system’s mounted file systems by parsing the /proc/mounts file. It meticulously filters out pseudo-filesystems and categorizes remaining mounts as read-only, removable, or other types. The ransomware avoids encrypting read-only mounts, focusing its efforts on accessible storage. During the per-file encryption process, Pay2Key also deliberately skips ELF and MZ binaries, as well as zero-length files. This selective targeting is designed to mitigate the risk of crashing the host system mid-operation, which could compromise the ransomware’s ability to achieve its ultimate goal.
The encryption itself employs the ChaCha20 algorithm, operating in either full-file or partial mode, dictated by the ransomware’s configuration file. A hardcoded string, “DontDecompileMePlease,” is embedded within the binary and plays a crucial role in deriving metadata keys and validating the integrity of the metadata layout. Each encrypted file is associated with a unique per-file key, which is then stored in an obfuscated metadata block. This makes recovery without the master decryption key practically impossible, reinforcing the ransomware’s intent to extort payment.
Security teams managing Linux-based infrastructure should prioritize enforcing stringent controls on root-level access and conducting regular audits to identify accounts with elevated privileges. Disabling the capability for non-administrative users to create cron jobs can significantly reduce the risk of persistence mechanisms being deployed. Organizations must also actively monitor for any unexpected deactivation of SELinux or AppArmor, as this often serves as a strong indicator of active ransomware execution. Maintaining offline, immutable backups of critical data remains the most effective defense, enabling recovery without succumbing to ransom demands.
The continuing evolution of ransomware like Pay2Key necessitates ongoing vigilance and adaptation of cybersecurity strategies. As threat actors refine their techniques and broaden their targets, organizations must remain informed and invest in robust, multi-layered defenses to protect their critical IT infrastructure.

