Security Experts:

Linux Crypto-Miner Uses Kernel-Mode Rootkits for Evasion

A recently discovered cryptocurrency mining malware targeting Linux machines is employing kernel-mode rootkits in an attempt to make detection more difficult, Trend Micro reveals.

Dubbed Skidmap, the malware can also set up a secret master password that provides it with access to any user account on the system. Many of the miner’s routines require root access, suggesting that its attack vector is the same that provided the attackers with root or administrative access to the system.

The threat installs itself via crontab, after which the installation script downloads the main binary. It decreases the system’s security settings either by configuring the SELinux module to permissive mode or by disabling the SELinux policy and setting selected processes to run in confined domains.

Skidmap also provides attackers with backdoor access to the infected machine. For that, it adds the public key of the binary’s handlers to the authorized_keys file, and replaces the module responsible for standard Unix authentication with its own malicious version.

The main binary checks whether the system runs on Debian or RHEL/CentOS, and drops the miner and other components based on that.

Other Skidmap components allow it to obfuscate its activities and ensure that they continue to run.

The first of these components is a fake “rm” binary that replaces the original. This file sets up a malicious cron job to download and execute a file, but the routine would only be performed randomly, Trend Micro’s security researchers have discovered.

The second malicious component is “kaudited,” a file designed to drop and install several loadable kernel modules (LKMs). The threat uses specific modules for different kernel versions, which ensures that the dropped kernel-mode rootkits won’t crash the system.

Additionally, the kaudited binary drops a watchdog component to monitor the cryptocurrency miner file and process.

A third module is “iproute,” destined to hook the system call getdents, which is normally used to read the contents of a directory, to hide specific files.

The final component is “netlink,” a rootkit that can alter the network traffic statistics (traffic involving certain IPs and ports) and CPU-related statistics (can hide the “pamdicks” process and CPU load).

Because of that, the malware can make the CPU load of the infected machine always appear low, which would allow it to avoid raising suspicion (high CPU usage could indicate cryptocurrency mining malware).

“Skidmap uses fairly advanced methods to ensure that it and its components remain undetected. For instance, its use of LKM rootkits — given their capability to overwrite or modify parts of the kernel — makes it harder to clean compared to other malware. In addition, Skidmap has multiple ways to access affected machines, which allow it to reinfect systems that have been restored or cleaned up,” Trend Micro concludes.

Related: WatchBog Crypto-Mining Botnet Relies on Pastebin for C&C

Related: macOS Crypto-Miner Emulates Linux

view counter