GhostClaw Malware Targets Developers via npm, Steals Credentials and Cloud Data

GhostClaw Malware Masquerades as OpenClaw Installer to Exploit Developers

A sophisticated malware campaign, dubbed GhostClaw, has emerged, specifically targeting software developers by disguising itself as a legitimate npm package named `@openclaw-ai/openclawai`. This malicious package poses as the OpenClaw Installer, a trusted command-line tool, while covertly executing a multi-stage infection process designed to exfiltrate sensitive information from compromised systems.

Deceptive Installation Process

Upon execution, the `@openclaw-ai/openclawai` package employs a `postinstall` hook to globally reinstall itself, ensuring its presence in the system’s PATH without raising suspicion. This method allows the malware to operate stealthily, initiating its payload through an obfuscated script named `setup.js`. This script serves as the first-stage dropper, setting the stage for the subsequent infection chain.

Comprehensive Data Exfiltration

GhostClaw’s primary objective is the extensive collection of sensitive data. It targets a wide array of information, including:

– System Credentials: Harvesting system passwords and macOS Keychain databases.

– Cloud Service Credentials: Extracting configuration files from AWS, GCP, and Azure.

– Cryptocurrency Assets: Scanning for BIP-39 seed phrases stored in desktop folders.

– Browser Data: Capturing saved passwords and credit card information from various Chromium-based browsers.

– Communication Logs: Accessing iMessage history, contingent upon obtaining Full Disk Access on macOS systems.

This extensive data harvesting underscores the malware’s capability to compromise virtually all facets of a developer’s digital environment.

Cross-Platform Adaptability

Demonstrating remarkable versatility, GhostClaw is engineered to infect multiple operating systems, including macOS, Linux, and Windows. It adapts its credential validation techniques to align with the specific OS it infiltrates, thereby broadening its potential impact across diverse development environments.

Sophisticated Social Engineering Tactics

A notable aspect of GhostClaw’s strategy is its use of advanced social engineering to deceive developers into divulging their system passwords. After initiating the installation, the malware presents a counterfeit command-line interface (CLI) installer, complete with animated progress indicators and realistic system log outputs. Upon completion, it displays a dialog box mimicking a native macOS Keychain authorization prompt, requesting the administrator password to finalize a so-called secure vault initialization.

The malware permits up to five password attempts, validating each against the actual OS authentication mechanism to produce authentic-looking error messages for incorrect entries. Concurrently, it retrieves the second-stage payload from a command-and-control server (`trackpipe[.]dev`), decrypting it using AES-256-GCM encryption with a key provided in the server’s response. This decrypted payload, comprising approximately 11,700 lines of JavaScript, constitutes the full GhostLoader framework, which embeds itself deeply into the system, masquerading as a routine npm telemetry service, and begins its data exfiltration activities.

Detection and Mitigation Measures

The malicious npm package was identified by JFrog Security researchers on March 8, 2026, during routine monitoring of the npm registry for suspicious activities. Researcher Meitar Palas documented the attack’s comprehensive scope, detailing its multi-stage payload architecture, social engineering components, and the persistent remote access framework that enables prolonged, undetected access to compromised machines.

Recommended Actions for Affected Developers

Developers who have installed the `@openclaw-ai/openclawai` package should undertake the following steps to mitigate the threat:

1. Remove Malicious Directories: Delete the `.npm_telemetry` directory from the system.

2. Inspect Shell Configuration Files: Examine files such as `~/.zshrc`, `~/.bashrc`, and `~/.bash_profile` for any unauthorized entries or modifications.

3. Terminate Malicious Processes: Identify and stop any running `monitor.js` processes associated with the malware.

4. Uninstall the Malicious Package: Completely remove the `@openclaw-ai/openclawai` package from the system.

5. Rotate Compromised Credentials: Change all potentially exposed credentials, including system passwords, SSH keys, and API tokens for services like AWS, GCP, Azure, OpenAI, Stripe, and GitHub.

6. Revoke Active Sessions: Terminate active browser sessions on platforms such as Google and GitHub to prevent unauthorized access.

Given the depth of the malware’s integration into the system, a complete system reinstallation is strongly recommended to ensure all traces of the infection are eradicated.

Conclusion

The GhostClaw campaign highlights the evolving sophistication of threats targeting the developer community. By masquerading as a trusted tool and employing advanced social engineering tactics, GhostClaw effectively infiltrates systems to exfiltrate a wide range of sensitive data. Developers are urged to exercise heightened vigilance when installing packages, especially from third-party sources, and to implement robust security practices to safeguard their environments against such insidious threats.