# Your Build Pipe Is Now a C2 Channel: How Joyfill npm Packages Ran North Korean Malware at Import


When you type npm install, the clock starts. What researchers discovered inside two @joyfill packages this week is a reminder that the clock may have been running before you even knew there was a problem.


Security firm Socket disclosed Tuesday that beta versions of @joyfill/layouts and @joyfill/components had been quietly weaponized. The implant doesn't wait for a lifecycle hook — no preinstall, no postinstall script that npm auditors are trained to flag. It fires the moment Node.js loads the CommonJS entry point. Import the library in your code, and you've already run the malware.


## The Lifecycle Hook Blind Spot


The security community has spent years training developers to watch npm lifecycle hooks as the canonical supply-chain attack vector. That's reasonable — most malicious packages exploit preinstall or postinstall to run shell commands before anyone looks twice. The tooling reflects this: npm audit, Socket's own static analysis, and most CI security steps treat lifecycle hooks as the primary tripwire.


The joyfill implant ignores that entirely. It lives in the package's own JavaScript — the code your application directly requires. If your audit tooling is scanning lifecycle hooks and nothing else, it would have seen a clean install.


This isn't an accident. The overlap with DEV#POPPER and what researchers track as PolinRider (assessed as an arm of North Korea's Contagious Interview operation) makes it clear this is deliberate tradecraft evolution. These actors study defenses and adapt. They watched the industry tighten lifecycle hook monitoring and found a different door.


## Blockchain as Infrastructure: The Operational Resilience Play


The payload delivery mechanism is where this gets genuinely sophisticated. Rather than hardcoding a command-and-control IP that can be sinkholed, the implant reaches out to three blockchains — Tron, Aptos, and BNB Smart Chain — in a tiered resolution structure. It pulls the latest outbound transaction from a hardcoded Tron address, extracts a BSC transaction hash from it, decrypts that transaction's data, and executes the result. If Tron fails, it falls back to Aptos.


The consequence is operational resilience defenders rarely face with traditional C2: the attacker can swap payloads without touching the npm package. Push a new transaction to the wallet, and every infected machine pulls updated code on its next execution. No version bump, no new publish, no artifact to scan. The package on disk is static; the behavior it executes is not.


This same blockchain-resolver pattern showed up in ViteVenom earlier this month — malicious packages targeting the Vite ecosystem documented by Checkmarx and OpenSourceMalware. The infrastructure appears shared. What started as a novel technique is becoming standardized tooling within this threat cluster.


## What Gets Exfiltrated, and From Whom


Developer machines are extraordinarily valuable targets, and this payload is tuned for exactly that. The RAT's collection list reads like a checklist for compromising an organization through its builders:


  • Git credentials and GitHub CLI configuration — direct repository access
  • GitHub Desktop logs — operational intelligence on what the developer is working on
  • VS Code storage — which often contains API tokens, environment variables, and extension secrets
  • Browser extension storage for wallets and password managers — the crypto theft angle that connects this to North Korean financial operations
  • Windows Credential Manager and Linux Secret Service data
  • Chromium and Firefox profile data — cookies, saved passwords, session tokens

  • This is not opportunistic mass malware. It's targeted extraction from people who have keys to software supply chains and cryptocurrency.


    ## The Process That Doesn't Die With Your Terminal


    One technical detail in Socket's analysis deserves more attention than it's getting. The implant runs two parallel branches: an in-process branch that executes within your Node.js runtime, and a *detached* process that spawns separately and immediately decouples from the parent.


    That second branch queries a hardcoded IP (23.27.13[.]43) independently. It does not die when your build finishes, when your test suite exits, or when your terminal closes. Socket put it plainly: "It is detached from the importing Node.js process and can continue after a build, test, or CLI command exits."


    A developer installs the package, runs a test, sees green, moves on. The detached process is still running.


    ## Sandbox Evasion Built Into the Payload


    The final "clientCode" RAT includes sandbox detection that checks hostnames before activating: github-runner, buildbot, buildkitsandbox, and microsoft-standard-WSL2 all trigger a no-op. This is automated CI infrastructure — the places most likely to catch behavioral anomalies during a package audit.


    The malware only executes fully on machines that look like developer workstations. It has learned where it's being watched.


    ---


    ## HackWire Analysis


    The joyfill compromise fits a pattern that's been accelerating throughout 2026: North Korean-linked operators pivoting hard into developer supply chains as a primary revenue and access vector. Contagious Interview — originally documented as a campaign that lured developers to fake job interviews and tricked them into running malware — has evolved considerably. ViteVenom, PolinRider, DEV#POPPER: these are variations on the same operational goal, each iteration refining the evasion and persistence techniques.


    What concerns me most here isn't the specific packages — they'll be pulled and the immediate threat contained. It's the accumulating sophistication of the infrastructure. Blockchain C2 is genuinely hard to disrupt. You can't sinkhole a Tron wallet address. You can't get BNB Smart Chain to blacklist a transaction. The payload-swapping capability means a single compromised install can receive entirely different malware weeks later, long after the initial incident has been "resolved."


    The import-time execution bypass also signals something worth watching: this cluster is conducting deliberate red-team analysis of npm security tooling and writing around its blind spots. That's not a script-kiddie operation. That's a professional adversary with feedback loops.


    For defenders: the immediate action is inventory. Check your package-lock.json and node_modules for any @joyfill packages, especially beta or release-candidate versions. Longer term, any organization that treats npm security as "run npm audit and move on" needs to reckon with the gap between what that tool catches and what this class of attack actually looks like. Static analysis of the package JavaScript itself — not just lifecycle hooks — is now table stakes.


    The developer machine is the perimeter. The North Koreans figured that out before most blue teams did.


    — HackWire Editorial


    ---


    ## Related Coverage


  • Read more in our [Malware](https://www.hackwire.news/category/malware) coverage
  • Cross-reference with [Breaches](https://www.hackwire.news/category/breaches) and [Vulnerabilities](https://www.hackwire.news/category/vulnerabilities)
  • Stay current via the [HackWire homepage](https://www.hackwire.news/)