Malicious code in @ccfly/setup-darwin-arm64 (npm)
The npm package @ccfly/setup-darwin-arm64 contained a malicious 6.4 MB Go binary that establishes remote command execution via WebSocket to cc.hn and intercepts Anthropic/Claude API credentials by proxying requests through attacker-controlled infrastructure. The binary is invoked when the parent @ccfly/setup CLI is executed.
- Disclosed
- Last updated
- Blast radius
- Any developer or system that installed and executed @ccfly/setup-darwin-arm64 or its parent @ccfly/setup CLI on macOS ARM64 systems; affected systems gain remote command execution and credential/prompt interception via hardcoded C2 infrastructure.
- Ecosystems
- Attack vectors
- Affected entities
- @ccfly/setup-darwin-arm64npm package containing malicious Go binary for darwin/arm64
The npm package @ccfly/setup-darwin-arm64 shipped a malicious Go binary (bin/ccfly-setup) targeting macOS ARM64 systems. The binary contains hardcoded WebSocket connections to cc.hn and implements a full remote-control channel that executes arbitrary commands received from the attacker's infrastructure.\n\nBeyond remote command execution, the binary also intercepts Anthropic/Claude API credentials and session tokens by establishing a local HTTPS listener on 127.0.0.1:443 and modifying shell configuration files (~/.zshrc, ~/.bash_profile) to route API requests through the attacker-controlled cc.hn server. This allows the attacker to capture user API keys, session tokens, and prompt content.\n\nThe package itself declares no npm scripts or bin entry, so the malicious binary is not automatically executed by npm install alone. However, when the parent @ccfly/setup CLI is invoked by the user, it triggers execution of the binary, activating both the remote command execution and credential interception mechanisms.\n\nThe presence of Chinese pairing prompts ('请在网页上点「批准这台电脑」完成配对') indicates the attack flow involves remote pairing of the compromised host to the attacker's console, giving persistent access and credential relay capabilities.
Indicators of compromise
- Packages
- @ccfly/setup-darwin-arm64
- Domains
- cc.hn
Remediation
- Immediately uninstall @ccfly/setup-darwin-arm64 and @ccfly/setup from all systems
- Audit npm install logs and package-lock.json files to identify all systems where these packages were installed
- Rotate all Anthropic/Claude API keys and session tokens that may have been exposed
- Review shell configuration files (~/.zshrc, ~/.bash_profile) for unauthorized export statements or modifications
- Conduct forensic analysis of affected systems for signs of remote access or command execution via cc.hn
- Block cc.hn and related infrastructure at network perimeter
- Monitor for any unauthorized API usage or prompt content exfiltration from Anthropic/Claude accounts
Sources
- GitHub Advisory GHSA-xj5f-xpqg-6pv6 · GitHub Advisory Database
Cite this entry
"Malicious code in @ccfly/setup-darwin-arm64 (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 6, 2026; last updated August 7, 2026. https://supplychainattack.org/incident/malicious-code-in-ccfly-setup-darwin-arm64-npm-7rmh1y
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in epic-common-node (npm)
The npm package epic-common-node was found to contain malicious code. The package has been identified and reported through GitHub Security Advisory GHSA-m36g-mhjr-ww2c.
npmCompromised package - containedcritical
Malicious code in epic-common (npm)
The npm package epic-common was found to contain malicious code. The package was identified by Amazon Inspector and reported through the OpenSSF malicious packages database.
npmCompromised package - containedcritical
Malware in leb128x
The npm package leb128x was found to contain malware that grants full system compromise to attackers. Any computer with this package installed or running should be considered fully compromised and all secrets and keys rotated immediately from a different machine.
npmCompromised package - containedcritical
Malicious code in checkout-desktop-total (npm)
The npm package checkout-desktop-total contained malicious code that executes a hidden loader on import, downloading and running platform-specific native payloads from attacker-controlled Cloudflare Workers hosts or reconstructing them via DNS TXT records under wel1.ru. Any system that imported this package should be considered compromised.
npmCompromised package