Aqua Blog

Uncovering GhostMap: The Rootkit Behind Shai-Hulud’s Rusty Cousin

Uncovering GhostMap: The Rootkit Behind Shai-Hulud’s Rusty Cousin

TL;DR: GhostMap is Aqua Nautilus’s research name for the Linux eBPF rootkit shared across examined IronWorm and Atomic Arch malware payloads. It blinds user-space applications by manipulating kernel data on the fly to hide malicious processes, files, and network sockets. In controlled experiments, Aqua Nautilus traced these evasion mechanics and proved their limits: while overwriting a single byte in application memory forces directory readers to skip hidden files, GhostMap’s socket concealment fails completely against standard inspection tools, hiding a listener from /proc/net/tcp while leaving it exposed to ss. Crucially, this user space deception did not hide GhostMap from Tracee, Aquasec’s open source runtime security and forensics tool. Tracee detected and alerted on its eBPF attachments and memory writing capabilities as the programs were attached.

What is GhostMap and how does it fit into IronWorm?

IronWorm, described by JFrog as Shai-Hulud’s “rustier cousin,” is a Rust malware implant delivered through compromised software packages. This investigation focuses on its Linux eBPF rootkit, which we call GhostMap. The component conceals selected processes, file entries and sockets, and interferes with debugging. GhostMap names the rootkit component; IronWorm names the wider malware implant that installs and uses it.

JFrog documented IronWorm’s campaign, credential theft and eBPF concealment. Our detailed case study uses tools/setup from [email protected]. We also compared the rootkit with a payload associated with Atomic Arch, a separate delivery campaign targeting the Arch User Repository (AUR).

We measured how GhostMap changes the information Linux tools receive, where concealment succeeds or fails and what Tracee detects. The Atomic Arch comparison adds evidence that the rootkit is reused across delivery channels.

Why does GhostMap matter to Linux defenders?

A process listing is a view assembled for an application. If malware changes that view, an investigator can reach the wrong conclusion about what is running.

GhostMap makes this distinction practical. In our tests, a hidden process remained accessible through its known /proc/PID path. Its disappearance from enumeration did not mean it had exited.

Runtime monitoring provides another source of evidence. In our investigation, Tracee alerted on GhostMap’s attached programs even though the malware could hide selected entries from system listings. The important question is which behavior a sensor observes, and which view the rootkit changes.

How does IronWorm install and load GhostMap?

GhostMap runs as part of a larger implant. IronWorm handles installation, service persistence and collection; the rootkit provides concealment and anti-debugging. The sequence below follows the tested npm specimen from installation into those kernel mechanisms. It does not represent a complete infection followed through external command and control.

Figure 1. Two delivery channels with a shared execution pattern. In the compared payloads, installation creates a persistent service. The service loads the GhostMap rootkit component and operates the local collector. The detailed measurements below come from the IronWorm specimen.

Stage 1: IronWorm establishes persistence and loads GhostMap

JFrog documented a preinstall entry that invokes ./tools/setup during installation of [email protected] when lifecycle scripts are enabled. In the AUR channel, modified PKGBUILDs install atomic-lockfile, whose install hook executes its bundled Linux binary.

The npm page for [email protected] was marked as deprecated with the author message: “COMPROMISED via Mini Shai-Hulud worm (TeamPCP). Upgrade to latest.”  This is the package author’s attribution in the warning; our analysis does not independently establish who developed or operated IronWorm. The screenshot documents deprecation, not removal from the registry.

Figure 2. Historical npm page screenshot showing the deprecation warning for [email protected] and its reference to Mini Shai-Hulud (TeamPCP).

Our runtime investigation began with the extracted executable, run with root privileges in the lab. In the initial runtime investigation, the specimen copied itself to /var/lib/glugi/glugi, created glugi.service and enabled the service. The executable started by systemd had the same hash as the original sample.

