Researchers have uncovered a sophisticated method by which hackers are masking the presence of IronWorm malware on Linux systems using a rootkit known as GhostMap. This rootkit exploits the extended Berkeley Packet Filter (eBPF) to avoid detection by standard security tools, effectively hiding malicious activities from system administrators.
The Mechanics of GhostMap
GhostMap’s ability to camouflage processes, files, and network sockets is at the core of its utility for cybercriminals. It selectively disappears from routine system listings, allowing the malware to remain under the radar. An experiment demonstrated that while a malware listener vanished from the /proc/net/tcp directory, it was still detectable by the ‘ss’ command, which accesses socket information through an alternative interface.
The rootkit functions as a concealment layer rather than a standalone infection tool. The IronWorm malware itself is a Rust-based threat, typically delivered through compromised software packages. Previous investigations have shown IronWorm targeting developer credentials and API keys, emphasizing its focus on sensitive information.
Investigative Findings and Analysis
Aqua Security researchers Dolev Mizrahi and Ivan Kosarev have identified the GhostMap rootkit in both IronWorm and Atomic Arch payloads. Their findings, published on November 17, indicate that these malicious campaigns share the same rootkit technology, though it remains unclear if they are operated by the same group.
Further analysis of the executable bundled with [email protected] revealed that once executed with root privileges, it installs itself in the /var/lib directory and sets up a persistent systemd service, which then loads GhostMap. This underscores the importance for investigators to trace the entire installation process, as focusing solely on the initial installer might overlook the rootkit’s loading process.
Detection and Mitigation Strategies
Aqua Security has contributed significantly to understanding how GhostMap manipulates eBPF to evade detection. Their research highlighted that altering a single byte in directory listings can cause record omission without removing data from memory. This rootkit’s activity is particularly stealthy, as processes disappear from ‘ps’ outputs but remain accessible via known paths.
To counter this threat, Aqua has provided insights into detecting GhostMap’s presence. Their open-source tool, Tracee, can identify eBPF programs with application-memory write capabilities and log directory-reader calls. However, it is crucial to note that this tool aids in detection rather than prevention.
Investigators are advised to compare current process listings with execution records and review unexpected systemd services and eBPF attachments. They should preserve executable metadata before removing suspicious components, ensuring that they correctly identify compromised artifacts through matching hashes rather than relying solely on file paths.
The discovery of GhostMap underscores the ongoing evolution of malware techniques and the continuous need for robust security measures. As cyber threats become more sophisticated, staying ahead of potential vulnerabilities is critical for maintaining system integrity and protecting sensitive information.
