Axios Supply-Chain Attack Deploys Cross-Platform RAT via Malicious npm Dependency

· Original article ↗

Summary

Unit 42 details how hijacked Axios npm releases installed plain-crypto-js, whose obfuscated dropper downloaded platform-specific RATs. Researchers report WAVESHAPER overlap and recommend package audits, credential rotation, system rebuilds and blocking C2 at sfrclak[.]‌

Key points

  • Attackers used a hijacked Axios maintainer npm account to publish versions 1.14.1 and 0.30.4 containing the injected dependency plain-crypto-js.
  • The dependency's npm postinstall hook ran an obfuscated Node.js dropper, setup.js, which used string reversal, Base64 decoding and XOR obfuscation.
  • The dropper contacted sfrclak[.]com on port 8000 and fetched platform-specific RAT payloads for Windows, macOS and Linux.
  • The RAT variants shared a command protocol, beaconed every 60 seconds and supported commands to run scripts, inject binaries, enumerate directories and terminate.
  • The dropper removed its script and postinstall hook and replaced the modified package.json with a decoy after launching the payload.
  • Unit 42 reports overlap with WAVESHAPER and activity previously linked to DPRK operations; this is reported overlap, not definitive attribution.
  • Recommended actions include checking for affected packages and artifacts, isolating and rebuilding compromised systems, rotating accessible secrets, pinning safe Axios versions and blocking C2 traffic.

Article Details

Attack Vectors
  • Attackers hijacked an Axios maintainer’s npm account and published compromised Axios versions 1.14.1 and 0.30.4 with plain-crypto-js as a runtime dependency.
  • Installing a compromised package triggered npm’s postinstall hook to execute the obfuscated Node.js dropper setup.js.
  • The dropper contacted C2 infrastructure and downloaded a platform-specific RAT payload for Windows, macOS, or Linux.
  • The RAT variants beaconed to C2 over HTTP POST, accepted commands to run scripts, drop and execute binaries, enumerate directories, or terminate, and included Windows registry Run-key persistence.
  • After launching the payload, the dropper deleted setup.js, removed the postinstall hook, and replaced the tampered package.json with a decoy package.md.
Defensive Notes
  • Audit projects and node_modules for Axios 1.14.1 or 0.30.4 and plain-crypto-js versions 4.2.0 or 4.2.1; inspect for the platform-specific file artifacts listed in the article.
  • Isolate affected systems and rebuild compromised environments from a known-good state rather than attempting cleanup in place.
  • Clear npm, yarn, and pnpm caches; downgrade and pin Axios to 1.14.0 or 0.30.3, use dependency overrides, and restrict corporate repositories to known-good versions.
  • Block egress to sfrclak[.]com and 142.11.206[.]73; monitor port 8000, anomalous HTTP POST requests, and beaconing.
  • Review CI/CD logs, pause and validate deployments, and consider using the --ignore-scripts flag during automated installations.
  • Assume secrets accessible to a system where the package executed may be compromised; rotate exposed credentials, tokens, keys, and CI/CD secrets.
  • Use isolated development environments, store secrets in secure vaults or OS keychains, and deploy endpoint detection and response.

Indicators of compromise

TypeIndicatorContext
DOMAINcallnrwise[.]comDomain listed by Unit 42 as command-and-control infrastructure associated with the attack.
DOMAINsfrclak[.]comC2 domain contacted by the dropper to retrieve platform-specific payloads.
IPV4142[.]11[.]206[.]73C2 IP address identified by Unit 42 for the attack.
SHA25601c9484abc948daa525516464785009d1e7a63ffd6012b9e85b56477acc3e624SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2560d83030ab8bfba675fc1661f0756b6770be7dd80b1b718de3d68a01f2e79a5f4SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA25620df0909a3a0ef26d74ae139763a380e49f77207aa1108d4640d8b6f14cab8caSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2564465bdeaddc8c049a67a3d5ec105b2f07dae72fa080166e51b8f487516eb8d07SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256506690fcbd10fbe6f2b85b49a1fffa9d984c376c25ef6b73f764f670e932cab4SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256526ab39d1f56732e4e926715aaa797feb13b1ae86882ec570a4d292e7fdc3699SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA25658401c195fe0a6204b42f5f90995ece5fab74ce7c69c67a24c61a057325af668SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA25659336a964f110c25c112bcc5adca7090296b54ab33fa95c0744b94f8a0d80c0fSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2565b5fbc627502c5797d97b206b6dcf537889e6bea6d4e81a835e103e311690e22SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2565bb67e88846096f1f8d42a0f0350c9c46260591567612ff9af46f98d1b7571cdSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2565e2ab672c3f98f21925bd26d9a9bba036b67d84fde0dfdbe2cf9b85b170cab71SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256617b67a8e1210e4fc87c92d1d1da45a2f311c08d26e89b12307cf583c900d101SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2567b47ed28e84437aee64ffe9770d315c1b984135105f7f608a8b9579517bc0695SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2568449341ddc3f7fcc2547639e21e704400ca6a8a6841ae74e57c04445b1276a10SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA25692ff08773995ebc8d55ec4b8e1a225d0d1e51efa4ef88b8849d0071230c9645aSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA2569c64f1c7eba080b4e5ff17369ddcd00b9fe2d47dacdc61444b4cbfebb23a166cSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256a224dd73b7ed33e0bf6a2ea340c8f8859dfa9ec5736afa8baea6225bf066b248SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256a98e04dec3a7fe507eb30c72da808bad60bc14d9d80f9770ec99c438faa85a1aSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256ad8ba560ae5c4af4758bc68cc6dcf43bae0e0bbf9da680a8dc60a9ef78e22ff7SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256cdc05cd30eb53315dadb081a7b942bb876f0d252d20e8ed4d2f36be79ee691faSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256e10b1fa84f1d6481625f741b69892780140d4e0e7769e7491e5f4d894c2e0e09SHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256e49c2732fb9861548208a78e72996b9c3c470b6b562576924bcc3a9fb75bf9ffSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256f7d335205b8d7b20208fb3ef93ee6dc817905dc3ae0c10a0b164f4e7d07121cdSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
SHA256fcb81618bb15edfdedfb638b4c08a2af9cac9ecfa551af135a8402bf980375cfSHA-256 hash listed by Unit 42 among malicious payload and installer hashes.
URLhxxp[:]//sfrclak[.]com:8000C2 URL used by the dropper to communicate with attacker infrastructure.
URLhxxp[:]//sfrclak[.]com:8000/6202033Specific C2 resource used by the dropper to fetch stage-two payloads.

MITRE ATT&CK

Malware

Vendors

Products

Related Articles