PhantomRaven npm campaign using slopsquatted package names
Malicious npm packages with AI-hallucination-style names hid dependencies from scanners and stole npm, Git and CI tokens.
What happened
A flood of malicious npm packages used remote dynamic HTTP dependencies invisible to many scanners and included AI-hallucination-friendly names such as unused-imports. The packages delivered credential stealers targeting npm, Git, and CI tokens.
How it happened
Read the flow as text & sources
A catalog reconstruction of the supplied source account. Unknown steps remain explicit; an edge describes the reported relationship between steps.
- 01 · Hallucinated names create an exposure path
AI package recommendations can direct developers to attacker-owned names; not every install is established as AI-driven.
Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Source for step 1 - 02 · Developer installs a malicious package
The campaign includes names friendly to AI hallucination-based recommendations.
Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Source for step 2 - 03 · Remote dependencies load code
Dynamic HTTP dependencies conceal additional behavior from some scanners.
Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Source for step 3 - 04 · Developer credentials are stolen
The delivered stealer targets npm, Git and CI tokens.
Hunt: An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.
Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.
Source for step 4
Why it matters
Reported entry point: npm install of malicious/slopsquat packages. Reported impact: The delivered stealer targets npm, Git and CI tokens.
Check these source-linked conditions against your setup.
The reported campaign uses malicious npm packages and AI-hallucination-style package names.
Conditions to check- Confirm installation of an affected package; receiving an AI code suggestion alone does not establish compromise.
Source-linked applicability guidance. Confirm current scope in the original report.
What you can do
Protection & prevention
Verify dependency provenance and inspect hidden dependencies and token access before approving packages.
Block remote HTTP deps; lockfiles; SCA; never trust AI-suggested package names blindly
Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.
Detection queries
Draft query starters grouped by the attack stages where they apply.
Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.
01Hallucinated names create an exposure pathDependency / CI trust boundaryCustom schema · Draft
AI package recommendations can direct developers to attacker-owned names; not every install is established as AI-driven.
What to look for
A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Join the recommendation, resolved package identity and actual install. Do not infer that every installation followed an AI recommendation.
Visibility: Defender-side logs where collected
Required logs
- Package-manager and CI job logs
- Lockfile / manifest / workflow diffs
- Runner process trees, secret access and egress
Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- package.install
- ci.workflow.change
- package.lifecycle.exec
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
02Developer installs a malicious packageDependency / CI trust boundaryCustom schema · Draft
The campaign includes names friendly to AI hallucination-based recommendations.
What to look for
A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Visibility: Defender-side logs where collected
Required logs
- Package-manager and CI job logs
- Lockfile / manifest / workflow diffs
- Runner process trees, secret access and egress
Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- package.install
- ci.workflow.change
- package.lifecycle.exec
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
03Remote dependencies load codeDependency / CI trust boundaryCustom schema · Draft
Dynamic HTTP dependencies conceal additional behavior from some scanners.
What to look for
A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
Visibility: Defender-side logs where collected
Required logs
- Package-manager and CI job logs
- Lockfile / manifest / workflow diffs
- Runner process trees, secret access and egress
Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- package.install
- ci.workflow.change
- package.lifecycle.exec
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
04Developer credentials are stolenSensitive store access → credential useCustom schema · Draft
The delivered stealer targets npm, Git and CI tokens.
What to look for
An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.
Visibility: Defender-side logs where collected
Required logs
- File-read / API access telemetry for relevant secret stores
- Process identity and command lines
- Identity, token and outbound-network audit logs
Coverage limit. Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Sensitive store access → credential use
id: 46c46c62-2d83-4198-a8bf-d6637094527b
status: experimental
description: An unexpected process or tool accesses credential stores and is
followed by token use or outbound transfer inconsistent with the owner.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- secret.read
- credential.store.read
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("secret.read", "credential.store.read")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("secret.read", "credential.store.read")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Identify the actor, process and exact store touched, then pivot to token use from new devices or infrastructure.
- Correlate reads with egress and rotate affected credentials after confirming exposure.
Technical detailsTooling, impact & MITRE ATLAS
Attack context
- AI's role
- Agent / MCP as target
- Initial access
- npm install of malicious/slopsquat packages
Tooling as reported
Other tooling
- Remote dynamic dependencies
- info-stealers
Targets and reported impact
- Reported scale / exposure
- 126 packages cited in related reporting
Reported attribution
PhantomRaven; operator unknown
Structured attribution
- Actor
- JPD
- Country
- Unknown
- Motivation
- financially-motivated
- Attributed by
- CrowdStrike
- Attribution confidence
- medium
Detection rules
- Review attack-specific indicatorsGUIDANCE
Monitor for the techniques described in PhantomRaven npm campaign with slopsquatting names. Refer to sources for specific IOCs and TTPs.
Activity timeline
- First seen
- 2025-10-01
- Last updated
- 2026-11-05
Updates
- 2025-10-01 — Koi Security, Sonatype, BleepingComputer
PhantomRaven campaign disclosed; 126 malicious npm packages with slopsquatting names and remote dependencies
- 2026-09-15 — CrowdStrike
Stealer code confirmed LLM-generated; operator identified as JPD
Source defensive notes
Block remote HTTP deps; lockfiles; SCA; never trust AI-suggested package names blindly
MITRE ATLAS
AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.
The campaign includes names compatible with hallucinated package recommendations; AI-driven installation is not established for every package. Source
Sources & research credit
3 sourcesResearch by Koi Security / Sonatype / BleepingComputer · Koi Security
- Koi Security: PhantomRaven npm Malware Hidden in Invisible Dependencies www.koi.ai
- Sonatype: PhantomRaven npm Malware Campaign www.sonatype.com
- BleepingComputer: PhantomRaven Attack Floods npm www.bleepingcomputer.com
CrowdStrike identified LLM-generated stealer patterns: characteristic variable naming, comments explaining basic operations, structured code organization typical of AI-generated malware
Record & downloads
- Source record name
- PhantomRaven npm campaign with slopsquatting names
- Entry ID
- phantomraven-npm-slopsquatting-2025-10
- Catalog review
- November 5, 2026
- Category
- attacks-on-ai
- AI involvement confidence
- confirmed