That successor process loaded GhostMap’s eBPF components. Watching only the installer’s child processes would therefore have missed the actual loader. Names varied across runs. One later installation used /var/lib/havebi/havebi. These paths are observed examples, not fixed names that every infection must use.

Stage 2: GhostMap attaches its eBPF programs to kernel events
eBPF (extended Berkeley Packet Filter) lets small programs run at defined points inside the Linux kernel. A program holds the logic; a hook is where it runs, such as a syscall exit. A link represents the attachment. A map stores data that programs consult or update, and a helper is a kernel function they can call under applicable restrictions.

GhostMap comprised 13 programs, 10 maps and 13 links at an active checkpoint in the IronWorm run. For process hiding, hidden_names holds selected process names. An execution hook can add matching processes to hidden_pids. Another map, scratch, temporarily records the address of a directory result buffer. For socket hiding, hidden_inodes stores socket inode identifiers, which the network concealment programs use to select entries.

Figure 3. Reconstructed terminal view of saved bpftool JSON, filtered for readability. On November 8, hidden_names selected dbus-daemon, hidden_pids held five PIDs and hidden_inodes held inode 23875. Memory evidence linked that inode to the listener on port 8738. Map IDs belong to this run.

Stage 3: GhostMap changes the answer delivered to the reader
Linux exposes process information through /proc, a virtual filesystem. Its numeric directory names are process IDs (PIDs). The ps utility lists processes by reading this information.

A syscall is a request from an application to the kernel. The getdents64 syscall returns directory entries in a buffer in application memory. Each record contains a name and a length field, d_reclen, which tells the reader how far to advance to the next record.

GhostMap’s enter_getdents program remembers the buffer address. At sys_exit_getdents64, its exit_getdents program examines the returned records and checks numeric names against hidden_pids. When it finds a selected entry, it uses bpf_probe_write_user to modify the record chain. Increasing the preceding record’s length makes the reader advance past the hidden entry.

The saved map dumps make the selection concrete. We named benign test processes dbus-daemon to exercise the name matching. In the November 8 experiment, hidden_pids included benign test processes 3035 and 3934. Both disappeared from /proc enumeration while their known /proc/PID paths remained accessible. Control processes 3031 and 3930 were absent from the hiding map and remained listed. After the rootkit stopped, the hidden test processes became visible again.

Figure 4. Terminal reconstruction of a comparison computed from the same November 8 snapshots. Benign test PIDs 3035 and 3934 are in hidden_pids and missing from enumeration, but remain directly accessible and return after stopping the rootkit. Control PIDs 3031 and 3930 remain visible.

Hiding is not automatically inherited from a parent. A fork creates a child process; an exec loads a new program into a process. GhostMap’s on_exec hook checks the process’s short kernel name, comm, against hidden_names and adds a matching PID to hidden_pids. In our November 12 test, a fork-only child remained visible even though it inherited the name dbus-daemon. A child that executed a program with that name became hidden, even under a visible parent. A visible child with a parent missing from ps is therefore a useful hunting lead, but not proof of rootkit activity on its own.

Stage 4: One changed byte makes the reader skip a record
In a separate experiment on November 10, we captured each directory buffer before GhostMap’s syscall exit hook and compared it with the same buffer delivered to a controlled reader. Matching the thread, buffer address and syscall interval let us identify precisely what changed.

In a controlled directory, the preceding record’s length changed from 32 to 56 bytes. The reader consequently skipped a file whose numeric name matched the hidden process’s PID. In /proc, a record length changed from 24 to 72 bytes, skipping the malware process and the hidden test process.

Each case reproduced three times. Across all six altered buffers, only one byte changed: the low byte of the two byte length field. The hidden records’ bytes remained in the buffer, and the syscall’s returned byte count stayed unchanged.

Figure 5. Terminal reconstruction displaying saved buffer measurements: the preceding record grows from 24 to 72 bytes, causing the reader to skip two PID entries.

