Linux

Rootkit Malware Exploiting 0-Day Vulnerabilities to Control Linux Systems Remotely

Fortinet researchers uncovered an advanced rootkit malware exploiting multiple zero-day vulnerabilities in enterprise appliances by executing a shell script (Install.sh).

The analysis sheds new light on how attackers establish persistence, hijack network traffic, and remotely control compromised Linux-based systems using kernel modules and user-space processes.

The investigation follows a previous report on a zero-day exploit that allowed attackers to gain unauthorized control of an enterprise system.

FortiGuard confirmed that a malicious rootkit, deployed as a kernel module (sysinitd.ko), and a user-space binary file (sysinitd), were introduced into the compromised system through a crafted shell script named Install.sh.

To ensure persistence, the attackers embedded rootkit startup entries in critical Linux configuration files (/etc/rc.local and /etc/rc.d/rc.local). These entries ensured the malware was loaded during system boot.

Investigate Real-World Malicious Links, Malware & Phishing Attacks With ANY.RUN – Try for Free

Attack Breakdown

The kernel module sysinitd.ko was designed to integrate deeply into the Linux system. Upon loading with the insmod command, the module initiated several tasks:

The workflow chart of this rootkit malware.
  • Decrypted strings for internal operations.
  • Registered a Netfilter hook to intercept network traffic.
  • Created special file entries (/proc/abrtinfo, /proc/brtinfo, /proc/rtinfo) to facilitate communication with the user-space malware.

Netfilter, a core framework in Linux, was leveraged at the NF_INET_PRE_ROUTING stage—intercepting packets before routing decisions. The Netfilter hook function filtered incoming TCP packets from attackers, distinguishing legit packets using a crafted “attack-init” packet.

The attack-init packet, meticulously designed with specific byte sequences and verification data, allowed the malware to authenticate communication with the attacker.

Supported by encryption capabilities, it enabled secure data exchange. Once verified, the kernel module recorded attacker-relevant data (source/destination IP and port) for ongoing traffic handling.

The kernel module used Linux APIs to invoke the user-space binary sysinitd. This binary, disguised as a “bash” process to evade detection, facilitated attacker commands. Communication occurred via the /proc entries created earlier:

  • /proc/abrtinfo served as the input to the user-space process.
  • /proc/brtinfo captured the output.
  • /proc/rtinfo managed control commands for task execution.

Capabilities of the Rootkit Malware

Attackers remotely executed Linux commands on the compromised system by sending them through the Netfilter hook function. A child process, spawned via the fork() system call and replaced by /bin/sh, executed these commands at root-level privileges.

The parent process of sysinitd acted as a daemon, monitoring and managing the child process. Specific control commands allowed attackers to:

  • Restart or terminate the child process.
  • Terminate both parent and child processes.
  • Send signals such as Ctrl+C.

Encryption Flexibility: The malware could toggle encryption for communication via a specific flag in the attack-init packet.

Deception Techniques: The sysinitd process renamed itself to “bash” to evade system administrators’ scrutiny.

Modular Code: The rootkit was built with capabilities to hijack TCP sessions, including HTTPS, SSH, FTP, and other protocols, using a three-way handshake.

FortiGuard demonstrated the malware’s functionality using a Python script to simulate attacker control. The attacker successfully executed Linux commands, including file downloads and directory browsing, and the results were captured in a network traffic analysis using Wireshark.

The sophisticated nature of the rootkit highlights the increasing complexity of cyberattacks that exploit critical system vulnerabilities. By combining kernel-level and user-space components, the attackers ensured stealth, persistence, and comprehensive system control.

FortiGuard’s Recommendations

  1. Patch Management: Regularly update firmware and software to address known vulnerabilities.
  2. Auditing and Monitoring: Employ tools to monitor unusual processes and network traffic.
  3. Procfs Security: Harden /proc directory permissions to prevent misuse by malicious actors.
  4. Incident Response Preparation: Prepare response teams for rapid detection and mitigation of such exploits.

FortiGuard’s meticulous analysis reveals how attackers meticulously orchestrated a zero-day exploit to achieve complete control over targeted systems, underscoring the urgent need for proactive cybersecurity defenses.

Find this News Interesting! Follow us on Google News, LinkedIn, and X to Get Instant Updates!

Raj Yasani

Rajashekar Yasani is a seasoned Cloud Security Engineer with extensive experience in cybersecurity research. As a security researcher, Rajashekar shares practical insights to help organizations enhance their security posture in an ever-evolving digital landscape.

Recent Posts

Hackers used Compromised ConnectWise Backup Credentials to Hack 173 Microsoft 365 Accounts

Hackers used a stolen ConnectWise Cloud Backup credential to sign in to 173 Microsoft 365…

1 hour ago

Google Fixes 10 Chrome Vulnerabilities, Including Memory Corruption Flaw Found With Claude AI

Google released a Chrome Stable security update fixing 10 vulnerabilities across Windows, Mac, and Linux,…

6 hours ago

Hackers Exploit Critical Collabora Online Flaw to Backdoor Nextcloud Servers

Hackers are exploiting a critical flaw in the Collabora Online Built-in CODE Server app for…

7 hours ago

OpenAI Confirms Its AI Model Hacked Government Website While Counting Hospital Beds

OpenAI has confirmed that an internal AI model hacked an unnamed government statistics website while…

8 hours ago

Hackers Use New ROMULUS ClickFix Platform to Deliver Malware and Evade Security Detection

Hackers are using a newly identified platform called ROMULUS to deliver malware through ClickFix traps,…

21 hours ago

New YuanKong Android RAT Hijacks Phones to Steal Banking PINs and Passwords

A newly analyzed Android remote-access Trojan called YuanKong can watch and control a victim’s phone,…

22 hours ago