Npm Typosquatting Campaign Uses WSL to Deliver a Windows Crypto and Credential Stealer

· Original article ↗

Summary

CloudSEK analyzed 40 removed npm typosquatting packages that used WSL to deliver a Windows stealer targeting crypto wallets, browser data and Telegram sessions. The payload host was removed, but the C2 was still responding at the time of analysis.

Key points

  • Forty npm packages impersonating popular libraries ran install scripts; all were unpublished after a roughly 84-minute window.
  • On Windows or WSL, the scripts downloaded and silently launched a Windows executable from GitHub, crossing from WSL to the host.
  • The Rust wrapper decoded and decrypted its payload in memory; analysis observed no dropped second-stage file or child process.
  • Memory analysis showed targets including 26 desktop wallet paths, Chromium browser credentials, cookies and history, and Telegram Desktop sessions.
  • The malware fingerprinted the host and attempted to upload collected data to gofile.io; successful exfiltration was not observed in the lab.
  • The GitHub payload and npm packages were removed, but the campaign's C2 at 193.70.34.101:20099 was still responding at the time of analysis.
  • The article recommends treating affected host credentials and wallet material as compromised, investigating developer and WSL systems, and monitoring the described process and network behavior.

Article Details

Attack Vectors
  • Forty malicious npm packages imitated chalk, axios, commander, lodash, react and typescript through typosquatting or namespace-squatting. Each package used an install hook to execute scripts/postinstall.js.
  • The install script reported an operating-system label to an operator-controlled collector and deployed the Windows payload only on native Windows or Windows Subsystem for Linux hosts.
  • Inside WSL, XOR-decoded instructions launched hidden PowerShell on the Windows host, downloaded main.exe from a GitHub release and executed it from %TEMP%.
  • On native Windows, the install script downloaded main.exe using Node's HTTPS client and launched it directly, without PowerShell or a shell.
  • The Rust wrapper decoded and decrypted an embedded stage in memory and executed it within its own process. No separate stage executable or child process was observed.
  • Recovered memory contained target lists for desktop cryptocurrency wallets, browser credential and cookie stores, and Telegram session directories. The payload attempted an upload to a public file-sharing service, but laboratory certificate rejection prevented successful exfiltration.
Defensive Notes
  • Block the operator-controlled collector at 193.70.34.101:20099, which the report found still answering on 2026-08-18.
  • Purge the forty malicious package names listed in Appendix A from lockfiles, private mirrors and CI caches; registry removal does not eliminate cached copies.
  • Investigate affected Windows and WSL hosts for %TEMP%\main.exe and package-install processes that launch hidden PowerShell or directly write and start executables in %TEMP%.
  • Cover both delivery branches in detection rules: PowerShell-based detection alone misses native-Windows execution.
  • Monitor WSL install hooks that inspect WSL environment variables or /proc metadata and subsequently invoke Windows binaries.
  • Use the mutated cipher constant expad 232-byte k and oversized hexadecimal-text .rdata sections as wrapper detection anchors. The report measured no false positives for its PE-side anchors among 12,599 tested executables.
  • Correlate same-process connections to api.ipify.org followed shortly by upload.gofile.io. These are legitimate services and should not be treated as malicious infrastructure in isolation.
  • Do not interpret an absent dropped stage, child process or persistence mechanism as evidence of safety; the observed stage ran in-process and was short-lived.
  • For hosts that executed the payload, the report recommends treating wallet and browser credential material as compromised, rotating browser-stored credentials and sessions, and moving funds from affected desktop wallets.
  • Disable WSL interoperability where Linux tooling does not need to launch Windows binaries.
  • Pursue off-registry payload infrastructure separately from malicious package takedowns.

Indicators of compromise

TypeIndicatorContext
IPV4193[.]70[.]34[.]101Operator-controlled C2 address embedded across all forty packages; its collector on TCP port 20099 was still answering on 2026-08-18.
SHA2566888d4c54ef2b5bf23889f9637c2efe77e1d2af4724d315b73d646cf5547dc73SHA-256 of the wrapper's hex-decoded, still-encrypted embedded stage, measuring 11,319,296 bytes.
SHA2566f088ade49456db2422c3edfbb9998f4a3e9cce7c4c00a7279fb45d672a82b7dSHA-256 of main.exe, the Rust Windows wrapper downloaded by the malicious npm install scripts.
URLhxxp[:]//193[.]70[.]34[.]101:20099/voteOperator-controlled install-beacon endpoint receiving HTTP POST requests containing an operating-system label.
URLhxxps[:]//github[.]com/bebraz1/qPzM50V1AKG0rVlHSpecific operator-created GitHub repository used to host the malicious Windows payload; reported removed on 2026-08-17.
URLhxxps[:]//github[.]com/bebraz1/qPzM50V1AKG0rVlH/releases/download/null/main[.]exeExact malicious release-asset download URL decoded by the npm install scripts.

MITRE ATT&CK

T1005 · Data from Local SystemThe payload carried account-expanded local target paths for desktop wallets, browser data and Telegram session directories.T1012 · Query RegistryRecovered memory showed registry paths for processor and Windows version information alongside the machine's populated hardware profile.T1027 · Obfuscated Files or InformationThe dropper concealed its delivery instructions in repeating-key XOR byte arrays, while the wrapper carried its encrypted stage as hexadecimal text.T1059.001 · PowerShellThe WSL delivery branch invoked powershell.exe with hidden-window and execution-policy-bypass options to download and launch main.exe on Windows.T1071.001 · Web ProtocolsThe malicious install hook sent HTTP POST telemetry to the operator-controlled /vote collector.T1082 · System Information DiscoveryThe dropper checked operating-system details and WSL indicators; the running payload assembled CPU, GPU and RAM information.T1105 · Ingress Tool TransferThe install script downloaded main.exe from a specific GitHub release asset into the Windows temporary directory.T1140 · Deobfuscate/Decode Files or InformationThe install script decoded the payload URL and bridge instructions, and main.exe decoded and decrypted its embedded stage at runtime.T1195.001 · Compromise Software Dependencies and Development ToolsMalicious npm dependency packages used automatic install hooks to deliver a Windows stealer to developers.T1497.003 · Time Based ChecksThe wrapper timed a 552,054-iteration arithmetic loop and slept for half a second when execution took nine milliseconds or less.T1539 · Steal Web Session CookieThe payload's recovered target arrays included Chromium cookie stores, including Edge's Network\Cookies path.T1555.003 · Credentials from Web BrowsersRecovered target arrays included browser credential material and Brave Local State files; successful credential extraction was not established.T1564.003 · Hidden WindowBoth delivery branches launched the Windows payload without a visible window; the WSL branch also ran hidden PowerShell.T1567.002 · Exfiltration to Cloud StorageThe payload assembled a multipart upload and attempted to connect to a public file-sharing upload endpoint; laboratory certificate rejection prevented completion.T1620 · Reflective Code LoadingThe wrapper decrypted its embedded stage and executed it within the existing process, with no separate executable or child process observed.

Vendors

Products

Related Articles