The comparison stayed byte identical across 24 calls made before the rootkit started or after it stopped. Actual ps queries also omitted the hidden test process, both with and without our observer running. After the rootkit stopped, ps displayed the process again.

Figure 6. Reconstructed, filtered ps output from the November 10 experiment. While the rootkit is active, only control PID 3821 appears. After it stops, target PID 3820 appears too. The recorded command was ps -eo pid=; filtering was added for presentation. These PIDs belong to a separate run from Figures 3 and 4.

Stage 5: Socket concealment changes two different views
Linux exposes socket information through more than one interface. /proc/net/tcp provides a text listing, while socket diagnostic requests over Netlink return structured messages that tools such as ss can interpret. GhostMap targets both paths.

In a separate listener experiment, GhostMap’s hidden_inodes map contained inode 18544, identifying IronWorm’s listener on 127.0.0.1:8738. This is a different run from Figure 3, where that listener had inode 23875; inode numbers are local to the observed socket instance. The listener disappeared from /proc/net/tcp in all three observations, while a benign listener on port 8739 remained visible.

The Netlink path produced a different result. GhostMap changed the listener’s diagnostic message type to NLMSG_NOOP, indicating a no-operation message, but left its port, identifier and listening state in the payload. The tested ss utility still displayed the listener in all three queries, although its process-owner annotation was absent. The corresponding upstream source provides a plausible explanation: its parsing path can read the retained payload without requiring the original message type.

The concealment code ran, but it did not hide the socket from that reader. The result applies to the tested ss package, iproute2 6.1.0-1ubuntu6.4; other consumers may handle the modified message differently.

Figure 7. Terminal reconstruction of the separate listener experiment: port 8738 is absent from /proc/net/tcp but visible to the tested ss utility; control port 8739 is visible in both. The hidden inode in this run was 18544, not the 23875 shown in Figure 3.

What does GhostMap conceal about IronWorm’s local collector?

IronWorm’s listener on 127.0.0.1:8738 accepts text records from the local machine. Using synthetic values, we verified seven accepted records reaching storage through successful setxattr calls and exact readback.

The destination was user.d, an extended attribute that stores metadata alongside the installed executable rather than in its normal file contents. Static analysis connects this data to outbound command-and-control (C2) message construction. This establishes local collection and storage. No successful external delivery or authenticated remote command execution was observed. GhostMap’s eBPF programs conceal parts of the service’s activity; they do not implement its input parser or C2 command interpreter.

What does GhostMap reveal about the limits of Linux system visibility?

GhostMap shows why defenders cannot assume that the view presented by a user space tool is a complete representation of runtime activity. In our tests, processes, files and sockets could disappear from specific listings while the underlying resources remained active and accessible through other paths.
A missing entry is not a missing resource. The different socket results show why investigators should compare independent views. A listening socket can remain active even when a text listing omits it; a hidden process can remain accessible through its known /proc/PID path.

Investigation can trigger a response. A controlled PTRACE_ATTACH attempt against a protected process terminated the attaching task with SIGKILL. Each branch therefore needs a behavioral test: attached code alone does not establish the outcome an investigator will see.

Is GhostMap used beyond IronWorm?

Sonatype documented Atomic Arch’s use of compromised AUR build scripts to install malicious npm dependencies, including atomic-lockfile. Cornfield’s earlier research linked Atomic Arch and IronWorm through a shared embedded mnemonic, crediting JFrog and SafeDep for the IronWorm side of that connection. Our comparison adds independent evidence from the rootkit’s structure and recorded behavior.

The IronWorm and Atomic Arch comparison payloads share 13 named eBPF programs, ten map names and matching helper-use bitmaps for all 13 programs recorded during execution. These bitmaps record which kernel helper functions each program uses. The surrounding implants also followed closely matching installation and service behavior, including a byte-identical 1,142-byte forged sudo wrapper and a loopback listener on port 8738. Together, these findings strongly support a shared rootkit implementation, which we refer to as GhostMap. They do not independently establish a common operator.

