GhostClaw
- Type
- RAT
- Capabilities
- Credential theftPersistenceInitial accessDefense evasionPost exploitation
- Delivery
- Landing pageLure
- Platforms
- macOS
GhostClaw is a macOS-focused malware campaign targeting developers through software supply chain and social-engineering lures. It has been associated with malicious npm packages and GitHub repositories impersonating developer tools such as SDKs, trading bots, and OpenClaw-related projects. The campaign also abuses AI-assisted development workflows by embedding malicious instructions in repository content that can be executed by coding agents, enabling compromise with limited or no direct user interaction.
The infection chain is multi-stage. Initial access has been observed through malicious npm package installation hooks and through repository instructions that persuade victims to run shell commands. On execution, GhostClaw deploys a bootstrapper that profiles the host, installs a compatible Node.js runtime in user space without requiring elevated privileges, and launches an obfuscated JavaScript stage. The malware uses fake installer output and deceptive prompts to make the activity appear legitimate.
A core function of GhostClaw is credential theft. It prompts victims for their macOS password under false pretenses and validates the supplied credential using native system functionality. It also uses deceptive AppleScript dialogs resembling legitimate macOS security prompts in an attempt to obtain broader access, including Full Disk Access. Subsequent stages retrieve encrypted payloads from attacker-controlled infrastructure, execute them in the background, and remove temporary artifacts to reduce visibility.
GhostClaw establishes persistence on compromised systems by placing components in user-controlled locations chosen to resemble normal npm telemetry or developer tooling activity. Reported activity indicates overlap in techniques and infrastructure with related clusters referred to as GhostLoader and the broader Ghost campaign. The campaign is notable for blending developer trust in public code repositories and package ecosystems with modern AI-driven development practices to compromise macOS systems and steal credentials and other sensitive data.
Techniques & procedures
17 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
1 technique
Reconnaissance
the malware fetched an encrypted second-stage payload... That script displayed a convincing fake CLI installer, then prompted the victim for their system password using a keychain authorisation message.
Initial Access
4 techniques
Initial Access
Jamf Threat Labs exposes new GhostClaw/GhostLoader samples using malicious GitHub repos and AI dev workflows to steal macOS credentials via multi-stage payloads.
JFrog found the malicious package @openclaw-ai/openclawai on npm... The package used a postinstall hook to reinstall itself globally...
the repositories contain a README with step-by-step installation instructions that encourage users to execute a shell command, typically using curl to retrieve and run a remote script.
A new malware campaign called GhostClaw is actively targeting macOS users through fake GitHub repositories and AI-assisted development workflows. The campaign uses social engineering disguised as legitimate developer tools to steal user credentials and drop secondary payloads on infected systems.
Execution
3 techniques
Execution
In one path, repositories contain README files with step-by-step installation instructions that prompt users to run a shell command using curl.
In Windows, GhostLoader is delivered via a heavily obfuscated Node.js payload ( setup.js ) embedded in the project’s npm lifecycle scripts.
README files with step-by-step installation instructions... prompt users to run a shell command using curl... This means GhostClaw can infect a system without any direct human involvement.
Persistence
1 technique
Persistence
Jamf Threat Labs exposes new GhostClaw/GhostLoader samples using malicious GitHub repos and AI dev workflows to steal macOS credentials via multi-stage payloads.
Privilege Escalation
1 technique
Privilege Escalation
Jamf Threat Labs exposes new GhostClaw/GhostLoader samples using malicious GitHub repos and AI dev workflows to steal macOS credentials via multi-stage payloads.
Stealth
5 techniques
Stealth
Execution then passes to setup.js, a heavily obfuscated JavaScript file responsible for credential collection.
In the rankings of malicious samples by the file names attackers gave them, impersonations of AI developer tools... now sit second only to cracked Adobe and creative-suite installers... Fake corporate meeting apps (Zoom, Teams, Webex)...
Following execution, the temporary file is removed... Following execution of the primary payload, postinstall.js is invoked to extend the compromise and obscure earlier activity.
Jamf Threat Labs exposes new GhostClaw/GhostLoader samples using malicious GitHub repos and AI dev workflows to steal macOS credentials via multi-stage payloads.
In addition to the terminal prompt, the script can present native-looking dialogs using AppleScript: osascript -e 'set dialogResult to display dialog ...'
Credential Access
2 techniques
Credential Access
These dialogs are designed to resemble macOS security prompts and instruct the user to grant access or provide credentials. Variants observed during analysis impersonate different applications, including developer tools and trading platforms, while maintaining consistent messaging around access to 'secure wallet and credential storage.'
This is followed by a credential prompt presented directly in the terminal: Password: ... The supplied password is then validated using: dscl . -authonly {username} {password}
Discovery
1 technique
Discovery
It checks the host macOS version and architecture, then silently installs a compatible version of Node.js in a user-controlled directory, avoiding any need for elevated privileges.
Command and Control
2 techniques
Command and Control
Once credentials are collected and access is secured, setup.js contacts the command-and-control server at trackpipe[.]dev to retrieve an encrypted secondary payload.
setup.js contacts the command-and-control server at trackpipe[.]dev to retrieve an encrypted secondary payload, which is written to a temporary file at /tmp/sys-opt-{random}.js.
Observables
18 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.