Executive SummaryRisk level: High
What happened

The Lazarus Group ran a software-supply-chain campaign (codenamed graphalgo, active since May 2025) publishing malicious npm and PyPI packages that masquerade as legitimate tools and execute hidden payloads on installation.

Who is affected

Developers and organizations consuming open-source npm/PyPI packages.

Why it matters

Malicious packages compromise developer systems and can poison entire software supply chains, enabling credential theft and downstream impact.

Immediate recommended actions

  • Pin and vet dependencies; review new/low-reputation packages before install.
  • Use isolated build environments and block outbound network during installs.
  • Hunt for package-install processes spawning network connections.
  • Rotate developer secrets/tokens that may have been exposed.
How to read this report. Items are labelled by confidence: Confirmed stated as fact in the source, Reported described by the source, Potential analyst inference, and Requires Validation to be confirmed in your environment. Where the source lacks detail this is stated as “Not specified in the source material”.

Key Technical Findings

Vulnerability / Campaign Type

Open-source supply-chain campaign (Lazarus 'graphalgo') via malicious npm/PyPI packages.

Affected Systems

Developer workstations and CI environments installing the packages.

Initial Access Vector

Installation of malicious packages from npm/PyPI.

Execution Method

Hidden payloads execute on install via package scripts/dependencies (T1203).

Persistence

Malicious libraries may establish persistence (specifics not specified in the source material).

Privilege Escalation

Exploitation of host vulnerabilities for elevation (per source; specifics not detailed).

Defense Evasion

Obfuscation to avoid detection.

Credential Access

Harvesting of API keys/access tokens.

Lateral Movement

Pivoting across systems in the environment.

Data Exfiltration

Stolen data transmitted to attacker C2.

Impact Level

High – developer compromise and supply-chain risk.

Technical Background

The graphalgo package posed as an algorithm-visualization tool while pulling in a malicious dependency, so harmful code executed when developers installed it. This abuses the implicit trust in package registries and the automatic execution of install/build scripts.

Post-install, the malware seeks credentials (API keys, tokens), communicates with C2 over application-layer protocols, and can pivot. Defenses focus on dependency vetting, sandboxed installs, and detection of network activity from install processes.

Attack Chain Analysis

  1. Initial Access

    ActivityPublish malicious packages to npm/PyPI.

    EvidenceInstall of low-reputation/typosquat packages.

    TelemetryPackage manager and CI logs.

    Detection opportunityReview installs for unusual/new packages.

  2. Execution

    ActivityHidden payload runs on install (T1203).

    EvidenceInstall scripts spawning shells/network I/O.

    TelemetrySysmon EID 1, EDR.

    Detection opportunityHunt for npm/pip spawning unexpected processes.

  3. Credential Access

    ActivityHarvest API keys and tokens.

    EvidenceAccess to secrets/credential files.

    TelemetryFile-access and EDR telemetry.

    Detection opportunityAlert on access to secret stores during installs.

  4. Command and Control

    ActivityBeacon to C2 (T1071).

    EvidenceOutbound connections from build hosts.

    TelemetryProxy/DNS logs.

    Detection opportunityDetect egress from CI/dev to rare destinations.

  5. Exfiltration

    ActivitySend stolen data to attackers.

    EvidenceOutbound transfers post-install.

    TelemetryProxy/firewall.

    Detection opportunityFlag egress anomalies from dev environments.

Deep Technical Behavior Analysis

The defining behavior is execution at install time via package scripts and a malicious transitive dependency, followed by secret harvesting. The strongest detections are network activity and secret access originating from package-install or CI processes that should normally be quiet.

Specific package hashes and C2 indicators are not specified in the source material and require validation.

Indicators of Compromise

No indicators of compromise were provided in the source material.

Indicators of Behavior

Behavioral indicators to hunt for even when atomic IoCs are limited (Potential — validate against your baseline).

Behavioral Indicator Description Data Source Confidence
Anomalous PowerShell execution Encoded/obfuscated commands, download cradles, or unusual parent-child process lineage. Sysmon EID 1, PowerShell 4104 Potential
Suspicious child process lineage Office or web/service processes spawning script hosts or shells. Sysmon EID 1, EDR Potential
Security log clearing Event log cleared or audit policy changed to hinder visibility. Windows Security 1102, 4719 Potential
New service / scheduled task creation Unexpected persistence via services or tasks. Security 7045, 4698; Sysmon Potential
Web shell-like activity New/modified server-side scripts in writable web paths; anomalous POSTs. Web access/error logs, FIM Potential
Abnormal 403/404/500 patterns Enumeration or exploitation attempts against endpoints. Web server logs, WAF Potential
Beaconing to rare destinations Periodic outbound connections to newly-seen domains/IPs or direct-IP C2. Proxy, firewall, DNS logs Potential
Unusual DNS queries High-entropy or rare domains; possible tunneling. DNS resolver logs Potential
Authentication anomalies Spraying/stuffing, impossible travel, or MFA fatigue patterns. IdP/VPN logs, Azure AD/Okta sign-ins Potential
Suspicious IAM/OAuth changes New API keys, OAuth apps, service principals, or role grants. CloudTrail, Azure AD audit, GCP audit Potential

Detection Engineering Guidance