The detailed buffer-mutation measurements, socket-reader results and Tracee findings in this article apply to the tested IronWorm specimen. The Atomic Arch comparison establishes structural and behavioral overlap; it does not establish identical outcomes or detection coverage for every variant. Tracking this shared component offers a way to investigate related activity beyond package names and hashes.

How did Aquasec’s Tracee detect GhostMap despite its concealment?

Tracee was monitoring the system before IronWorm started and alerted when GhostMap’s programs capable of writing into application memory were attached. The three findings identified exit_getdents, net_exit_read and exit_recvmsg: programs associated with directory and network concealment. Each finding reported the probe_write_user capability.

Figure 8. Terminal reconstruction displaying selected fields from saved Tracee findings: three attached programs are identified as using the probe_write_user helper. These are attachment time findings.

These alerts connected a dangerous capability to the programs the malware had attached. They gave defenders evidence to investigate GhostMap even when ordinary system listings omitted the malware’s processes or sockets. Tracee also generated a signal-sending alert and additional eBPF activity alerts associated with the specimen.

Concealment did not remove the tested directory-reader activity from Tracee’s telemetry: all 48 tested reader calls were retained. Our separate buffer measurements then established exactly which records were skipped and which bytes changed. Tracee’s attachment alerts and those measurements answer complementary questions: what suspicious code became active, and what it subsequently concealed.
The demonstrated outcome was detection. We did not evaluate prevention, and the alerts did not report each individual buffer mutation.

This distinction matters because attackers can manipulate the system views defenders normally use without eliminating the underlying runtime behavior. Runtime telemetry provides another source of evidence when those views can no longer be trusted. In this investigation, Tracee exposed suspicious eBPF activity even while GhostMap was actively manipulating what selected user space tools could see.

How do GhostMap and IronWorm map to MITRE ATT&CK?

The following mapping connects the observed behavior to the relevant MITRE ATT&CK techniques and tactics.

Tactic  Technique Observed component and behavior
Stealth  T1014 — Rootkit GhostMap’s attached eBPF programs altered process and socket enumeration results.
Persistence T1543.002 — Systemd Service IronWorm’s installer created and enabled the service that launched the implant and loaded GhostMap.
Stealth  T1622 — Debugger Evasion  GhostMap’s anti-debugging program caused the attaching task to receive SIGKILL in a controlled test.
Stealth  T1564.014 — Extended Attributes  IronWorm’s collector stored accepted records in user.d on the installed executable.

The extended attribute mapping concerns storage outside normal file contents. It does not imply execution from that attribute or independently establish the attacker’s reason for choosing it.

How can defenders investigate GhostMap and the implant that loads it?

Important: Do not treat an empty process search as sufficient evidence that a suspected IronWorm process is absent.

Correlate the process identity. Where telemetry identifies a suspicious PID, compare enumeration with direct process access and retained execution records. Correlate executable identity, service configuration and BPF ownership rather than relying on a process name.

Investigate unexpected BPF attachments. Programs capable of writing to userspace deserve investigation, but the helper capability alone does not prove maliciousness. Ownership and observed behavior provide the necessary context.

Preserve more than executable contents. Keep relevant file metadata, including extended attributes. Copying only executable contents can omit the locally stored records we observed.

Investigate the installation and restart path. For systems that installed the identified malicious package, review installation and service activity. During incident response, preserve evidence before removing the service or detaching its programs. Our privileged laboratory execution does not demonstrate an unprivileged loading path or a privilege escalation exploit.

Avoid casually attaching a debugger to a protected process: the specimen demonstrated a response that terminated the attaching task.

What indicators can defenders use to investigate IronWorm and GhostMap?

The IOC table distinguishes the IronWorm specimen, the Atomic Arch comparison payload and their embedded GhostMap objects. Package indicators provide delivery context. The npm archive hash must not be used as though it identifies the extracted executable. Paths and attribute names are supporting artifacts; their presence alone does not identify GhostMap or IronWorm.

