A new malware campaign targeting vulnerable Linux servers has surfaced, deploying a stealthy malware dubbed perfctl with the primary goal of facilitating cryptocurrency mining and proxyjacking. According to a report from Aqua Security researchers Assaf Morag and Idan Revivo, perfctl employs sophisticated evasion techniques that make it particularly elusive and persistent. When a new user logs into the server, the malware halts all “noisy” activities, remaining dormant until the server is idle again. This approach not only helps the malware avoid detection but also allows it to continue running quietly in the background as a service after executing its payload.
The malware exploits a known vulnerability in Polkit (CVE-2021-4043, also known as PwnKit) to escalate privileges to root and drop a miner called perfcc. The name “perfctl” is likely a deliberate attempt to evade detection by blending in with legitimate system processes; the prefix “perf” refers to a Linux performance monitoring tool, while “ctl” is a common suffix in command-line tools, giving it an air of legitimacy. The initial attack chain typically involves breaching Linux servers through vulnerable Apache RocketMQ instances, where a payload masquerading as an “httpd” file is delivered.
Once activated, the malware copies itself to the “/tmp” directory, executes the new binary, and deletes the original process to cover its tracks. In addition to self-replication and employing seemingly innocuous names, perfctl is designed to deploy a rootkit for evading detection and execute mining operations. Some instances of the malware also retrieve and execute proxyjacking software from a remote server, further enhancing its capabilities for illicit activities.
To defend against the threats posed by perfctl, cybersecurity experts recommend that organizations keep their systems and all software up-to-date, restrict file execution, and disable unused services. Implementing Role-Based Access Control (RBAC) to limit access to critical files and enforcing network segmentation can also significantly reduce risk. Researchers advise monitoring for unusual spikes in CPU usage or system slowdowns, which may indicate crypto mining activities, especially during idle server times. By remaining vigilant and proactive, organizations can better protect their systems from this emerging threat.