Technical Analysis & Remediation
Campaign Evolution & TTPs
The threat actor has shifted from simple credential theft (Wave 1, Sept 2025) to aggressive infrastructure hijacking (Wave 2/3).
Vector
Compromised npm tokens are used to publish patch versions (e.g., 18.0.2 -> 18.0.3) containing malicious preinstall hooks.
Execution Chain
Loader
The package.json triggers a script, typically named setup_bun.js, which downloads the Bun runtime (bypassing Node.js-specific detections).
Payload
Bun executes bun_environment.js, which serves as the primary infostealer and worm propagator.
Persistence
The malware registers the compromised machine as a self-hosted GitHub Action runner, often named SHA1HULUD.
Lateral Movement
It injects a workflow file (e.g., .github/workflows/discussion.yaml) that allows the attacker to execute arbitrary commands by creating GitHub Discussions.
Indicators of Compromise (IOCs)
File Artifacts
setup_bun.js
bun_environment.js
.github/workflows/discussion.yaml
c9nt3nts.json (Exfiltrated data artifact in Wave 3)
String Literals
SHA1HULUD (Runner Name)
Shai-Hulud: The Second Coming (Repository Description)
Network/Infra
Mass creation of repositories with "Shai-Hulud" in the name/description.
Outbound traffic to raw.githubusercontent.com fetching c0nt3nts.json (Wave 3 behavior).
Lifecycle & CVE Context
MITRE ATT&CK
T1195.001 (Compromise Software Dependencies)
T1574.006 (DLL Side-Loading [via Runtime])
T1552 (Unsecured Credentials).
Vulnerability Profile
While no single CVE defines the worm, it exploits weak identity posture (long-lived tokens) and unpinned dependencies.
Wave 3 Variance
Recent telemetry indicates the removal of the "dead man's switch" (which previously wiped data if tokens weren't found), making Wave 3 stealthier and more persistent.
Remediation - THE ENTERPRISE TRACK (SANS PICERL)
Phase 1: Identification & Containment
Hunt for Runners
Immediately query GitHub Organization settings for unauthorized self-hosted runners matching the pattern SHA1HULUD or created by service accounts in the last 90 days.
Dependency Audit
Scan package-lock.json files for the presence of setup_bun.js in execution scripts.
Block Execution
Use AppLocker/WDAC to block the execution of the bun binary if it is not a standard tool in your environment.
Phase 2: Eradication
Token Rotation (CRITICAL)
Rotate all secrets exposed to the build environment. This includes:
NPM Automation Tokens.
AWS/Azure/GCP Cloud Credentials (check ~/.aws/credentials).
GitHub Personal Access Tokens (PATs).
Sanitize Repos
Delete any workflows (.github/workflows/discussion.yaml) created by the malware.
Reimage Build Agents
Do not attempt to clean infected runners; reimage them entirely as the malware has root-level persistence capabilities.
Phase 3: Recovery
Pin Dependencies
Enforce npm ci (clean install) which respects lockfiles, preventing the silent installation of new, compromised patch versions.
Dependency Cooldown
Implement a policy (via Artifactory/Nexus) to block packages published within the last 72 hours.
Phase 4: Lessons Learned
OIDC Implementation
Transition from static long-lived keys to OpenID Connect (OIDC) for cloud authentication in CI/CD to eliminate the credential theft surface.
Remediation - THE HOME USER / DEVELOPER TRACK
Priority 1: Safety & Isolation
Disconnect
If you executed npm install on a public project recently and noticed a Bun installation or high CPU usage, disconnect the machine.
Scan
Run a dedicated secret scanner (like TruffleHog) locally to see what credentials might have been on disk and exposed.
Priority 2: Identity Hygiene
Reset Everything
Assume your local ~/.ssh/id_rsa, .npmrc, and environment variables are compromised. Revoke and regenerate these keys immediately.
Enable 2FA
Ensure Two-Factor Authentication is enforced on your npm and GitHub accounts to prevent attackers from using your identity to publish further malware.
Priority 3: Persistence Removal
Check Scheduled Tasks
Look for background processes keeping bun or node active when no development environment is running.
Hardening & References
Baseline
CIS Software Supply Chain Security Guide v1.0 (Section 3: Dependency Management).
Framework
NIST SSDF (SP 800-218) - PS.3.2: Verify the provenance of third-party software.
Tactical
Verify no unknown runners exist in Settings > Actions > Runners.
Sources
Morphisec Threat Report
Kaspersky (Wave 1 Analysis - Sept 2025)
Infrastructure & Impact Reports (Wave 2 - Nov 2025)
Vendor Response & Remediation