What does GhostMap reveal about the importance of runtime security?

GhostMap shows how easily attackers can manipulate the system views defenders rely on without removing the underlying runtime activity. In our tests, processes, files and sockets could disappear from selected user space tools while the activity itself remained observable through other paths. That is why defenders need runtime telemetry they can trust when standard operating system views may be compromised. Tracee detected GhostMap’s suspicious eBPF activity even as the rootkit attempted to conceal what was happening, giving defenders another source of evidence when visibility was being actively manipulated.

Indications of Compromise (IOCs)

Type Indicator Description
SHA256 0c16ee8a8c1f5b51b01bce924e173030f032912d5b66f1a564fd636a67ddbf5f Acquired [email protected] package archive.
SHA256 36abd242ddaa27f0160c539377a0e92cf781c1695137850acc87e3892b436d36 Executed tools/setup ELF and matching installed executable.
SHA256 8795b5215dd06c5366a038a65b18b4dfefa5fd90244a567c3e0b58323103377c GhostMap BPF ELF recovered from IronWorm’s runtime memory.
SHA256 6144d433f8a0316869877b5f834c801251bbb936e5f1577c5680878c7443c98b Comparison payload associated with the Atomic Arch campaign.
SHA256 3607de2597f8955f9a88f36ee43b64d3891b8ef536e99fa098e80169350f7b01 GhostMap BPF object embedded in the Atomic Arch payload (scales.bpf.c, 52,776 B).
Package atomic-lockfile, lockfile-js, js-digest Package names reported in Atomic Arch’s AUR delivery chain; affected versions are not established here.
File path /var/lib/glugi/glugi Installed executable in the initial runtime investigation. Name varied between runs.
File path /var/lib/havebi/havebi Installed executable in the November 10 mutation experiment.
Package [email protected] Package containing the examined specimen.
Local endpoint 127[.]0[.]0[.]1:8738 Observed loopback collector, not an external C2 address.
Extended attribute user.d Stored accepted collector records on the installed executable.
FAQs
Does GhostMap remove hidden processes from Linux?

No. In our experiments, the processes continued running while selected enumeration results omitted them. Known process paths remained accessible.

Does GhostMap hide activity from every monitoring tool?

Our results do not support that claim. Tracee retained the tested reader calls, and the tested ss version displayed a listener concealed from /proc/net/tcp.

Did Tracee detect GhostMap despite its concealment?

Yes. During our investigation, Tracee alerted on attached eBPF programs with memory-writing capabilities used by GhostMap in the tested IronWorm specimen. It also retained the tested reader calls. Separate research instrumentation established the resulting buffer changes; the alerts did not identify each individual mutation.

Does stopping IronWorm remove every GhostMap BPF object?

In an observed run, stopping the service removed its programs and links, while three pinned maps remained. Retained maps did not keep the hiding programs active and do not establish persistence across reboot.

What is new about the GhostMap research?

GhostMap is our research name for the shared rootkit component. We do not claim a new eBPF technique or the first link between the campaigns. The research adds measured concealment behavior, controlled comparisons and detection evidence, and independently supports reuse of the component through its structure and recorded behavior.

Dolev Mizrahi
Dolev Mizrahi is a senior security researcher at Aqua Security, focusing on reverse engineering, vulnerability research, and Linux internals. His work explores how software can be exploited and how malware operates beneath the surface, turning technical findings into practical insights for defenders.
Ivan Kosarev
Ivan Kosarev is a senior security researcher at Aqua Security, specializing in malware research, threat intelligence, and detection. He enjoys hunting malware across platforms, leaving no source unparsed, and finding new ways of detecting emerging threats and tackling security challenges.
Need to secure enterprise workloads?

Aqua Cloud Native Application Protection Platform (CNAPP)

Go cloud native with the experts!