Poisoned at the Source

NPM Supply Chain High Priority

Poisoned at the Source

A malicious npm dependency smuggled into trusted axios packages.


PDF

Download the full case study

Get the complete PDF version of this Tales from the SOC story.

Download PDF

Incident Overview

Threat Type: npm supply-chain compromise (axios)

Target: Developer build host, energy sector

OS Targeted: macOS · Windows · Linux

Rather than altering Axios source code, the adversary injected a malicious runtime dependency — plaincryptojs@4.2.1 — into the package configuration of axios versions 1.14.1 and 0.30.4. An obfuscated postinstall script executed during routine dependency resolution (npm install / npm ci). Because the packages were published with a legitimate maintainer's credentials, the activity bypassed upstream CI/CD controls and appeared authentic at install time.

Detection & Escalation

Detection: Microsoft Defender for Endpoint (MDE) and CrowdStrike fired an influx of alerts flagging process masquerading and suspicious PowerShell with characteristics of Fake CAPTCHA and SocGholish campaigns.

SOC Escalation: Escalated high priority. Command-line data ingested through CORR revealed outbound HTTP requests to a malicious domain (sfrclak[.]com:8000), confirming an active command-and-control (C2) channel rather than benign developer activity.

Depth of Investigation

Analysts confirmed the postinstall script acted as a cross-platform malware dropper — performing environment checks, deobfuscating payloads in memory, and pulling platform-specific second-stage payloads from the C2 endpoint. The malware showed anti-forensic behavior including self-deletion and metadata restoration to reduce post-incident visibility. The SOC tied the activity to the broader axios npm supply-chain attack and gave the customer clear, long-term mitigation guidance.

Weaponization

Malicious dependencies developed for the Axios HTTP Client by the attacker

Initial Access

Postinstall script executed via malicious dependency, acting as a remote trojan dropper

Execution

Renamed binary executes to evade detection, running a PowerShell script

C2

Outbound HTTP requests confirm active command-and-control channel

Alert

MDE and CrowdStrike fired an influx of alerts flagging suspicious activity

C2 Blocked / Device Isolated

Critical Start immediately notified the customer and ensured the endpoint was isolated, along with blocks outbound to the C2 address

3 Minute Response

Outcome

3 Min
Time to Containment

The Critical Start SOC removed the host from the customer's network and blocked all communication with the attacker's infrastructure before a second-stage payload could land. The customer received researched threat detail and a recommendation to find and remove the compromised package, audit for further compromise, and reimage the host — turning a stealthy supply-chain intrusion into a contained, well-understood event.