Malicious @velora-dex/sdk 9.4.1 Uses Import-Time Payload to Install macOS Backdoor

Summary
StepSecurity analyzed malicious @velora-dex/sdk 9.4.1, which runs on import and contacts a C2 server. Its macOS payload drops an architecture-specific binary and registers launchctl persistence; the article provides investigation findings and recovery steps.
Key points
- Published on April 7, 2026, version 9.4.1 had malicious code prepended to dist/index.js and no corresponding source-repository commit.
- Importing the package triggers a shell command that downloads a script from http://89.36.224.5/troubleshoot/mac/install.sh; the payload does not rely on an install hook.
- In a controlled GitHub Actions run, StepSecurity’s Harden-Runner recorded the C2 connection and process chain. The Linux runner skipped the macOS binary download.
- On macOS, the script downloads an architecture-specific binary into ~/Library/Application Support/com.apple.Terminal/profiler and registers it with launchctl as zsh.profiler.
- The article recommends pinning to version 9.4.0 or earlier, removing the binary and persistence entry if present, rotating accessible credentials, and reviewing network logs for the C2 IP.
Article Details
- Attack Vectors
- A malicious @velora-dex/sdk version 9.4.1 was published directly to npm without a corresponding source-repository commit; malicious code was prepended to dist/index.js.
- The injected code runs when the package is imported, spawns a shell, and downloads an install script from the reported C2 server.
- The install script downloads an architecture-specific macOS binary and uses launchctl to register it as a persistent service.
- The binary is placed at ~/Library/Application Support/com.apple.Terminal/profiler, a path and filename described in the article as masquerading as legitimate.
- Defensive Notes
- If @velora-dex/[email protected] was installed or imported, treat the machine and accessible secrets as compromised; pin to version 9.4.0 or earlier and rotate credentials.
- On affected macOS machines, remove the zsh.profiler launchctl service and the dropped profiler binary.
- Review firewall, proxy, and CI/CD network logs for connections to 89.36.224.5; the article says such a connection indicates the package contacted the C2 server.
- Search package lockfiles, npm caches, developer machines, and CI/CD baselines for the compromised version and C2 indicators.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| IPV4 | 89[.]36[.]224[.]5 | Reported C2 server contacted by the malicious package to retrieve the install script and macOS payloads. |
| URL | hxxp[:]//89[.]36[.]224[.]5/mac/arm/driver/profiler | Reported URL serving the malicious ARM64 macOS binary. |
| URL | hxxp[:]//89[.]36[.]224[.]5/mac/intel/driver/profiler | Reported URL serving the malicious Intel macOS binary. |
| URL | hxxp[:]//89[.]36[.]224[.]5/troubleshoot/mac/install.sh | Malicious install script URL fetched by the package's import-time payload. |
MITRE ATT&CK
T1027 · Obfuscated Files or InformationThe shell command that retrieves the install script is embedded as base64 and decoded before execution.T1036.005 · Match Legitimate Resource Name or LocationThe binary is placed in a com.apple.Terminal-named support directory and given the generic filename profiler to blend in.T1053.004 · LaunchdThe script uses launchctl submit to register the dropped binary as a persistent service named zsh.profiler.T1059.004 · Unix ShellThe injected code launches bash to execute a base64-decoded shell command and the downloaded install script.T1059.007 · JavaScriptInjected JavaScript in dist/index.js executes on package import and invokes child_process to launch the payload.T1082 · System Information DiscoveryThe script uses uname to check the operating system and machine architecture before selecting a macOS binary.T1105 · Ingress Tool TransferThe shell script downloads an architecture-specific macOS binary from the reported server.T1195.002 · Compromise Software Supply ChainThe attacker published a modified @velora-dex/sdk package version directly to npm without a corresponding source-repository commit.
People
Vendors
npmOn April 7, 2026, a malicious version of @velora-dex/sdk (v9.4.1) was published to npm. The VeloraDEX SDK is a DeFi toolkit used for token swaps, limit orders, and delta trading on the VeloraDEX decentralized exchangeStepSecuritythe npm registry with no corresponding commit in the source repository. You can find more details in StepSecurity AI package analyst here.
Products
@velora-dex/sdkOn April 7, 2026, a malicious version of @velora-dex/sdk (v9.4.1) was published to npm. The VeloraDEX SDK is a DeFi toolkit used for token swaps, limit orders, and delta trading on the VeloraDEX decentralized exchangeVeloraDEXOn April 7, 2026, a malicious version of @velora-dex/sdk (v9.4.1) was published to npm. The VeloraDEX SDK is a DeFi toolkit used for token swaps, limit orders, and delta trading on the VeloraDEX decentralized exchange