Defensive detection logic (Potential — tune to your environment). No exploit code is included; logic is for hunting and alerting only.

T1071 — Application Layer Protocol
  • ObjectiveDetect C2 over web protocols
  • Suspicious patternBeaconing to rare destinations
  • Data sourceProxy, firewall, DNS
  • False positivesAdmin tooling/automation; baseline before alerting.
  • ResponseTriage host, validate scope, preserve evidence, contain if confirmed.
pseudo: periodic outbound (low jitter) to newly-seen domain/IP
  with small uniform payloads => alert(level=medium)
Platform Log Source What to Look For Priority
Windows Security Event Log Logon (4624/4625), service (7045), task (4698), log clear (1102) High
Windows Sysmon Process creation (1), network (3), image load (7), LSASS access (10) High
Windows PowerShell Operational Script block logging (4104), module logging High
Endpoint EDR / Defender telemetry Process tree, persistence, tamper attempts High
Web Web server access logs Anomalous POSTs, new endpoints, web-shell-like requests High
Web Web server error logs Repeated 403/404/500 bursts on single endpoints Medium
Cloud CloudTrail / Azure AD / GCP audit IAM/OAuth changes, key creation, role grants, sign-ins High
Identity IdP / VPN logs Impossible travel, spraying, MFA fatigue High
Network DNS resolver logs Rare/high-entropy domains, tunneling Medium
Network Proxy / firewall logs Beaconing, direct-IP C2, exfil volume High

MITRE ATT&CK Mapping

Tactic Technique ID Technique Name Relevance Detection Opportunity Confidence
C2 T1071 Application Layer Protocol Use of application layer protocols for communication with C2 servers. Monitor outgoing traffic for anomalous connections. Reported
Execution T1203 Exploitation for Client Execution Exploitation of vulnerabilities during package installation. Review installation logs for unusual activity. Reported

Incident Response Guidance

  • Validate exposure and confirm whether the issue applies to your environment.
  • Preserve evidence (memory, disk, relevant logs) before remediation.
  • Isolate affected hosts/accounts if compromise is suspected.
  • Collect volatile data and review the log sources listed above.
  • Hunt for the indicators of behavior and any related atomic indicators.
  • Rotate potentially exposed credentials, keys, and session tokens.
  • Remove persistence (tasks, services, keys, web shells, cron, OAuth grants).
  • Patch affected systems; reimage where integrity cannot be assured.
  • Run post-remediation validation and a BAS/security-validation retest.

Remediation and Hardening

  • Patch affected systems and reduce internet-exposed services.
  • Enforce MFA and least-privilege for privileged and remote access.
  • Improve endpoint telemetry (Sysmon/EDR) and PowerShell logging.
  • Restrict script execution and constrain LOLBins where feasible.
  • Monitor persistence locations and disable unnecessary services.
  • Segment critical assets and review privileged accounts.
  • Rotate secrets and remove credentials from configuration files.
  • Tune SIEM/EDR detections, then validate controls after changes.

Business Risk

  • Service disruption: degraded or unavailable systems during compromise or recovery.
  • Data exposure: risk to sensitive, regulated, or customer data depending on scope.
  • Regulatory exposure: potential breach-notification and compliance obligations.
  • Financial impact: incident response, downtime, and potential extortion costs.
  • Brand and trust impact: reputational damage with customers and partners.
  • Identity blast radius: compromised accounts can expand access across cloud and SaaS.

Executive Takeaway

What leadership needs to know: Malicious packages compromise developer systems and can poison entire software supply chains, enabling credential theft and downstream impact. Current assessed risk: High.

Prioritise: patching/exposure reduction, identity hardening (MFA, least privilege), and detection coverage for the techniques above.

Validate after remediation: re-test controls with breach & attack simulation to confirm the relevant techniques are now prevented or detected.

Validating Your Defenses with Valitrix

A Valitrix Breach and Attack Simulation (BAS) platform offers organizations a powerful tool for validating their security controls against real-world adversary techniques associated with the Lazarus Group’s malicious npm and PyPI packages. By simulating these specific techniques, organizations can identify weaknesses in their detection capabilities and response strategies, ensuring they are prepared against similar attacks in reality.

The platform allows continuous validation of security measures, ensuring that defenses remain effective against evolving threats. With automated testing aligned with the MITRE ATT&CK framework, organizations can proactively uncover vulnerabilities before adversaries exploit them.

Key Takeaways

  • The Lazarus Group’s campaign involves distributing malicious npm and PyPI packages targeting developers.
  • A deep understanding of package structure can aid in identifying potential threats.
  • Employing proactive measures such as code reviews significantly reduces exploitation risks.
  • Continuous monitoring and automated threat detection are essential for effective defense against supply chain attacks.

Frequently Asked Questions

What is the Lazarus Group?

The Lazarus Group is a state-sponsored cybercrime organization associated with North Korea, known for sophisticated cyber attacks aimed at financial theft and espionage.

How can developers identify malicious packages?

Developers should review package documentation carefully, check for unusual repository activity, and use security tools to analyze dependencies for known vulnerabilities.

What steps can organizations take to secure their software supply chain?

Organizations should enforce strict policies for package management, conduct regular security audits, and train developers on recognizing potential threats in open-source libraries.