# PhantomRaven npm campaign with slopsquatting names

- ID: phantomraven-npm-slopsquatting-2025-10
- Reported: 2025-10-01
- Researcher: Koi Security / Sonatype / BleepingComputer
- Organization: Koi Security
- AI role: ai_agent_or_mcp_as_target (Agent / MCP as target)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: 2026-11-05
- Entry page: https://openattacks.ai/attacks/phantomraven-npm-slopsquatting-2025-10/
- Entry JSON: https://openattacks.ai/api/attacks/phantomraven-npm-slopsquatting-2025-10.json
- Browse title: PhantomRaven npm campaign using slopsquatted package names
- Editorial summary: Malicious npm packages with AI-hallucination-style names hid dependencies from scanners and stole npm, Git and CI tokens.
- Evidence class (catalog annotation): Reported campaign
- Source-stated target environments: Developer workflows
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/phantomraven-npm-slopsquatting-2025-10.json

## Technique
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.

## Stack relevance (editorial)
Assessment: mapped. Editorial applicability reviewed against the catalog source account; not a scan or independent incident verification.
First action: Verify dependency provenance and inspect hidden dependencies and token access before approving packages.
- Relationship: workflow; tools: npm-pypi; OS scope: not OS-specific / not stated; requires existing MCP connections: false.
  Relevance: The reported campaign uses malicious npm packages and AI-hallucination-style package names.
  Condition to check: Confirm installation of an affected package; receiving an AI code suggestion alone does not establish compromise.
  Evidence: https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies ; https://www.sonatype.com/blog/phantomraven-npm-malware ; https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
npm install of malicious/slopsquat packages

## AI tooling and models
- unknown

## Other tooling
- Remote dynamic dependencies
- info-stealers

## Victims and sectors
unknown

## Target geography
- unknown

## Attribution
PhantomRaven; operator unknown

## Scale and metrics
126 packages cited in related reporting

## Attack flow
Catalog reconstruction of the supplied source account. Unknowns and research caveats are preserved.
### step-3: Hallucinated names create an exposure path [ai]
AI package recommendations can direct developers to attacker-owned names; not every install is established as AI-driven.
Evidence: https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies ; https://www.sonatype.com/blog/phantomraven-npm-malware ; https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/

### step-1: Developer installs a malicious package [access]
The campaign includes names friendly to AI hallucination-based recommendations.
Evidence: https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies ; https://www.sonatype.com/blog/phantomraven-npm-malware ; https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/

### step-2: Remote dependencies load code [execution]
Dynamic HTTP dependencies conceal additional behavior from some scanners.
Evidence: https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies ; https://www.sonatype.com/blog/phantomraven-npm-malware ; https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/

### step-4: Developer credentials are stolen [impact]
The delivered stealer targets npm, Git and CI tokens.
Evidence: https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies ; https://www.sonatype.com/blog/phantomraven-npm-malware ; https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/

Connections:
- step-3 -> step-1 (Potential exposure path)
- step-1 -> step-2
- step-2 -> step-4

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### step-3: Dependency / CI trust boundary
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/package.sigma.yml
- KQL query download: /api/detections/package.kql
- SPL query download: /api/detections/package.spl
- Hunt hypothesis: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
- Required telemetry: Package-manager and CI job logs; Lockfile / manifest / workflow diffs; Runner process trees, secret access and egress
- Investigate: Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Investigate: Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
- Limitation: Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
- Qualification: Join the recommendation, resolved package identity and actual install. Do not infer that every installation followed an AI recommendation.
- No direct MagicSword prevention claim is recorded for this stage.

### step-1: Dependency / CI trust boundary
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/package.sigma.yml
- KQL query download: /api/detections/package.kql
- SPL query download: /api/detections/package.spl
- Hunt hypothesis: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
- Required telemetry: Package-manager and CI job logs; Lockfile / manifest / workflow diffs; Runner process trees, secret access and egress
- Investigate: Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Investigate: Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
- Limitation: Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
- No direct MagicSword prevention claim is recorded for this stage.

### step-2: Dependency / CI trust boundary
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/package.sigma.yml
- KQL query download: /api/detections/package.kql
- SPL query download: /api/detections/package.spl
- Hunt hypothesis: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
- Required telemetry: Package-manager and CI job logs; Lockfile / manifest / workflow diffs; Runner process trees, secret access and egress
- Investigate: Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Investigate: Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
- Limitation: Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
- No direct MagicSword prevention claim is recorded for this stage.

### step-4: Sensitive store access → credential use
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/credentials.sigma.yml
- KQL query download: /api/detections/credentials.kql
- SPL query download: /api/detections/credentials.spl
- Hunt hypothesis: An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.
- Required telemetry: File-read / API access telemetry for relevant secret stores; Process identity and command lines; Identity, token and outbound-network audit logs
- Investigate: Identify the actor, process and exact store touched, then pivot to token use from new devices or infrastructure.
- Investigate: Correlate reads with egress and rotate affected credentials after confirming exposure.
- Limitation: Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
- AML.T0060: Publish Hallucinated Entities — The campaign includes names compatible with hallucinated package recommendations; AI-driven installation is not established for every package.
  Technique: https://atlas.mitre.org/techniques/AML.T0060
  Evidence: https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies ; https://www.sonatype.com/blog/phantomraven-npm-malware ; https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/

## Defensive notes
Block remote HTTP deps; lockfiles; SCA; never trust AI-suggested package names blindly

## Sources
- https://www.koi.ai/blog/phantomraven-npm-malware-hidden-in-invisible-dependencies — Koi Security: PhantomRaven npm Malware Hidden in Invisible Dependencies
- https://www.sonatype.com/blog/phantomraven-npm-malware — Sonatype: PhantomRaven npm Malware Campaign
- https://www.bleepingcomputer.com/news/security/phantomraven-attack-floods-npm-with-credential-stealing-packages/ — BleepingComputer: PhantomRaven Attack Floods npm

## Source notes
CrowdStrike identified LLM-generated stealer patterns: characteristic variable naming, comments explaining basic operations, structured code organization typical of AI-generated malware
