@lateos/npm-scan 0.15.6 → 0.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.de.md +46 -3
  2. package/README.fr.md +49 -6
  3. package/README.ja.md +45 -2
  4. package/README.md +43 -2
  5. package/README.zh.md +45 -2
  6. package/backend/detectors/axios-poisoning/d1-version-fingerprint.js +24 -0
  7. package/backend/detectors/axios-poisoning/d2-decoy-dep.js +24 -0
  8. package/backend/detectors/axios-poisoning/d3-postinstall-rat.js +90 -0
  9. package/backend/detectors/axios-poisoning/index.js +94 -0
  10. package/backend/detectors/index.js +10 -0
  11. package/backend/detectors/msh-supplement/d1-obfuscation.js +18 -0
  12. package/backend/detectors/msh-supplement/d2-persistence.js +47 -0
  13. package/backend/detectors/msh-supplement/d3-geo-killswitch.js +35 -0
  14. package/backend/detectors/msh-supplement/d4-c2-deaddrop.js +33 -0
  15. package/backend/detectors/msh-supplement/index.js +107 -0
  16. package/backend/detectors/node-ipc-compromise/d1-version-blocklist.js +24 -0
  17. package/backend/detectors/node-ipc-compromise/d10-unauthorized-publisher.js +19 -0
  18. package/backend/detectors/node-ipc-compromise/d11-blast-radius.js +40 -0
  19. package/backend/detectors/node-ipc-compromise/d2-tarball-hash.js +31 -0
  20. package/backend/detectors/node-ipc-compromise/d3-cjs-payload-injection.js +73 -0
  21. package/backend/detectors/node-ipc-compromise/d4-injected-payload-hash.js +37 -0
  22. package/backend/detectors/node-ipc-compromise/d5-dns-c2-pattern.js +49 -0
  23. package/backend/detectors/node-ipc-compromise/d6-bootstrap-resolver.js +40 -0
  24. package/backend/detectors/node-ipc-compromise/d7-dns-txt-exfil.js +42 -0
  25. package/backend/detectors/node-ipc-compromise/d8-runtime-trigger.js +27 -0
  26. package/backend/detectors/node-ipc-compromise/d9-temp-artifact.js +20 -0
  27. package/backend/detectors/node-ipc-compromise/index.js +93 -0
  28. package/backend/detectors/node-ipc-compromise/iocs.json +59 -0
  29. package/backend/detectors/trapdoor/d1-campaign-marker.js +20 -0
  30. package/backend/detectors/trapdoor/d2-payload-fingerprint.js +22 -0
  31. package/backend/detectors/trapdoor/d3-publisher-blocklist.js +10 -0
  32. package/backend/detectors/trapdoor/d4-gists-exfil.js +34 -0
  33. package/backend/detectors/trapdoor/d5-ai-poisoning.js +35 -0
  34. package/backend/detectors/trapdoor/d6-lure-name.js +42 -0
  35. package/backend/detectors/trapdoor/d7-crypto-primitives.js +22 -0
  36. package/backend/detectors/trapdoor/d8-xor-key.js +15 -0
  37. package/backend/detectors/trapdoor/d9-cred-validation.js +32 -0
  38. package/backend/detectors/trapdoor/index.js +77 -0
  39. package/backend/detectors/trapdoor/iocs.json +51 -0
  40. package/backend/detectors/typosquat-vpmdhaj/d1-maintainer.js +77 -0
  41. package/backend/detectors/typosquat-vpmdhaj/d2-preinstall-loader.js +37 -0
  42. package/backend/detectors/typosquat-vpmdhaj/d3-cred-exfil.js +66 -0
  43. package/backend/detectors/typosquat-vpmdhaj/index.js +98 -0
  44. package/backend/provenance.js +79 -0
  45. package/package.json +1 -1
package/README.de.md CHANGED
@@ -21,11 +21,25 @@ Statische + verhaltensbasierte Analyse, die erkennt, was npm audit, Snyk und Soc
21
21
 
22
22
  ## 📌 Das Problem
23
23
 
24
- Die Welle von npm-Lieferkettenangriffen 20252026 hat bewiesen, dass herkömmliche Werkzeuge nicht mehr ausreichen.
24
+ Die Welle von npm-Lieferkettenangriffen 2025-2026 hat bewiesen, dass herkömmliche Werkzeuge nicht mehr ausreichen.
25
25
 
26
26
  Angreifer haben sich längst über einfaches Typosquatting hinausentwickelt. Sie liefern nun **obfuskierte Preinstall-Hooks**, **hinter Umgebungserkennung versteckte Credential-Stealer**, **schlafende Hintertüren mit zeitbasierter Aktivierung** und **wurmartige transitive Verbreitung**, die sich über Peer-Abhängigkeiten ausbreitet.
27
27
 
28
- **npm audit** prüft bekannte CVEs. **Snyk** scannt nach Schwachstellen. **Socket** untersucht das Paketverhalten. Keines dieser Tools wurde für die Angriffsgeneration entwickelt, die 2025 auftrat Angriffe, die harmlos aussehen, bis sie die Produktion erreichen.
28
+ Die **Megalodon-Kampagne** (2026) kompromittierte allein über 5.500 Repositorys durch gefälschte GitHub-PRs, böswillige Workflow-Injektion und Cloud-Credential-Exfiltration - alles koordiniert durch einen einzelnen Akteur, der die gesamte Kill-Chain automatisierte. **@lateos/npm-scan** erkennt Artefakte dieser Kampagne jetzt standardmäßig.
29
+
30
+ Die **Mini Shai-Hulud-Wurm-Kampagne** (Mai 2026) traf das npm-Ökosystem in drei Wellen - TanStack CI/CD-Entführung (84 Artefakte in 6 Minuten), AntV/atool-Maintainer-Kompromittierung (600+ bösartige Versionen in 300+ Paketen) und Nx Console VS-Code-Erweiterungsvergiftung (CVE-2026-48027) - alle unter Verwendung von ctf-scramble-v2-Obfuskation, dämonisierter Persistenz mit CI-Umgebungsprüfungen, geografischen Killswitches gegen sanktionierte Regionen und GitHub-C2-Dead-Drop-Kanälen zur Token-Wiederherstellung. **@lateos/npm-scan** erkennt jetzt alle 10 Mini-Shai-Hulud-Signale über zwei Detektor-Suites.
31
+
32
+ Ein wachsender Angriffsvektor ist die **HuggingFace-Organisations-Identitätsdiebstahl**.
33
+
34
+ Die **TrapDoor-Kampagne** (Mai 2026) erstreckt sich über npm, PyPI und Crates.io.
35
+
36
+ Die **node-ipc-Kompromittierung** (14. Mai 2026) nutzte eine abgelaufene Maintainer-E-Mail-Domain aus.
37
+
38
+ Die **Massen-Typosquatting-Kampagne (vpmdhaj)** (Mai 2026) bewaffnete das npm-Maintainer-Konto `vpmdhaj`, um in einem 4-Stunden-Fenster 14 Typosquatting-Pakete zu veröffentlichen - mit Preinstall-Stagern, Bun-Laufzeitmissbrauch und Cloud-Credential-Exfiltration gegen AWS/CI/CD-Umgebungen. **@lateos/npm-scan** erkennt jetzt alle 3 Typosquatting-Kampagnensignale.
39
+
40
+ Die **Axios-Registry-Vergiftungskampagne** (Mai 2026) kompromittierte die npm-Registry-Metadaten des Axios-Pakets, um `axios@1.14.1` und `axios@0.30.4` mit injizierten Abhängigkeiten zu veröffentlichen, die plattformübergreifende RAT-Payloads enthielten. **@lateos/npm-scan** erkennt jetzt alle 3 Axios-Vergiftungssignale.
41
+
42
+ **npm audit** prüft bekannte CVEs. **Snyk** scannt nach Schwachstellen. **Socket** untersucht das Paketverhalten. Keines dieser Tools wurde für die Angriffsgeneration entwickelt, die 2025 auftrat.
29
43
 
30
44
  **@lateos/npm-scan** wurde für diesen Moment entwickelt.
31
45
 
@@ -43,6 +57,16 @@ Angreifer haben sich längst über einfaches Typosquatting hinausentwickelt. Sie
43
57
  | Erkennung bedingter Auslöser (ATK-009) | ❌ | ❌ | ❌ | ✅ |
44
58
  | Sandbox-Evasion-Erkennung (ATK-010) | ❌ | ❌ | ❌ | ✅ |
45
59
  | Transitive Wurmverbreitung (ATK-011) | ❌ | ❌ | ❌ | ✅ |
60
+ | Kampagnenerkennung (Megalodon CI/CD) | ❌ | ❌ | ❌ | ✅ |
61
+ | Wurm-Kampagnenerkennung (Mini Shai-Hulud Welle 1-3) | ❌ | ❌ | ❌ | ✅ |
62
+ | HF-Modell-Repo-Identitätsdiebstahl + README-Klon | ❌ | ❌ | ❌ | ✅ |
63
+ | VS-Code-Erweiterungs-Supply-Chain-Scan (--vsix) | ❌ | ❌ | ❌ | ✅ |
64
+ | Python-Schwachstellenerkennung (CVE-2026-48710 BadHost) | ❌ | ❌ | ❌ | ✅ |
65
+ | Plattformübergreifende Angriffserkennung (TrapDoor) | ❌ | ❌ | ❌ | ✅ |
66
+ | Abgelaufene-Domain-Entführungserkennung (node-ipc) | ❌ | ❌ | ❌ | ✅ |
67
+ | Malware-Obfuskationserkennung (ctf-scramble-v2) | ❌ | ❌ | ❌ | ✅ |
68
+ | Massen-Typosquatting-Kampagne (vpmdhaj-Maintainer) | ❌ | ❌ | ❌ | ✅ |
69
+ | Registry-Vergiftungserkennung (axios-Fake-Versionen) | ❌ | ❌ | ❌ | ✅ |
46
70
  | Angriffstaxonomie (ATK-Serie) | ❌ | ❌ | ❌ | ✅ |
47
71
  | SBOM-Ausgabe (CycloneDX + SPDX) | ❌ | ✅ | ❌ | ✅ |
48
72
  | NIST 800-161-Compliance-Bericht | ❌ | ❌ | ❌ | ✅ |
@@ -62,6 +86,15 @@ Angreifer haben sich längst über einfaches Typosquatting hinausentwickelt. Sie
62
86
  | 🕵️ | **Heuristische statische Analyse** | AST-Level-Inspektion erkennt Obfuskation, eval-Ketten, Umgebungsabfragen und verdächtige Lebenszyklus-Skripte, die regex-basierten Tools entgehen |
63
87
  | 🧠 | **Verhaltenserkennung** | Identifiziert bedingte Auslöser (zeitbasiert, CI-bewusst), Sandbox-Evasion und schlafende Aktivierungsmuster |
64
88
  | 🧬 | **ATK-Angriffstaxonomie** | 11 klassifizierte Angriffstypen mit NIST 800-161-Zuordnungen — versioniert, dokumentiert und PR-fähig |
89
+ | 🪱 | **Wurm-Kampagnenerkennung** | Mini Shai-Hulud - 10 Sub-Checks über 2 Suites: Burst-Publish, Sibling-Kompromittierung, SLSA-Attestierungsabweichung, Publisher-Drift, IOC-Match, Token-Exfil, ctf-scramble-v2-Obfuskation, dämonisierte Persistenz, geografischer Killswitch, GitHub-C2-Dead-Drop |
90
+ | 🧩 | **VSIX-Erweiterungsscan** | `npm-scan scan --vsix` - erkennt VS Code Marketplace Supply-Chain-Angriffe |
91
+ | 🐍 | **Python-Schwachstellenerkennung** | CVE-2026-48710 (BadHost) - Starlette Host-Header-Injection |
92
+ | 🪤 | **Plattformübergreifende Angriffserkennung** | TrapDoor - 9 Sub-Checks |
93
+ | 📡 | **Abgelaufene-Domain-Entführungserkennung** | node-ipc-Kompromittierung - 11 Sub-Checks |
94
+ | ☣️ | **Malware-Obfuskationserkennung** | ctf-scramble-v2 - scannt Paket-dist/lib nach bekannten Malware-Obfuskationsmustern, stoppt Analyse sofort mit CRITICAL-Stoppbedingung |
95
+ | 🎭 | **Massen-Typosquatting-Kampagnenerkennung** | vpmdhaj-Maintainer-Blocklist mit Stoppbedingung, Levenshtein-basierte Typosquatting-Erkennung, Preinstall-Stager-Identifikation, AWS-ECS/Vault/GitHub-Credential-Exfiltrationsmuster |
96
+ | ☠️ | **Registry-Vergiftungserkennung** | Axios-Versions-Blocklist (1.14.1/0.30.4) mit Stoppbedingung, Decoy-Abhängigkeitserkennung (plain-crypto-js), plattformübergreifende RAT-Payload-Erkennung |
97
+ | 🔏 | **Provenance-Prüfpfad** | Aureus-Elicitor v1.7-Framework - HMAC-SHA256-signierte Erkennungsmanifeste, inhaltshash-verifizierte Prüfpfade, Regel-Provenance-URLs, Kampagnenquellenattribution |
65
98
  | 📦 | **SBOM-Generierung** | CycloneDX 1.5 und SPDX 2.3 mit eingebetteten Ergebnissen als Schwachstellen |
66
99
  | 🧾 | **Compliance-Berichte** | NIST SP 800-161-Rückverfolgbarkeitsmatrix + EU Cyber Resilience Act-Zuordnung (kostenlos) |
67
100
  | 🔌 | **SIEM-Export** | Splunk CEF, Elastic ECS, Microsoft Sentinel, IBM QRadar-Formate (Premium) |
@@ -228,6 +261,11 @@ npm-scan report --pdf # alle Scans (Premium)
228
261
  | **ATK-010** | Sandbox-Evasion / Anti-Analyse | Verhaltensbasiert | 🟠 mittel | SR-10.3 |
229
262
  | **ATK-011** | Transitive Verbreitung (wurmartige laterale Ausbreitung) | Verhaltensbasiert | 🔴 hoch | SR-11.4 |
230
263
  | **CVE-2026-48710** | BadHost — Starlette Authentifizierungs-Bypass via Host-Header-Injection (CVE-2026-48710, CVSS 7.0). Python-Abhängigkeitsversionserkennung (requirements.txt, pyproject.toml, poetry.lock, Pipfile, setup.py/cfg), transitive Heuristik (15 bekannte Downstream-Pakete: fastapi, vllm, litellm, MCP-Server, etc.), statische Code-Pattern-Analyse für gefährliche `request.url.path`-Nutzung in Auth/Middleware-Kontexten mit `request.scope["path"]`-Unterdrückung | Statisch + Registry | 🔴 hoch / 🟠 mittel / ℹ️ info | SR-3.1, SR-5.3 |
264
+ | **TRAPDOOR** | TrapDoor plattformübergreifende Angriffskampagne — Kampagnenmarker P-2024-001, trap-core.js-Payload-Fingerprint, Publisher-Blocklist asdxzxc, Gist-basierter Credential-Exfil, KI-Kontextvergiftung (Zero-Width-Unicode), Crypto/DeFi-Locknamen, Fernet+ECDH-Verschlüsselung, XOR-Key cargo-build-helper-2026, STS/GitHub-API-Validierung | Statisch + Registry | 🟠 mittel / 🔴 hoch / ⚫ kritisch | SR-3.1, SR-5.3, SR-7.5 |
265
+ | **NODE_IPC_COMPROMISE** | node-ipc Supply-Chain-Kompromittierung (14. Mai 2026) — Versions-Blocklist (9.1.6/9.2.3/12.0.1) mit sicheren Pins, Tarball-SHA-256-Verifikation, CJS-Payload-IIFE-Injektion, DNS-over-nicht-Standard-Port-C2, Bootstrap-Resolver sh.azurestaticprovider.net, DNS-TXT-Exfiltrationszone bt.node.js, setImmediate()-Laufzeitauslöser, ~/nt-*/ Staging-Artefakte, unbefugter Publisher atiertant, Lockfile-Blastradius | Statisch + Registry | ⚫ kritisch | SR-3.1, SR-5.3, SR-7.5 |
266
+ | **MSH_SUPPLEMENT** | Mini Shai-Hulud-Ergänzung - ctf-scramble-v2-Obfuskation (STOP bei Treffer), dämonisierte Persistenz, geografischer Killswitch (ru_RU/be_BY), C2-Dead-Drop-Indikatoren (OhNoWhatsGoingOnWithGitHub) | Statisch + Verhalten | ⚫ kritisch | SR-3.1, SR-7.5, SR-9.2 |
267
+ | **TYPOSQUAT_VPMDHAJ** | Massen-Typosquatting-Kampagne (vpmdhaj) - Maintainer-Blocklist (STOP bei Treffer), vpmdhaj-*-Namespace-Präfixerkennung, Levenshtein-Typosquatting, Preinstall-Stager, Cloud-Credential-Exfiltration (AWS IMDSv2, ECS, Vault, GitHub) | Statisch + Registry | ⚫ kritisch | SR-2.1, SR-3.1, SR-5.3 |
268
+ | **AXIOS_POISONING** | Axios-Registry-Vergiftung - Versions-Blocklist (1.14.1/0.30.4, STOP bei Treffer), Decoy-Abhängigkeitsinjektion (plain-crypto-js), plattformübergreifende RAT-Payload-Erkennung (PowerShell, launchd, systemd, DLL, C2) | Statisch + Verhalten | ⚫ kritisch | SR-3.1, SR-5.3, SR-7.5 |
231
269
 
232
270
  > **Wie ausweichende Angriffe erkannt werden:** ATK-009 erkennt Pakete, die `process.env.CI` prüfen, Hostnamen sondieren oder zeitbasierte Aktivierung verwenden. ATK-010 markiert `debugger`-Anweisungen, `os.hostname()`-Sonden und Umgebungs-Fingerprinting. ATK-011 verfolgt Peer-Abhängigkeitsgraphen, um wurmartige Verbreitungsmuster zu erkennen.
233
271
  > Vollständige Dokumentation der Ausweichfläche und PoC-Beispiele finden Sie in [`docs/attack-taxonomy.md`](docs/attack-taxonomy.md).
@@ -549,7 +587,7 @@ Siehe den obigen [Docker-Schnellstart-Abschnitt](#-lateosnpm-scan-überall-mit-d
549
587
 
550
588
  ### Kostenlose Stufe (ausgeliefert)
551
589
 
552
- - Alle 11 ATK-Detektoren (statisch + verhaltensbasiert) + **MEGALODON** + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** + **VSIX_SCAN** + **CVE-2026-48710 (BadHost)**
590
+ - Alle 11 ATK-Detektoren (statisch + verhaltensbasiert) + **MEGALODON** (D1-D6) + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** (D1-D7, 3 Wellen, mit **MSH_SUPPLEMENT** D1-D4) + **VSIX_SCAN** (6 Detektoren) + **CVE-2026-48710 (BadHost)** (3 Ebenen) + **TRAPDOOR** (9 Regeln) + **NODE_IPC_COMPROMISE** (11 Regeln) + **TYPOSQUAT_VPMDHAJ** (3 Regeln) + **AXIOS_POISONING** (3 Regeln)
553
591
  - SBOM-Ausgabe (CycloneDX + SPDX)
554
592
  - HTML-, Text- und Compliance-Berichte (NIST + EU CRA)
555
593
  - Policy-as-Code-Engine (YAML)
@@ -616,6 +654,11 @@ node --test test/detectors-corpus.test.js
616
654
  - `test/cve-2026-48710-badhost/transitive.test.js` — 7 transitive Abhängigkeitstests (Tier 1/2, fastapi-Version-Gating, Pin-Unterdrückung)
617
655
  - `test/cve-2026-48710-badhost/codePattern.test.js` — 6 statische Code-Pattern-Tests (Auth-Kontext, INFO-Durchgriff, Scope-Unterdrückung)
618
656
  - `test/cve-2026-48710-badhost/integration.test.js` — 4 Integrationstests (End-to-End-Composite-Findings, sauberes Projekt, keine Python-Dateien)
657
+ - `test/trapdoor.test.js` — 40 TrapDoor-Kampagnenerkennungstests (D1–D9: Kampagnenmarker, Payload-Fingerprint, Publisher-Blocklist, Gist-Exfil, KI-Vergiftung, Lockname, Krypto-Primitive, XOR-Key, Credential-Validierung)
658
+ - `test/node-ipc.test.js` — 37 node-ipc-Kompromittierungstests (D1–D11: Versions-Blocklist, Tarball-Hash, CJS-Injektion, Payload-Hash, DNS-C2-Muster, Bootstrap-Resolver, DNS-TXT-Exfil, Laufzeitauslöser, Temp-Artefakte, unbefugter Publisher, Blastradius)
659
+ - `test/msh-supplement.test.js` - 17 MSH-Ergänzungstests (ctf-scramble-v2-Stopp, Dämonisierung, geografischer Killswitch, C2-Dead-Drop)
660
+ - `test/typosquat-vpmdhaj.test.js` - 16 Typosquatting-Kampagnentests (Maintainer-Block, Präfixerkennung, Levenshtein, Preinstall-Stager, Bun-Loader, AWS/ECS/Vault/GitHub-Cred-Exfil)
661
+ - `test/axios-poisoning.test.js` - 13 Axios-Vergiftungstests (Versions-Blocklist-Stopp, Decoy-Abhängigkeit, Krypto-Heuristik, plattformübergreifender RAT, C2-Callback)
619
662
  - `test/cli.test.js` — Commander-Integrationstests (Hilfe, Version, Scan, Bericht, Fehlerbehandlung)
620
663
 
621
664
  ### Hilfe benötigt?
package/README.fr.md CHANGED
@@ -21,11 +21,25 @@ Analyse statique + comportementale qui détecte ce que npm audit, Snyk et Socket
21
21
 
22
22
  ## 📌 Le problème
23
23
 
24
- La vague d'attaques sur la chaîne d'approvisionnement npm de 20252026 a prouvé que les outils traditionnels ne suffisent plus.
24
+ La vague d'attaques sur la chaîne d'approvisionnement npm de 2025-2026 a prouvé que les outils traditionnels ne suffisent plus.
25
25
 
26
26
  Les attaquants ont dépassé le simple typosquatting. Ils livrent désormais des **hooks de pré-installation obfusqués**, des **voleurs d'identifiants cachés derrière la détection d'environnement**, des **portes dérobées dormantes avec activation temporelle**, et une **propagation transitive de type ver** qui se répand via les dépendances peer.
27
27
 
28
- **npm audit** vérifie les CVE connus. **Snyk** recherche les vulnérabilités. **Socket** analyse le comportement des paquets. Aucun d'eux n'a été conçu pour la génération d'attaques apparue en 2025 des attaques qui semblent bénignes jusqu'à ce qu'elles atteignent la production.
28
+ La **campagne Megalodon** (2026) a à elle seule compromis plus de 5 500 dépôts via de fausses PR GitHub, l'injection de workflows malveillants et l'exfiltration d'identifiants cloud - le tout coordonné par un seul acteur automatisant l'ensemble de la chaîne de destruction. **@lateos/npm-scan** détecte désormais les artefacts de cette campagne dès la première utilisation.
29
+
30
+ La **campagne de ver Mini Shai-Hulud** (mai 2026) a frappé l'écosystème npm en trois vagues - détournement CI/CD TanStack (84 artefacts en 6 minutes), compromission du mainteneur AntV/atool (600+ versions malveillantes dans 300+ packages), et empoisonnement de l'extension VS Code Nx Console (CVE-2026-48027) - toutes utilisant l'obfuscation ctf-scramble-v2, la persistance démonisée avec vérifications d'environnement CI, des killswitches géographiques ciblant les régions sanctionnées, et des canaux C2 GitHub dead-drop pour la récupération de jetons. **@lateos/npm-scan** détecte désormais les 10 signaux Mini Shai-Hulud répartis sur deux suites de détection.
31
+
32
+ Un vecteur d'attaque croissant est **l'usurpation d'organisation HuggingFace** - des packages qui se font passer pour des dépôts de modèles HF légitimes pour tromper les utilisateurs.
33
+
34
+ La **campagne TrapDoor** (mai 2026) couvre npm, PyPI et Crates.io - 34 packages malveillants, 384+ versions attribuées à un seul éditeur.
35
+
36
+ La **compromission node-ipc** (14 mai 2026) a utilisé un domaine de maintenance expiré pour détourner l'un des packages les plus dépendus de npm.
37
+
38
+ La **campagne de typosquattage massif (vpmdhaj)** (mai 2026) a utilisé le compte mainteneur npm `vpmdhaj` pour publier 14 packages typosquattés en 4 heures - ciblant les environnements AWS/CI/CD avec des stagers de pré-installation, un abus du runtime Bun, et l'exfiltration d'identifiants cloud. **@lateos/npm-scan** détecte désormais les 3 signaux de la campagne de typosquattage.
39
+
40
+ La **campagne d'empoisonnement du registre Axios** (mai 2026) a compromis les métadonnées du package axios pour publier `axios@1.14.1` et `axios@0.30.4` avec des dépendances injectées contenant des RAT multiplateformes. **@lateos/npm-scan** détecte désormais les 3 signaux d'empoisonnement Axios.
41
+
42
+ **npm audit** vérifie les CVE connus. **Snyk** recherche les vulnérabilités. **Socket** analyse le comportement des paquets. Aucun d'eux n'a été conçu pour la génération d'attaques apparue en 2025.
29
43
 
30
44
  **@lateos/npm-scan** a été conçu pour ce moment.
31
45
 
@@ -34,7 +48,7 @@ Les attaquants ont dépassé le simple typosquatting. Ils livrent désormais des
34
48
  ## 🔬 Pourquoi @lateos/npm-scan ?
35
49
 
36
50
  | Capacité | npm audit | Snyk | Socket | **@lateos/npm-scan** |
37
- |---|---|---|---|---|
51
+ |---|---|---|---|---|---|
38
52
  | Correspondance CVE connus | ✅ | ✅ | ❌ | ✅ |
39
53
  | Analyse statique | ❌ | ✅ | ✅ | ✅ |
40
54
  | Détection de charges utiles obfusquées | ❌ | ❌ | ❌ | ✅ |
@@ -43,12 +57,22 @@ Les attaquants ont dépassé le simple typosquatting. Ils livrent désormais des
43
57
  | Détection de déclencheurs conditionnels (ATK-009) | ❌ | ❌ | ❌ | ✅ |
44
58
  | Détection de contournement de sandbox (ATK-010) | ❌ | ❌ | ❌ | ✅ |
45
59
  | Propagation transitive de ver (ATK-011) | ❌ | ❌ | ❌ | ✅ |
60
+ | Détection de campagne (Megalodon CI/CD) | ❌ | ❌ | ❌ | ✅ |
61
+ | Détection de campagne de ver (Mini Shai-Hulud Vagues 1-3) | ❌ | ❌ | ❌ | ✅ |
62
+ | Détection d'usurpation HF (dépôt de modèles + clone README) | ❌ | ❌ | ❌ | ✅ |
63
+ | Analyse d'extension VS Code (--vsix) | ❌ | ❌ | ❌ | ✅ |
64
+ | Détection de vulnérabilité Python (CVE-2026-48710 BadHost) | ❌ | ❌ | ❌ | ✅ |
65
+ | Détection d'attaque multi-écosystème (TrapDoor) | ❌ | ❌ | ❌ | ✅ |
66
+ | Détection de détournement de domaine expiré (node-ipc) | ❌ | ❌ | ❌ | ✅ |
67
+ | Détection d'obfuscation de malware (ctf-scramble-v2) | ❌ | ❌ | ❌ | ✅ |
68
+ | Campagne de typosquattage massif (mainteneur vpmdhaj) | ❌ | ❌ | ❌ | ✅ |
69
+ | Détection d'empoisonnement de registre (versions axios) | ❌ | ❌ | ❌ | ✅ |
46
70
  | Taxonomie d'attaques (série ATK) | ❌ | ❌ | ❌ | ✅ |
47
71
  | Sortie SBOM (CycloneDX + SPDX) | ❌ | ✅ | ❌ | ✅ |
48
72
  | Rapport de conformité NIST 800-161 | ❌ | ❌ | ❌ | ✅ |
49
73
  | Rapport de conformité EU CRA | ❌ | ❌ | ❌ | ✅ |
50
74
  | Export SIEM (CEF / ECS / Sentinel / QRadar) | ❌ | ❌ | ❌ | ✅ |
51
- | Exécution entièrement locale aucune télémétrie | ✅ | ❌ | ❌ | ✅ |
75
+ | Exécution entièrement locale - aucune télémétrie | ✅ | ❌ | ❌ | ✅ |
52
76
  | Politique en tant que code (listes blanches YAML) | ❌ | ❌ | ❌ | ✅ |
53
77
 
54
78
  > **La vie privée d'abord.** Toute l'analyse s'effectue sur votre machine. Aucun code ne quitte votre environnement. Aucune télémétrie. Aucune dépendance au cloud.
@@ -61,7 +85,16 @@ Les attaquants ont dépassé le simple typosquatting. Ils livrent désormais des
61
85
  |------|---------|-------------|
62
86
  | 🕵️ | **Analyse statique heuristique** | L'inspection au niveau AST détecte l'obfuscation, les chaînes eval, le sondage d'environnement et les scripts de cycle de vie suspects que les outils basés sur les regex manquent |
63
87
  | 🧠 | **Détection comportementale** | Identifie les déclencheurs conditionnels (temporels, conscients du CI), le contournement de sandbox et les modèles d'activation dormante |
64
- | 🧬 | **Taxonomie d'attaques ATK** | 11 types d'attaques classifiés avec correspondances NIST 800-161 versionnés, documentés et PR-ables |
88
+ | 🧬 | **Taxonomie d'attaques ATK** | 11 types d'attaques classifiés avec correspondances NIST 800-161 - versionnés, documentés et PR-ables |
89
+ | 🪱 | **Détection de campagne de ver** | Mini Shai-Hulud - 10 sous-vérifications réparties sur deux suites détectant les bursts de publication, les compromissions de pairs, les anomalies d'attestation SLSA, la dérive d'éditeur, la correspondance IOC, l'exfiltration de jetons, l'obfuscation ctf-scramble-v2, la persistance démonisée, les killswitches géographiques et les canaux C2 GitHub |
90
+ | 🧩 | **Analyse d'extension VSIX** | `npm-scan scan --vsix` - détecte les attaques de la chaîne d'approvisionnement du Marketplace VS Code |
91
+ | 🐍 | **Détection de vulnérabilité Python** | CVE-2026-48710 (BadHost) - injection d'en-tête Host Starlette |
92
+ | 🪤 | **Détection d'attaque multi-écosystème** | TrapDoor - 9 sous-vérifications |
93
+ | 📡 | **Détection de détournement de domaine expiré** | node-ipc - 11 sous-vérifications |
94
+ | ☣️ | **Détection d'obfuscation de malware** | ctf-scramble-v2 - analyse des distributions à la recherche de motifs d'obfuscation de malware connus, arrêt immédiat avec condition d'arrêt de sévérité CRITIQUE |
95
+ | 🎭 | **Détection de campagne de typosquattage massif** | Liste noire du mainteneur vpmdhaj avec condition d'arrêt, détection de typosquattage basée sur Levenshtein, identification de stager de pré-installation, motifs d'exfiltration d'identifiants AWS ECS/Vault/GitHub |
96
+ | ☠️ | **Détection d'empoisonnement de registre** | Liste noire des versions Axios (1.14.1/0.30.4) avec condition d'arrêt, découverte de dépendance leurre (plain-crypto-js), détection de RAT multiplateforme |
97
+ | 🔏 | **Piste d'audit de provenance** | Cadre Aureus-Elicitor v1.7 - manifests de détection signés HMAC-SHA256, pistes d'audit vérifiées par hachage de contenu, URLs de provenance de règle, attribution de source de campagne |
65
98
  | 📦 | **Génération SBOM** | CycloneDX 1.5 et SPDX 2.3 avec résultats intégrés comme vulnérabilités |
66
99
  | 🧾 | **Rapports de conformité** | Matrice de traçabilité NIST SP 800-161 + cartographie EU Cyber Resilience Act (gratuit) |
67
100
  | 🔌 | **Export SIEM** | Formats Splunk CEF, Elastic ECS, Microsoft Sentinel, IBM QRadar (premium) |
@@ -228,6 +261,11 @@ npm-scan report --pdf # tous les scans (premium)
228
261
  | **ATK-010** | Contournement de sandbox / anti-analyse | Comportementale | 🟠 moyenne | SR-10.3 |
229
262
  | **ATK-011** | Propagation transitive (dissémination latérale de type ver) | Comportementale | 🔴 élevée | SR-11.4 |
230
263
  | **CVE-2026-48710** | BadHost — contournement d'authentification Starlette par injection d'en-tête Host (CVE-2026-48710, CVSS 7.0). Détection de version de dépendance Python (requirements.txt, pyproject.toml, poetry.lock, Pipfile, setup.py/cfg), heuristique transitive (15 paquets aval connus : fastapi, vllm, litellm, serveurs MCP, etc.), analyse statique de code pour `request.url.path` dangereux en contexte auth/middleware avec suppression par `request.scope["path"]` | Statique + Registre | 🔴 élevée / 🟠 moyenne / ℹ️ info | SR-3.1, SR-5.3 |
264
+ | **TRAPDOOR** | Campagne d'attaque multi-écosystème TrapDoor — marqueur de campagne P-2024-001, empreinte de charge utile trap-core.js, liste noire d'éditeur asdxzxc, exfiltration d'identifiants via Gist, empoisonnement de contexte IA (Unicode largeur nulle), noms leurres crypto/DeFi, chiffrement Fernet+ECDH, clé XOR cargo-build-helper-2026, validation d'identifiants STS/API GitHub | Statique + Registre | 🟠 moyenne / 🔴 élevée / ⚫ critique | SR-3.1, SR-5.3, SR-7.5 |
265
+ | **NODE_IPC_COMPROMISE** | Compromission de la chaîne d'approvisionnement node-ipc (14 mai 2026) — liste noire de versions (9.1.6/9.2.3/12.0.1) avec épingle de sécurité, vérification SHA-256 du tarball, injection IIFE de charge utile CJS, DNS sur port non standard, résolveur d'amorçage sh.azurestaticprovider.net, zone d'exfiltration DNS TXT bt.node.js, déclencheur d'exécution setImmediate(), artefacts de staging ~/nt-*/, éditeur non autorisé atiertant, détection du rayon d'impact dans les lockfiles avec recommandations d'épingle | Statique + Registre | ⚫ critique | SR-3.1, SR-5.3, SR-7.5 |
266
+ | **MSH_SUPPLEMENT** | Supplément Mini Shai-Hulud - obfuscation ctf-scramble-v2 (ARRÊT sur correspondance), persistance de démonisation, détection de killswitch géographique (ru_RU/be_BY), indicateurs C2 dead-drop (OhNoWhatsGoingOnWithGitHub) | Statique + Comportementale | ⚫ critique | SR-3.1, SR-7.5, SR-9.2 |
267
+ | **TYPOSQUAT_VPMDHAJ** | Campagne de typosquattage massif (vpmdhaj) - liste noire de mainteneur (ARRÊT sur correspondance), détection de préfixe d'espace de noms vpmdhaj-*, correspondance Levenshtein, stagers de pré-installation, exfiltration d'identifiants cloud (AWS IMDSv2, ECS, Vault, GitHub) | Statique + Registre | ⚫ critique | SR-2.1, SR-3.1, SR-5.3 |
268
+ | **AXIOS_POISONING** | Empoisonnement du registre Axios - liste noire de versions (1.14.1/0.30.4, ARRÊT sur correspondance), injection de dépendance leurre (plain-crypto-js), détection de RAT multiplateforme (PowerShell, launchd, systemd, DLL, C2) | Statique + Comportementale | ⚫ critique | SR-3.1, SR-5.3, SR-7.5 |
231
269
 
232
270
  > **Comment les attaques furtives sont détectées :** ATK-009 détecte les paquets qui vérifient `process.env.CI`, sondent les noms d'hôte ou utilisent une activation temporelle. ATK-009 signale les instructions `debugger`, les sondes `os.hostname()` et l'empreinte environnementale. ATK-011 trace les graphes de dépendances peer pour détecter les schémas de propagation de type ver.
233
271
  > Voir [`docs/attack-taxonomy.md`](docs/attack-taxonomy.md) pour la documentation complète de la surface d'évasion et des exemples de PoC.
@@ -549,7 +587,7 @@ Voir la [section Démarrage rapide Docker](#-exécutez-lateosnpm-scan-partout-av
549
587
 
550
588
  ### Niveau gratuit (livré)
551
589
 
552
- - Les 11 détecteurs ATK (statique + comportemental) + **MEGALODON** + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** + **VSIX_SCAN** + **CVE-2026-48710 (BadHost)**
590
+ - Les 11 détecteurs ATK + **MEGALODON** (D1-D6) + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** (D1-D7, 3 vagues, avec **MSH_SUPPLEMENT** D1-D4) + **VSIX_SCAN** (6 détecteurs) + **CVE-2026-48710 (BadHost)** (3 couches) + **TRAPDOOR** (9 règles) + **NODE_IPC_COMPROMISE** (11 règles) + **TYPOSQUAT_VPMDHAJ** (3 règles) + **AXIOS_POISONING** (3 règles)
553
591
  - Sortie SBOM (CycloneDX + SPDX)
554
592
  - Rapports HTML, texte et conformité (NIST + EU CRA)
555
593
  - Moteur de politique en tant que code (YAML)
@@ -616,6 +654,11 @@ node --test test/detectors-corpus.test.js
616
654
  - `test/cve-2026-48710-badhost/transitive.test.js` — 7 tests de dépendances transitives (Tier 1/2, contrôle de version fastapi, suppression par épinglage)
617
655
  - `test/cve-2026-48710-badhost/codePattern.test.js` — 6 tests de motifs de code statiques (contexte auth, passage INFO, suppression scope)
618
656
  - `test/cve-2026-48710-badhost/integration.test.js` — 4 tests d'intégration (résultats composites de bout en bout, projet propre, pas de fichiers Python)
657
+ - `test/trapdoor.test.js` — 40 tests de détection de la campagne TrapDoor (D1–D9 : marqueur de campagne, empreinte de charge utile, liste noire d'éditeur, exfiltration Gist, empoisonnement IA, nom leurre, primitives cryptographiques, clé XOR, validation d'identifiants)
658
+ - `test/node-ipc.test.js` — 37 tests de détection de compromission node-ipc (D1–D11 : liste noire de versions, hachage tarball, injection CJS, hachage de charge utile, motif DNS C2, résolveur d'amorçage, exfiltration DNS TXT, déclencheur d'exécution, artefacts temporaires, éditeur non autorisé, rayon d'impact)
659
+ - `test/msh-supplement.test.js` — 17 tests MSH supplement (obfuscation ctf-scramble-v2, démonisation, killswitch géographique, C2 dead-drop)
660
+ - `test/typosquat-vpmdhaj.test.js` — 16 tests campagne typosquattage (blocage mainteneur, détection préfixe, Levenshtein, stagers pré-installation, exfiltration identifiants AWS/ECS/Vault/GitHub)
661
+ - `test/axios-poisoning.test.js` — 13 tests empoisonnement Axios (liste noire versions, dépendance leurre, heuristique crypto, RAT multiplateforme, rappel C2)
619
662
  - `test/cli.test.js` — tests d'intégration commander (aide, version, scan, rapport, gestion d'erreurs)
620
663
 
621
664
  ### Besoin d'aide ?
package/README.ja.md CHANGED
@@ -25,7 +25,21 @@
25
25
 
26
26
  攻撃者は単純なタイポスクワッティングを超えています。今や彼らは**難読化されたプリインストールフック**、**環境検出の背後に隠れた認証情報窃取ツール**、**時間ベースのアクティベーションによる潜伏バックドア**、そしてピア依存関係を通じて拡散する**ワーム型の推移的伝播**を仕掛けています。
27
27
 
28
- **npm audit**は既知のCVEをチェックします。**Snyk**は脆弱性をスキャンします。**Socket**はパッケージの動作を分析します。しかし、これらは2025年に出現した攻撃——本番環境に到達するまで無害に見える攻撃——のために設計されたものではありません。
28
+ **Megalodonキャンペーン**(2026年)だけでも、偽のGitHub PR、悪意のあるワークフローインジェクション、クラウド認証情報の外部漏洩を介して5,500以上のリポジトリが侵害されました。**@lateos/npm-scan**はこのキャンペーンの痕跡を標準で検出します。
29
+
30
+ **Mini Shai-Huludワームキャンペーン**(2026年5月)は3つの波でnpmエコシステムを襲いました - TanStack CI/CDハイジャック(6分で84アーティファクト)、AntV/atoolメンテナー侵害(300以上のパッケージに600以上の悪意のあるバージョン)、およびNx Console VS Code拡張機能ポイズニング(CVE-2026-48027)- すべてctf-scramble-v2難読化、CI環境チェック付きデーモン化永続化、制裁対象地域を標的とした地理的キルスイッチ、トークンリカバリのためのGitHub C2 dead-dropチャネルを使用。**@lateos/npm-scan**は2つの検出スイートにわたる10のMini Shai-Huludシグナルすべてを検出します。
31
+
32
+ 増大する攻撃ベクトルは**HuggingFace組織のなりすまし**です。
33
+
34
+ **TrapDoorキャンペーン**(2026年5月)はnpm、PyPI、Crates.ioにまたがります。
35
+
36
+ **node-ipc侵害**(2026年5月14日)は期限切れのメンテナーメールドメインを悪用しました。
37
+
38
+ **大量タイポスクワッティングキャンペーン(vpmdhaj)**(2026年5月)は、`vpmdhaj` npmメンテナーアカウントを武器化し、4時間で14のタイポスクワッティングパッケージを公開しました - プリインストールステイジャー、Bunランタイム乱用、クラウド認証情報の外部漏洩でAWS/CI/CD環境を標的に。**@lateos/npm-scan**はタイポスクワッティングキャンペーンの3つのシグナルすべてを検出します。
39
+
40
+ **Axiosレジストリポイズニングキャンペーン**(2026年5月)は、npmレジストリのaxiosパッケージメタデータを侵害し、`axios@1.14.1`および`axios@0.30.4`を、クロスプラットフォームRATペイロードを含む注入された依存関係とともに公開しました。**@lateos/npm-scan**は3つのAxiosポイズニングシグナルすべてを検出します。
41
+
42
+ **npm audit**は既知のCVEをチェックします。**Snyk**は脆弱性をスキャンします。**Socket**はパッケージの動作を分析します。しかし、これらは2025年に出現した攻撃のために設計されたものではありません。
29
43
 
30
44
  **@lateos/npm-scan**はこの瞬間のために作られました。
31
45
 
@@ -43,6 +57,16 @@
43
57
  | 条件付きトリガー検出 (ATK-009) | ❌ | ❌ | ❌ | ✅ |
44
58
  | サンドボックス回避検出 (ATK-010) | ❌ | ❌ | ❌ | ✅ |
45
59
  | 推移的ワーム伝播 (ATK-011) | ❌ | ❌ | ❌ | ✅ |
60
+ | キャンペーン検出 (Megalodon CI/CD) | ❌ | ❌ | ❌ | ✅ |
61
+ | ワームキャンペーン検出 (Mini Shai-Hulud 波1-3) | ❌ | ❌ | ❌ | ✅ |
62
+ | HFモデルリポジトリなりすまし + READMEクローン | ❌ | ❌ | ❌ | ✅ |
63
+ | VS Code拡張機能サプライチェーンスキャン (--vsix) | ❌ | ❌ | ❌ | ✅ |
64
+ | Python脆弱性検出 (CVE-2026-48710 BadHost) | ❌ | ❌ | ❌ | ✅ |
65
+ | クロスエコシステム攻撃検出 (TrapDoor) | ❌ | ❌ | ❌ | ✅ |
66
+ | 期限切れドメインハイジャック検出 (node-ipc) | ❌ | ❌ | ❌ | ✅ |
67
+ | マルウェア難読化検出 (ctf-scramble-v2) | ❌ | ❌ | ❌ | ✅ |
68
+ | 大量タイポスクワッティングキャンペーン (vpmdhaj) | ❌ | ❌ | ❌ | ✅ |
69
+ | レジストリポイズニング検出 (axios偽バージョン) | ❌ | ❌ | ❌ | ✅ |
46
70
  | 攻撃分類 (ATKシリーズ) | ❌ | ❌ | ❌ | ✅ |
47
71
  | SBOM出力 (CycloneDX + SPDX) | ❌ | ✅ | ❌ | ✅ |
48
72
  | NIST 800-161コンプライアンス報告 | ❌ | ❌ | ❌ | ✅ |
@@ -62,6 +86,15 @@
62
86
  | 🕵️ | **ヒューリスティック静的解析** | ASTレベルの検査で、正規表現ベースのツールでは見逃す難読化、evalチェーン、環境プロービング、疑わしいライフサイクルスクリプトを捕捉 |
63
87
  | 🧠 | **行動検出** | 条件付きトリガー(時間ベース、CI認識)、サンドボックス回避、潜伏アクティベーションパターンを識別 |
64
88
  | 🧬 | **ATK攻撃分類** | NIST 800-161マッピング付き11の分類攻撃タイプ——バージョン管理、文書化、PR対応 |
89
+ | 🪱 | **ワームキャンペーン検出** | Mini Shai-Hulud - 2スイートにわたる10のサブチェック:バースト公開、兄弟妥協、SLSAアテステーション不一致、パブリッシャードリフト、IOCマッチ、トークン流出、ctf-scramble-v2難読化、デーモン化永続化、地理的キルスイッチ、GitHub C2 dead-drop |
90
+ | 🧩 | **VSIX拡張スキャン** | `npm-scan scan --vsix` - VS Code Marketplaceサプライチェーン攻撃を検出 |
91
+ | 🐍 | **Python脆弱性検出** | CVE-2026-48710 (BadHost) - Starlette Hostヘッダーインジェクション |
92
+ | 🪤 | **クロスエコシステム攻撃検出** | TrapDoor - 9サブチェック |
93
+ | 📡 | **期限切れドメインハイジャック検出** | node-ipc侵害 - 11サブチェック |
94
+ | ☣️ | **マルウェア難読化検出** | ctf-scramble-v2 - パッケージdist/libを既知のマルウェア難読化パターンについてスキャン、CRITICAL停止条件で即時分析停止 |
95
+ | 🎭 | **大量タイポスクワッティングキャンペーン検出** | vpmdhajメンテナーブロックリストと停止条件、Levenshteンベースのタイポスクワッティング検出、プリインストールステイジャー識別、AWS ECS/Vault/GitHub認証情報流出パターン |
96
+ | ☠️ | **レジストリポイズニング検出** | Axiosバージョンブロックリスト(1.14.1/0.30.4)と停止条件、デコイ依存関係発見(plain-crypto-js)、クロスプラットフォームRATペイロード検出 |
97
+ | 🔏 | **プロvenance監査証跡** | Aureus-Elicitor v1.7フレームワーク - HMAC-SHA256署名付き検出マニフェスト、コンテンツハッシュ検証済み監査証跡、ルールプロvenanceURL、キャンペーンソース属性 |
65
98
  | 📦 | **SBOM生成** | CycloneDX 1.5およびSPDX 2.3、発見項目は脆弱性として埋め込み |
66
99
  | 🧾 | **コンプライアンス報告** | NIST SP 800-161トレーサビリティマトリックス+EUサイバーレジリエンス法マッピング(無料) |
67
100
  | 🔌 | **SIEMエクスポート** | Splunk CEF、Elastic ECS、Microsoft Sentinel、IBM QRadar形式(プレミアム) |
@@ -224,6 +257,11 @@ npm-scan report --pdf # すべてのスキャン(プレミアム
224
257
  | **ATK-010** | サンドボックス回避/アンチ解析 | 行動 | 🟠 中 | SR-10.3 |
225
258
  | **ATK-011** | 推移的伝播(ワーム型横方向拡散) | 行動 | 🔴 高 | SR-11.4 |
226
259
  | **CVE-2026-48710** | BadHost — Starlette Host ヘッダーインジェクション認証バイパス (CVE-2026-48710, CVSS 7.0)。Python 依存関係バージョン検出 (requirements.txt, pyproject.toml, poetry.lock, Pipfile, setup.py/cfg)、推移的ヒューリスティック (15 の既知ダウンストリームパッケージ:fastapi, vllm, litellm, MCP サーバー等)、auth/middleware コンテキストでの危険な `request.url.path` 使用の静的コードパターンスキャン、`request.scope["path"]` による抑制対応 | 静的 + レジストリ | 🔴 高 / 🟠 中 / ℹ️ 情報 | SR-3.1, SR-5.3 |
260
+ | **TRAPDOOR** | TrapDoor クロスエコシステム攻撃キャンペーン — キャンペーンマーカー P-2024-001、trap-core.js ペイロードフィンガープリント、パブリッシャーブロックリスト asdxzxc、Gist ベースの認証情報流出、AI コンテキストポイズニング(ゼロ幅 Unicode)、暗号資産/DeFi ルアー名、Fernet+ECDH 暗号化、XOR キー cargo-build-helper-2026、STS/GitHub API 認証情報検証 | 静的 + レジストリ | 🟠 中 / 🔴 高 / ⚫ クリティカル | SR-3.1, SR-5.3, SR-7.5 |
261
+ | **NODE_IPC_COMPROMISE** | node-ipc サプライチェーン侵害(2026年5月14日)— バージョンブロックリスト (9.1.6/9.2.3/12.0.1) と安全な固定、tarball SHA-256 検証、CJS ペイロード IIFE インジェクション、非標準ポート DNS C2 パターン、ブートストラップリゾルバー sh.azurestaticprovider.net、DNS TXT 流出ゾーン bt.node.js、setImmediate() ランタイムトリガー、~/nt-*/ ステージングアーティファクト、未承認パブリッシャー atiertant、ロックファイル影響範囲検出と安全な固定推奨 | 静的 + レジストリ | ⚫ クリティカル | SR-3.1, SR-5.3, SR-7.5 |
262
+ | **MSH_SUPPLEMENT** | Mini Shai-Hulud補足 - ctf-scramble-v2難読化(一致で停止)、デーモン化永続化、地理的キルスイッチ検出(ru_RU/be_BY)、C2 dead-drop指標(OhNoWhatsGoingOnWithGitHub) | 静的+行動 | ⚫ クリティカル | SR-3.1, SR-7.5, SR-9.2 |
263
+ | **TYPOSQUAT_VPMDHAJ** | 大量タイポスクワッティングキャンペーン(vpmdhaj) - メンテナーブロックリスト(一致で停止)、vpmdhaj-*名前空間プレフィックス検出、Levenshteinタイポスクワッティング、プリインストールステイジャー、クラウド認証情報流出(AWS IMDSv2、ECS、Vault、GitHub) | 静的+レジストリ | ⚫ クリティカル | SR-2.1, SR-3.1, SR-5.3 |
264
+ | **AXIOS_POISONING** | Axiosレジストリポイズニング - バージョンブロックリスト(1.14.1/0.30.4、一致で停止)、デコイ依存関係インジェクション(plain-crypto-js)、クロスプラットフォームRATペイロード検出(PowerShell、launchd、systemd、DLL、C2) | 静的+行動 | ⚫ クリティカル | SR-3.1, SR-5.3, SR-7.5 |
227
265
 
228
266
  > **回避型攻撃の捕捉方法:** ATK-009は`process.env.CI`をチェックする、ホスト名をプローブする、または時間ベースのアクティベーションを使用するパッケージを検出します。ATK-010は`debugger`文、`os.hostname()`プローブ、環境フィンガープリンティングをフラグ付けします。ATK-011はピア依存関係グラフをトレースしてワーム型伝播パターンを検出します。
229
267
  > 完全な回避面のドキュメントとPoC例については、[`docs/attack-taxonomy.md`](docs/attack-taxonomy.md)を参照してください。
@@ -545,7 +583,7 @@ npm-scan report --html > report.html
545
583
 
546
584
  ### 無料版(出荷済み)
547
585
 
548
- - 全11ATK検出器(静的+行動)+ **MEGALODON** + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** + **VSIX_SCAN** + **CVE-2026-48710 (BadHost)**
586
+ - 全11ATK検出器(静的+行動)+ **MEGALODON**(D1-D6)+ **HF_IMPERSONATION** + **MINI_SHAI_HULUD**(D1-D7、3波、**MSH_SUPPLEMENT** D1-D4含む)+ **VSIX_SCAN**(6検出器)+ **CVE-2026-48710(BadHost)**(3層)+ **TRAPDOOR**(9ルール)+ **NODE_IPC_COMPROMISE**(11ルール)+ **TYPOSQUAT_VPMDHAJ**(3ルール)+ **AXIOS_POISONING**(3ルール)
549
587
  - SBOM出力(CycloneDX + SPDX)
550
588
  - HTML、テキスト、コンプライアンスレポート(NIST + EU CRA)
551
589
  - ポリシー・アズ・コードエンジン(YAML)
@@ -612,6 +650,11 @@ node --test test/detectors-corpus.test.js
612
650
  - `test/cve-2026-48710-badhost/transitive.test.js` — 7の推移的依存関係テスト(Tier 1/2, fastapiバージョンゲーティング, 固定抑制)
613
651
  - `test/cve-2026-48710-badhost/codePattern.test.js` — 6の静的コードパターンテスト(authコンテキスト, INFOフォールスルー, scope抑制)
614
652
  - `test/cve-2026-48710-badhost/integration.test.js` — 4の統合テスト(エンドツーエンド複合発見項目, クリーンプロジェクト, Pythonファイルなし)
653
+ - `test/trapdoor.test.js` — 40のTrapDoorキャンペーン検出テスト(D1–D9:キャンペーンマーカー、ペイロードフィンガープリント、パブリッシャーブロックリスト、Gist流出、AIポイズニング、ルアー名、暗号プリミティブ、XORキー、認証情報検証)
654
+ - `test/node-ipc.test.js` — 37のnode-ipc侵害検出テスト(D1–D11:バージョンブロックリスト、tarballハッシュ、CJSインジェクション、ペイロードハッシュ、DNS C2パターン、ブートストラップリゾルバー、DNS TXT流出、ランタイムトリガー、一時アーティファクト、未承認パブリッシャー、影響範囲)
655
+ - `test/msh-supplement.test.js` — 17 MSH補足テスト(ctf-scramble-v2停止、デーモン化、地理的キルスイッチ、C2 dead-drop)
656
+ - `test/typosquat-vpmdhaj.test.js` — 16タイポスクワッティングキャンペーンテスト(メンテナーブロック、プレフィックス検出、Levenshtein、プリインストールステイジャー、Bunローダー、AWS/ECS/Vault/GitHub認証情報流出)
657
+ - `test/axios-poisoning.test.js` — 13 Axiosポイズニングテスト(バージョンブロックリスト停止、デコイ依存関係、暗号ヒューリスティック、クロスプラットフォームRAT、C2コールバック)
615
658
  - `test/cli.test.js` — commander統合テスト(ヘルプ、バージョン、スキャン、レポート、エラーハンドリング)
616
659
 
617
660
  ### ヘルプが必要ですか?
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@lateos/npm-scan?style=flat-square)](https://www.npmjs.com/package/@lateos/npm-scan)
4
4
  [![License](https://img.shields.io/badge/license-Apache%202.0%20%2B%20Commons%20Clause-blue?style=flat-square)](LICENSING.md)
5
5
  [![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square)](package.json)
6
- [![Tests](https://img.shields.io/badge/tests-459%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
6
+ [![Tests](https://img.shields.io/badge/tests-536%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
7
7
  [![Coverage](https://img.shields.io/badge/coverage-90%25-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
8
8
  [![Docker](https://img.shields.io/badge/docker-lateos%2Fnpm--scan-2496ED?style=flat-square&logo=docker)](https://hub.docker.com/r/lateos/npm-scan)
9
9
  [![Sigstore](https://img.shields.io/static/v1?label=Sigstore&message=Provenance&color=green&style=flat-square&logo=sigstore)](https://github.com/lateos-ai/npm-scan/actions/workflows/publish.yml)
@@ -28,6 +28,16 @@ A growing attack vector is **HuggingFace org impersonation** — packages that m
28
28
 
29
29
  The **Megalodon campaign** (2026) alone compromised 5,500+ repositories via fake GitHub PRs, malicious workflow injection, and cloud credential exfiltration — all coordinated through a single actor automating the entire kill chain. **@lateos/npm-scan** now detects artifacts of this campaign out of the box.
30
30
 
31
+ The **Mini Shai-Hulud worm campaign** (May 2026) hit the npm ecosystem in three waves — TanStack CI/CD hijack (84 artifacts in 6 minutes), AntV/atool maintainer compromise (600+ malicious versions across 300+ packages), and Nx Console VS Code extension poisoning (CVE-2026-48027) — all using ctf-scramble-v2 obfuscation, daemonized persistence with CI environment checks, geographic killswitches targeting sanctioned regions, and GitHub C2 dead-drop channels for token recovery. **@lateos/npm-scan** now detects all 10 Mini Shai-Hulud signals across two detector suites.
32
+
33
+ The **TrapDoor campaign** (May 2026) spans npm, PyPI, and Crates.io — 34 malicious packages, 384+ versions attributed to a single publisher, targeting crypto, DeFi, Solana, and AI developers with Fernet + ECDH encrypted payloads, AI context poisoning via zero-width Unicode injection in `.cursorrules`/`CLAUDE.md`, and credential live-validation against AWS STS and GitHub API before exfiltration. **@lateos/npm-scan** now detects all 9 TrapDoor signals.
34
+
35
+ The **node-ipc compromise** (May 14, 2026) weaponized an expired maintainer email domain to hijack one of npm's most depended-upon packages (822K weekly downloads). Three malicious versions (9.1.6, 9.2.3, 12.0.1) delivered an 80KB credential stealer via DNS TXT tunneling — no HTTP, no postinstall hook, invisible to HTTP-layer firewalls. **@lateos/npm-scan** now detects all 11 node-ipc compromise signals.
36
+
37
+ The **Mass Typosquatting campaign (vpmdhaj)** (May 2026) weaponized the `vpmdhaj` npm maintainer account to publish 14 typosquatted packages in a 4-hour window — targeting AWS/CI/CD environments with preinstall stagers (`setup.mjs`, `stager.js`), Bun runtime abuse, and cloud credential exfiltration (AWS IMDSv2, ECS task roles, Vault, GitHub tokens). **@lateos/npm-scan** now detects all 3 typosquatting campaign signals.
38
+
39
+ The **Axios Registry Poisoning campaign** (May 2026) compromised the npm registry's axios package metadata to publish `axios@1.14.1` and `axios@0.30.4` with injected dependencies (`plain-crypto-js`) containing cross-platform RAT payloads with C2 callbacks, process injection, and system persistence. **@lateos/npm-scan** now detects all 3 axios poisoning signals.
40
+
31
41
  Critical infrastructure vulnerabilities in the Python ecosystem are also in scope. The **BadHost (CVE-2026-48710)** vulnerability in Starlette < 1.0.1 enables authentication bypass via unvalidated HTTP Host header injection, affecting FastAPI, vLLM, LiteLLM, MCP servers, and any project using Starlette transitively — now detected across Python manifests, transitive dependency chains, and source code patterns in a single scan.
32
42
 
33
43
  **npm audit** checks known CVEs. **Snyk** scans for vulnerabilities. **Socket** looks at package behavior. None of them were designed for the generation of attacks that emerged in 2025 — attacks that look benign until they reach production.
@@ -53,6 +63,11 @@ Critical infrastructure vulnerabilities in the Python ecosystem are also in scop
53
63
  | HF model repo impersonation + README clone | ❌ | ❌ | ❌ | ✅ |
54
64
  | VS Code extension supply chain scan (--vsix) | ❌ | ❌ | ❌ | ✅ |
55
65
  | Python vulnerability detection (CVE-2026-48710 BadHost) | ❌ | ❌ | ❌ | ✅ |
66
+ | Cross-ecosystem attack detection (TrapDoor) | ❌ | ❌ | ❌ | ✅ |
67
+ | Expired-domain hijack detection (node-ipc) | ❌ | ❌ | ❌ | ✅ |
68
+ | Malware obfuscation detection (ctf-scramble-v2) | ❌ | ❌ | ❌ | ✅ |
69
+ | Mass typosquatting campaign (vpmdhaj maintainer) | ❌ | ❌ | ❌ | ✅ |
70
+ | Registry poisoning detection (axios fake versions) | ❌ | ❌ | ❌ | ✅ |
56
71
  | Attack taxonomy (ATK series) | ❌ | ❌ | ❌ | ✅ |
57
72
  | SBOM output (CycloneDX + SPDX) | ❌ | ✅ | ❌ | ✅ |
58
73
  | SARIF v2.1 (GitHub Code Scanning) | ❌ | ❌ | ❌ | ✅ |
@@ -76,6 +91,12 @@ Critical infrastructure vulnerabilities in the Python ecosystem are also in scop
76
91
  | 🪱 | **Worm campaign detection** | Mini Shai-Hulud — 6 sub-checks detecting burst publish, sibling compromise, SLSA attestation mismatch, publisher drift, IOC match, and token exfil across 3 waves (TanStack, AntV/atool, Nx Console) |
77
92
  | 🧩 | **VSIX extension scanning** | `npm-scan scan --vsix nrwl.angular-console` — detects VS Code Marketplace supply chain attacks: burst publish, publisher anomaly, activation event risk, orphan commit fetch, known IOC, and exfil patterns (Nx Console 18.95.0 CVE-2026-48027) |
78
93
  | 🐍 | **Python vulnerability detection** | CVE-2026-48710 (BadHost) — Starlette Host header injection across 6 Python manifest formats, 15 transitive downstream packages (fastapi, vllm, litellm, MCP), and static `request.url.path` code pattern analysis with `scope["path"]` suppression |
94
+ | 🪤 | **Cross-ecosystem attack detection** | TrapDoor — 9 sub-checks: campaign marker P-2024-001, trap-core.js payload fingerprint, publisher blocklist asdxzxc, Gist-based credential exfil, AI config zero-width Unicode poisoning, crypto/DeFi lure name heuristic, Fernet+ECDH encryption, XOR key cargo-build-helper-2026, STS/GitHub API credential validation |
95
+ | 📡 | **Expired-domain hijack detection** | node-ipc compromise — version blocklist (9.1.6/9.2.3/12.0.1), tarball SHA-256 verification, CJS vs ESM size anomaly with IIFE injection, DNS-over-non-standard-port C2, bootstrap resolver sh.azurestaticprovider.net, DNS TXT exfil zone bt.node.js, setImmediate() runtime trigger, ~/nt-*/ staging artifacts, unauthorized publisher atiertant, lockfile blast-radius with safe pin recommendations |
96
+ | ☣️ | **Malware obfuscation detection** | ctf-scramble-v2 detection — scans package dist/lib for known malware obfuscation patterns (ctf-scramble-v2, ctf-scramble-v3), halts analysis immediately with max severity CRITICAL stop condition |
97
+ | 🎭 | **Mass typosquatting campaign detection** | vpmdhaj maintainer blocklist with stop condition, levenshtein-based typosquat detection (opensearch-setup, env-config-manager), preinstall stager identification (setup.mjs, stager.js, Bun runner), AWS ECS/Vault/GitHub credential exfiltration patterns |
98
+ | ☠️ | **Registry poisoning detection** | Axios version blocklist (1.14.1/0.30.4) with stop condition, decoy dependency discovery (plain-crypto-js), cross-platform RAT payload detection (DLL injection, launchd/systemd/cron persistence, PowerShell IEX, C2 callbacks) |
99
+ | 🔏 | **Provenance audit trail** | Aureus-Elicitor v1.7 framework — HMAC-SHA256 signed detection manifests, content-hash verified audit trails, rule provenance URLs, campaign source attribution. Every finding includes cryptographically verifiable provenance metadata |
79
100
  | 📦 | **SBOM generation** | CycloneDX 1.5 and SPDX 2.3 with findings embedded as vulnerabilities |
80
101
  | 🔍 | **SARIF output** | GitHub Advanced Security / CodeQL compatible SARIF v2.1 — shows findings directly in Security tab |
81
102
  | 🧾 | **Compliance reporting** | NIST SP 800-161 traceability matrix + EU Cyber Resilience Act mapping (free tier) |
@@ -286,6 +307,11 @@ npm-scan report --pdf # all scans (premium)
286
307
  | **MINI_SHAI_HULUD** | Mini Shai-Hulud worm campaign — burst publish velocity (≥3 versions/30 min), co-temporal sibling compromise, SLSA attestation mismatch (sub-60s gap, first-ever, builder mismatch), publisher drift (<10 min account change), IOC match (scope/sha512/publisher from seed file), token exfil (NPM_TOKEN/.npmrc/atob patterns), Nx Console downstream detection | Static + Registry | 🔴 high / ⚫ critical | SR-3.1, SR-7.5 |
287
308
  | **VSIX_SCAN** | VS Code extension supply chain scan — burst publish (≥2 versions/30 min, hot-pull <20 min), publisher anomaly (account substitution, new-account on high-install ext, 15-min add+publish), activation event risk (onStartupFinished→HIGH, *→CRITICAL, escalation on shell keywords), orphan commit fetch (GitHub API SHA refs, npx git URL, MCP-disguised exfil, Bun install), known IOC (extensionId/publisherAccount/commit hash from seed), exfil patterns (cred paths, DNS tunneling, AES+RSA, anti-analysis, Bun APIs) | Static + Registry | 🟠 medium / 🔴 high / ⚫ critical | SR-3.1, SR-5.3 |
288
309
  | **CVE-2026-48710** | BadHost — Starlette authentication bypass via Host header injection (CVE-2026-48710, CVSS 7.0). Python dependency version detection (requirements.txt, pyproject.toml, poetry.lock, Pipfile, setup.py/cfg), transitive heuristic (15 known downstream packages: fastapi, vllm, litellm, MCP servers, etc.), static code pattern scan for dangerous `request.url.path` usage in auth/middleware context with `request.scope["path"]` suppression | Static + Registry | 🔴 high / 🟠 medium / ℹ️ info | SR-3.1, SR-5.3 |
310
+ | **TRAPDOOR** | TrapDoor cross-ecosystem attack — campaign marker P-2024-001 in files, shared payload trap-core.js filename/48,485-byte fingerprint, publisher blocklist asdxzxc, Gist-based credential exfil (ddjidd564.github.io + credential paths), AI context poisoning via zero-width Unicode in .cursorrules/CLAUDE.md, crypto/DeFi lure name heuristic (<30 days), Fernet+ECDH crypto primitives in postinstall, XOR key cargo-build-helper-2026 in lockfiles, STS/GitHub API credential validation in postinstall | Static + Registry | 🟠 medium / 🔴 high / ⚫ critical | SR-3.1, SR-5.3, SR-7.5 |
311
+ | **NODE_IPC_COMPROMISE** | node-ipc supply chain compromise (May 14, 2026) — version blocklist (9.1.6/9.2.3/12.0.1) with safe pins, tarball SHA-256 verification, CJS payload IIFE injection detection (CJS>ESM size differential), injected payload hash match, DNS-over-non-standard-port C2 (setServers + custom resolver), bootstrap resolver sh.azurestaticprovider.net + C2 IP 37.16.75.69, DNS TXT exfiltration zone bt.node.js, setImmediate() runtime trigger, ~/nt-*/ staging artifact detection, unauthorized publisher atiertant, lockfile blast-radius detection with pin recommendations | Static + Registry | ⚫ critical | SR-3.1, SR-5.3, SR-7.5 |
312
+ | **MSH_SUPPLEMENT** | Mini Shai-Hulud supplement — ctf-scramble-v2 obfuscation (HALT on match), daemonization persistence (spawn detached, systemd, cron, launchd, Task Scheduler), geographic killswitch detection (ru_RU/be_BY locale checks via process.env.LANG/LC_ALL/Intl.DateTimeFormat), C2 dead-drop indicators (OhNoWhatsGoingOnWithGitHub keyword, GitHub commit scraping + token exfiltration co-occurrence) | Static + Behavioral | ⚫ critical | SR-3.1, SR-7.5, SR-9.2 |
313
+ | **TYPOSQUAT_VPMDHAJ** | Mass Typosquatting campaign (vpmdhaj) — maintainer blocklist (HALT on match), vpmdhaj-* namespace prefix detection, levenshtein typosquat matching vs popular packages, preinstall stager identification (setup.mjs/stager.js/bun run with generation tracking), cloud credential exfiltration (AWS IMDSv2, ECS task role tokens, Vault credentials, GITHUB_TOKEN/GH_TOKEN with HTTP exfil) | Static + Registry | ⚫ critical | SR-2.1, SR-3.1, SR-5.3 |
314
+ | **AXIOS_POISONING** | Axios Registry Poisoning — version blocklist (1.14.1/0.30.4, HALT on match), decoy dependency injection (plain-crypto-js), crypto-dependency heuristic in non-crypto packages, cross-platform RAT payload detection (PowerShell IEX, launchd, systemd, cron, DLL/LoadLibrary, CreateRemoteThread, binary drops to temp dirs, C2 callbacks) | Static + Behavioral | ⚫ critical | SR-3.1, SR-5.3, SR-7.5 |
289
315
 
290
316
  > **How evasive attacks are caught:** ATK-009 detects packages that check `process.env.CI`, probe hostnames, or use time-based activation. ATK-010 flags `debugger` statements, `os.hostname()` probes, and env fingerprinting. ATK-011 traces peer dependency graphs to detect worm-like propagation patterns.
291
317
  > **MEGALODON** campaign detection analyzes bundled `.github/workflows/` files for C2 co-occurrence and base64 decode chains, scans tarball files for credential + outbound network patterns, detects version publish velocity spikes via npm registry metadata, and identifies publisher account drift — all without any network calls beyond the initial package fetch.
@@ -293,6 +319,11 @@ npm-scan report --pdf # all scans (premium)
293
319
  > **MINI_SHAI_HULUD** worm campaign detection uses a lazy two-stage evaluation: Stage 1 runs burst velocity, publisher drift, IOC, and token exfil checks (in-memory, no network). If burst triggers, Stage 2 queries npm attestation endpoints for SLSA anomalies and fetches sibling package registry metadata for co-temporal burst detection. Composite finding includes wave attribution (wave1-tanstack, wave2-antv, wave3-nx-console) and critical severity when SLSA or IOC match. NX_CONSOLE_DOWNSTREAM (D7) flags npm packages with `@nx/*` dependencies and checks for `nrwl.angular-console` in `.vscode/extensions.json`.
294
320
  > **VSIX_SCAN** extension scanning wraps both VS Code Marketplace and Open VSX registries with rate-limited (10 req/min), cached (5 min TTL) API clients. All 6 detectors run asynchronously and aggregate into a single composite `VSIX_SCAN` finding. Zero extension code is executed — all analysis is static regex/text-pattern matching. No Bun installation required for Bun pattern detection.
295
321
  > **CVE-2026-48710 (BadHost)** detection uses three independent layers: Layer 1 parses 6 Python manifest formats (requirements.txt, pyproject.toml, poetry.lock, Pipfile, setup.py, setup.cfg) with PEP 440 semver-aware version comparison. Layer 2 scans for 15 known Starlette-downstream packages with Tier 1 (HIGH confidence) and Tier 2 (MEDIUM confidence) transitive heuristics, suppressed by explicit `starlette >= 1.0.1` pin. Layer 3 performs function-boundary static analysis on `.py` files for `request.url.path` usage, escalating to MEDIUM severity in auth/middleware contexts and suppressing when `request.scope["path"]` is used in the same function.
322
+ > **TRAPDOOR** campaign detection runs 9 sub-detectors across all package files (README.md, package.json, .md, shell scripts, .cursorrules, CLAUDE.md) for the hardcoded marker P-2024-001, scans for trap-core.js by filename or exact 48,485-byte size, unconditionally blocks publisher asdxzxc, detects outbound references to ddjidd564.github.io or gist.github.com combined with credential-path patterns, scans .cursorrules and CLAUDE.md for zero-width Unicode characters (U+200B, U+200C, U+200D, U+FEFF), flags crypto/DeFi-themed packages <30 days old with no prior version history, detects simultaneous Fernet and ECDH/createECDH usage in postinstall JS, and identifies sts.amazonaws.com and api.github.com/user calls in postinstall hooks.
323
+ > **NODE_IPC_COMPROMISE** detection intercepts the expired-domain takeover attack across 11 dimensions: version blocklist with safe-pin recommendations (9.1.5 for 9.x, 12.0.0 for 12.x), tarball SHA-256 hash verification against known malicious hashes, CJS vs ESM size comparison with IIFE suffix pattern detection for injected payload identification, DNS resolver pattern analysis (dns.promises.Resolver + setServers with non-public IP + resolveTxt), bootstrap domain and C2 IP detection, resolveTxt() with bt.node.js zone references, setImmediate() runtime trigger detection, ~/nt-*/ staging artifact path identification, publisher account verification against unauthorized account atiertant, and lockfile scanning for compromised version resolution with safe-pin suggestions.
324
+ > **MSH_SUPPLEMENT** detection augments the existing Mini Shai-Hulud worm campaign with 4 additional sub-detectors: D1 scans all extracted JS files for `require('ctf-scramble-v2')` or `import 'ctf-scramble-v2'` patterns (including variant ctf-scramble-v3+) and returns a CRITICAL stop condition that halts all further scanning. D2 scans lifecycle scripts (preinstall/install/postinstall) for daemonization APIs (`daemon()`, `fork()`, `spawn({detached: true})`), persistence mechanisms (systemd unit files, crontab, launchd plists, Windows Task Scheduler), and CI environment guards (`!process.env.CI`, `process.env.CI === undefined`). D3 scans code for geographic locale checks targeting sanctioned regions (`ru_RU`, `be_BY`) via `process.env.LANG`, `process.env.LC_ALL`, and `Intl.DateTimeFormat().resolvedOptions().timeZone` with `process.exit(0)` silent termination. D4 detects C2 dead-drop indicators including the hardcoded `OhNoWhatsGoingOnWithGitHub` keyword and co-occurring GitHub token access + GitHub API commit scraping patterns. All sub-detectors produce provenance-attached findings with HMAC-SHA256 signed audit trails.
325
+ > **TYPOSQUAT_VPMDHAJ** campaign detection uses 3 sub-detectors: D1 checks the npm registry metadata for the blocked maintainer `vpmdhaj` (CRITICAL stop condition), scans package names for the `vpmdhaj-*` prefix namespace, and runs levenshtein edit-distance matching against a blocklist of popular packages to detect typosquats (e.g., `env-config-manager` mimicking dotenv, `opensearch-setup` mimicking OpenSearch). D2 scans `package.json` for suspicious `preinstall` lifecycle hooks (unusual — most packages use postinstall), detects `setup.mjs`, `loader.js`, and `stager.js` entry points, and identifies Bun runtime abuse (`bun run stager.js`) as a stealthy loader technique. D3 scans all extracted files for cloud credential exfiltration patterns targeting AWS IMDSv2 (`169.254.169.254`), ECS task role tokens (`AWS_CONTAINER_AUTHORIZATION_TOKEN`, `AWS_CONTAINER_CREDENTIALS_FULL_URI`), HashiCorp Vault (`VAULT_ADDR`, `VAULT_TOKEN`), and GitHub Actions tokens (`GITHUB_TOKEN`, `GH_TOKEN`) combined with HTTP POST exfiltration or base64 obfuscation to attacker-controlled domains. All findings include provenance metadata with HMAC-SHA256 signed manifests.
326
+ > **AXIOS_POISONING** campaign detection uses 3 sub-detectors: D1 checks the package name and version against a hardcoded blocklist of known-malicious axios versions (`1.14.1`, `0.30.4`) with a CRITICAL stop condition that halts all scanning on match. D2 scans axios `package.json` dependencies for injected decoy packages (`plain-crypto-js`), and applies a heuristic that flags crypto-related dependency additions in non-crypto packages as potentially malicious pre-staged decoys. D3 scans all files and lifecycle scripts for cross-platform RAT indicators: Windows (PowerShell `IEX`, `Invoke-Expression`, `cmd.exe`, binary `.exe` drops to temp dirs), macOS (launchd plist installation via `launchctl load/start`), Linux (systemd unit files, crontab persistence), process injection APIs (`CreateRemoteThread`, `VirtualAllocEx`, `LoadLibrary`/`dlopen`), and C2 network callbacks via HTTP/HTTPS/WebSocket to attacker-controlled servers. Only suspicious code patterns (curl, wget, fetch, exec, spawn, eval, etc.) in lifecycle hooks trigger D3 — legitimate build scripts are not flagged.
296
327
  > See [`docs/attack-taxonomy.md`](docs/attack-taxonomy.md) for full evasion surface documentation and PoC examples.
297
328
 
298
329
  ---
@@ -377,6 +408,11 @@ Campaign detectors use seed IOC files for known-malicious fingerprints:
377
408
  | IOC File | Detector | Types |
378
409
  |----------|----------|-------|
379
410
  | `backend/detectors/mini-shai-hulud/iocs.json` | Mini Shai-Hulud (Waves 1–3) | `packageScope`, `publisherAccount`, `sha512`, `extensionId` |
411
+ | `backend/detectors/trapdoor/iocs.json` | TrapDoor | `publisherAccount`, `campaignMarker`, `payloadFilename`, `payloadSize`, `xorKey`, `c2Domain`, `gistDomain` |
412
+ | `backend/detectors/node-ipc-compromise/iocs.json` | node-ipc compromise | `publisherAccount`, `c2Domain`, `c2IP`, `exfilZone`, `payloadHash` |
413
+ | `backend/detectors/msh-supplement/` | MSH Supplement | `obfuscationPattern`, `persistenceApi`, `targetedLocale`, `c2Keyword` |
414
+ | `backend/detectors/typosquat-vpmdhaj/` | Typosquat vpmdhaj | `blockedMaintainer`, `typosquatTarget`, `loaderPattern`, `credTarget` |
415
+ | `backend/detectors/axios-poisoning/` | Axios Poisoning | `blockedVersion`, `decoyDependency`, `ratPlatform`, `ratApi` |
380
416
  | `backend/vsix-scan/vsix-iocs.json` | VSIX extension scan | `extensionId`, `publisherAccount`, `orphanCommitHash` |
381
417
 
382
418
  IOC files follow a unified schema (`iocs: [{ type, value, ... }]`) and are loaded at module init. Update them from your threat intel feed to extend detection coverage without code changes.
@@ -651,7 +687,7 @@ See the [Docker quick-start section](#-run-lateosnpm-scan-anywhere-with-docker--
651
687
 
652
688
  ### Free tier (shipped)
653
689
 
654
- - All 11 ATK detectors + **MEGALODON** CI/CD campaign detection (D1–D6) + **HF_IMPERSONATION** detector + **MINI_SHAI_HULUD** worm campaign (D1–D7, 3 waves) + **VSIX_SCAN** extension supply chain scan (6 detectors) + **CVE-2026-48710 (BadHost)** Python vulnerability detection (3 layers)
690
+ - All 11 ATK detectors + **MEGALODON** CI/CD campaign detection (D1–D6) + **HF_IMPERSONATION** detector + **MINI_SHAI_HULUD** worm campaign (D1–D7, 3 waves, with **MSH_SUPPLEMENT** D1–D4 for obfuscation/persistence/geofence/C2) + **VSIX_SCAN** extension supply chain scan (6 detectors) + **CVE-2026-48710 (BadHost)** Python vulnerability detection (3 layers) + **TRAPDOOR** cross-ecosystem attack detection (9 rules) + **NODE_IPC_COMPROMISE** expired-domain hijack detection (11 rules) + **TYPOSQUAT_VPMDHAJ** mass typosquatting campaign (3 rules) + **AXIOS_POISONING** registry poisoning campaign (3 rules)
655
691
  - SBOM output (CycloneDX + SPDX)
656
692
  - HTML, text, and compliance reports (NIST + EU CRA)
657
693
  - Policy-as-code engine (YAML)
@@ -734,6 +770,11 @@ node --test test/detectors-corpus.test.js
734
770
  - `test/cve-2026-48710-badhost/transitive.test.js` — 7 transitive dependency tests (Tier 1/2, fastapi version gating, pin suppression)
735
771
  - `test/cve-2026-48710-badhost/codePattern.test.js` — 6 static code pattern tests (auth context, INFO fallthrough, scope suppression)
736
772
  - `test/cve-2026-48710-badhost/integration.test.js` — 4 integration tests (end-to-end composite findings, clean project, no Python files)
773
+ - `test/trapdoor.test.js` — 40 TrapDoor campaign detection tests (D1–D9: campaign marker, payload fingerprint, publisher blocklist, Gist exfil, AI poisoning, lure name, crypto primitives, XOR key, credential validation)
774
+ - `test/node-ipc.test.js` — 37 node-ipc compromise detection tests (D1–D11: version blocklist, tarball hash, CJS injection, payload hash, DNS C2 pattern, bootstrap resolver, DNS TXT exfil, runtime trigger, temp artifact, unauthorized publisher, blast radius)
775
+ - `test/msh-supplement.test.js` — 17 MSH supplement tests (ctf-scramble-v2 stop, daemonization, geo killswitch, C2 dead-drop, provenance, false positives)
776
+ - `test/typosquat-vpmdhaj.test.js` — 16 typosquatting campaign tests (maintainer block, prefix detection, levenshtein, preinstall stagers, Bun loader, AWS/ECS/Vault/GitHub cred exfil)
777
+ - `test/axios-poisoning.test.js` — 13 axios poisoning tests (version blocklist stop, decoy dependency, crypto heuristic, cross-platform RAT, C2 callback)
737
778
  - `test/cli.test.js` — commander integration tests (help, version, scan, report, error handling)
738
779
  - `test/cli-lockfile.test.js` — scan-lockfile CLI options, yarn/pnpm/monorepo/watch tests
739
780
 
package/README.zh.md CHANGED
@@ -25,7 +25,21 @@
25
25
 
26
26
  攻击者早已超越简单的域名抢注。他们现在投放的是**混淆的预安装钩子**、**隐藏在环境检测背后的凭证窃取器**、**基于时间激活的潜伏后门**,以及通过同级依赖传播的**蠕虫式传递传播**。
27
27
 
28
- **npm audit** 检查已知 CVE。**Snyk** 扫描漏洞。**Socket** 分析包行为。但它们都不是为了应对 2025 年涌现的攻击而设计的——那些在进入生产环境之前看似无害的攻击。
28
+ **Megalodon 活动**(2026 年)仅一次活动就通过虚假 GitHub PR、恶意工作流注入和云凭证外泄,攻陷了 5,500+ 个仓库。**@lateos/npm-scan** 现可开箱即用地检测此活动的痕迹。
29
+
30
+ **Mini Shai-Hulud 蠕虫活动**(2026 年 5 月)分三波冲击 npm 生态系统——TanStack CI/CD 劫持(6 分钟内 84 个工件)、AntV/atool 维护者账户沦陷(300+ 个包中 600+ 个恶意版本)、以及 Nx Console VS Code 扩展投毒(CVE-2026-48027)——全部使用 ctf-scramble-v2 混淆、带 CI 环境检查的守护化持久化、针对受制裁区域的地理围栏终止开关,以及用于令牌恢复的 GitHub C2 死信通道。**@lateos/npm-scan** 现可检测横跨两个检测套件的全部 10 个 Mini Shai-Hulud 信号。
31
+
32
+ 一个不断增长的攻击向量是 **HuggingFace 组织冒充**。
33
+
34
+ **TrapDoor 活动**(2026 年 5 月)横跨 npm、PyPI 和 Crates.io。
35
+
36
+ **node-ipc 沦陷**(2026 年 5 月 14 日)利用了一个过期的维护者邮箱域名。
37
+
38
+ **大规模域名抢注活动(vpmdhaj)**(2026 年 5 月)武器化了 `vpmdhaj` npm 维护者账户,在 4 小时内发布了 14 个域名抢注包——使用预安装加载器、Bun 运行时滥用和云凭证外泄,瞄准 AWS/CI/CD 环境。**@lateos/npm-scan** 现可检测全部 3 个域名抢注活动信号。
39
+
40
+ **Axios 注册表投毒活动**(2026 年 5 月)攻陷了 npm 注册表的 axios 包元数据,发布了包含跨平台 RAT 恶意载荷的 `axios@1.14.1` 和 `axios@0.30.4`。**@lateos/npm-scan** 现可检测全部 3 个 Axios 投毒信号。
41
+
42
+ **npm audit** 检查已知 CVE。**Snyk** 扫描漏洞。**Socket** 分析包行为。但它们都不是为了应对 2025 年涌现的攻击而设计的。
29
43
 
30
44
  **@lateos/npm-scan** 为此而生。
31
45
 
@@ -43,6 +57,16 @@
43
57
  | 条件触发器检测 (ATK-009) | ❌ | ❌ | ❌ | ✅ |
44
58
  | 沙箱逃逸检测 (ATK-010) | ❌ | ❌ | ❌ | ✅ |
45
59
  | 传递性蠕虫传播 (ATK-011) | ❌ | ❌ | ❌ | ✅ |
60
+ | 活动检测 (Megalodon CI/CD) | ❌ | ❌ | ❌ | ✅ |
61
+ | 蠕虫活动检测 (Mini Shai-Hulud 第1-3波) | ❌ | ❌ | ❌ | ✅ |
62
+ | HF 模型仓库冒充 + README 克隆 | ❌ | ❌ | ❌ | ✅ |
63
+ | VS Code 扩展供应链扫描 (--vsix) | ❌ | ❌ | ❌ | ✅ |
64
+ | Python 漏洞检测 (CVE-2026-48710 BadHost) | ❌ | ❌ | ❌ | ✅ |
65
+ | 跨生态系统攻击检测 (TrapDoor) | ❌ | ❌ | ❌ | ✅ |
66
+ | 过期域名劫持检测 (node-ipc) | ❌ | ❌ | ❌ | ✅ |
67
+ | 恶意软件混淆检测 (ctf-scramble-v2) | ❌ | ❌ | ❌ | ✅ |
68
+ | 大规模域名抢注活动 (vpmdhaj 维护者) | ❌ | ❌ | ❌ | ✅ |
69
+ | 注册表投毒检测 (axios 虚假版本) | ❌ | ❌ | ❌ | ✅ |
46
70
  | 攻击分类 (ATK 系列) | ❌ | ❌ | ❌ | ✅ |
47
71
  | SBOM 输出 (CycloneDX + SPDX) | ❌ | ✅ | ❌ | ✅ |
48
72
  | NIST 800-161 合规报告 | ❌ | ❌ | ❌ | ✅ |
@@ -62,6 +86,15 @@
62
86
  | 🕵️ | **启发式静态分析** | AST 级别检查捕获混淆、eval 链、环境探测以及基于正则的工具遗漏的可疑生命周期脚本 |
63
87
  | 🧠 | **行为检测** | 识别条件触发器(基于时间、CI 感知)、沙箱逃逸和潜伏激活模式 |
64
88
  | 🧬 | **ATK 攻击分类** | 11 种分类攻击类型,附带 NIST 800-161 映射——可版本控制、可文档化、可 PR |
89
+ | 🪱 | **蠕虫活动检测** | Mini Shai-Hulud——两个套件中的 10 个子检查:突发发布、兄弟沦陷、SLSA 证明不匹配、发布者漂移、IOC 匹配、令牌外泄、ctf-scramble-v2 混淆、守护化持久化、地理终止开关、GitHub C2 死信 |
90
+ | 🧩 | **VSIX 扩展扫描** | `npm-scan scan --vsix`——检测 VS Code Marketplace 供应链攻击 |
91
+ | 🐍 | **Python 漏洞检测** | CVE-2026-48710 (BadHost)——Starlette Host 头注入 |
92
+ | 🪤 | **跨生态系统攻击检测** | TrapDoor——9 个子检查 |
93
+ | 📡 | **过期域名劫持检测** | node-ipc 沦陷——11 个子检查 |
94
+ | ☣️ | **恶意软件混淆检测** | ctf-scramble-v2——扫描包 dist/lib 中的已知恶意软件混淆模式,以最高严重性 CRITICAL 停止条件立即停止分析 |
95
+ | 🎭 | **大规模域名抢注活动检测** | vpmdhaj 维护者黑名单与停止条件,基于 Levenshtein 的域名抢注检测,预安装加载器识别,AWS ECS/Vault/GitHub 凭证外泄模式 |
96
+ | ☠️ | **注册表投毒检测** | Axios 版本黑名单 (1.14.1/0.30.4) 与停止条件,诱饵依赖发现 (plain-crypto-js),跨平台 RAT 载荷检测 |
97
+ | 🔏 | **溯源审计追踪** | Aureus-Elicitor v1.7 框架——HMAC-SHA256 签名的检测清单,内容哈希验证的审计追踪,规则溯源 URL,活动来源归属 |
65
98
  | 📦 | **SBOM 生成** | CycloneDX 1.5 和 SPDX 2.3,发现项嵌入为漏洞 |
66
99
  | 🧾 | **合规报告** | NIST SP 800-161 可追溯性矩阵 + EU 网络弹性法案映射(免费) |
67
100
  | 🔌 | **SIEM 导出** | Splunk CEF、Elastic ECS、Microsoft Sentinel、IBM QRadar 格式(高级版) |
@@ -228,6 +261,11 @@ npm-scan report --pdf # 所有扫描(高级版)
228
261
  | **ATK-010** | 沙箱逃逸 / 反分析 | 行为 | 🟠 中 | SR-10.3 |
229
262
  | **ATK-011** | 传递性传播(蠕虫式横向扩散) | 行为 | 🔴 高 | SR-11.4 |
230
263
  | **CVE-2026-48710** | BadHost — Starlette Host 头注入认证绕过 (CVE-2026-48710, CVSS 7.0)。Python 依赖版本检测 (requirements.txt, pyproject.toml, poetry.lock, Pipfile, setup.py/cfg),传递性启发式检测 (15 个已知下游包:fastapi, vllm, litellm, MCP 服务器等),auth/middleware 上下文中危险 `request.url.path` 使用的静态代码模式扫描,支持 `request.scope["path"]` 抑制 | 静态 + 注册表 | 🔴 高 / 🟠 中 / ℹ️ 信息 | SR-3.1, SR-5.3 |
264
+ | **TRAPDOOR** | TrapDoor 跨生态系统攻击活动 — 活动标记 P-2024-001,trap-core.js 载荷指纹,发布者黑名单 asdxzxc,基于 Gist 的凭证窃取,AI 上下文注入(零宽 Unicode),加密/DeFi 诱饵名称,Fernet+ECDH 加密,XOR 密钥 cargo-build-helper-2026,STS/GitHub API 凭证验证 | 静态 + 注册表 | 🟠 中 / 🔴 高 / ⚫ 严重 | SR-3.1, SR-5.3, SR-7.5 |
265
+ | **NODE_IPC_COMPROMISE** | node-ipc 供应链入侵(2026年5月14日)— 版本黑名单 (9.1.6/9.2.3/12.0.1) 及安全锁定,tarball SHA-256 验证,CJS 载荷 IIFE 注入检测,DNS 非标准端口 C2 模式,引导解析器 sh.azurestaticprovider.net,DNS TXT 外泄区域 bt.node.js,setImmediate() 运行时触发,~/nt-*/ 临时制品检测,未授权发布者 atiertant,锁定文件影响范围检测并推荐安全固定版本 | 静态 + 注册表 | ⚫ 严重 | SR-3.1, SR-5.3, SR-7.5 |
266
+ | **MSH_SUPPLEMENT** | Mini Shai-Hulud 补充——ctf-scramble-v2 混淆(匹配即停止),守护化持久化,地理终止开关检测 (ru_RU/be_BY),C2 死信指标 (OhNoWhatsGoingOnWithGitHub) | 静态 + 行为 | ⚫ 严重 | SR-3.1, SR-7.5, SR-9.2 |
267
+ | **TYPOSQUAT_VPMDHAJ** | 大规模域名抢注活动 (vpmdhaj)——维护者黑名单(匹配即停止),vpmdhaj-* 命名空间前缀检测,Levenshtein 域名抢注匹配,预安装加载器,云凭证外泄 (AWS IMDSv2, ECS, Vault, GitHub) | 静态 + 注册表 | ⚫ 严重 | SR-2.1, SR-3.1, SR-5.3 |
268
+ | **AXIOS_POISONING** | Axios 注册表投毒——版本黑名单 (1.14.1/0.30.4,匹配即停止),诱饵依赖注入 (plain-crypto-js),跨平台 RAT 载荷检测 (PowerShell, launchd, systemd, DLL, C2) | 静态 + 行为 | ⚫ 严重 | SR-3.1, SR-5.3, SR-7.5 |
231
269
 
232
270
  > **如何捕获逃避式攻击:** ATK-009 检测检查 `process.env.CI`、探测主机名或使用时间激活的包。ATK-010 标记 `debugger` 语句、`os.hostname()` 探测和环境指纹采集。ATK-011 追踪同级依赖图以检测蠕虫式传播模式。
233
271
  > 完整逃避面文档和 PoC 示例请参阅 [`docs/attack-taxonomy.md`](docs/attack-taxonomy.md)。
@@ -549,7 +587,7 @@ npm-scan report --html > report.html
549
587
 
550
588
  ### 免费版(已发布)
551
589
 
552
- - 全部 11 个 ATK 检测器(静态 + 行为)+ **MEGALODON** + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** + **VSIX_SCAN** + **CVE-2026-48710 (BadHost)**
590
+ - 全部 11 个 ATK 检测器 + **MEGALODON** (D1-D6) + **HF_IMPERSONATION** + **MINI_SHAI_HULUD** (D1-D7, 3 波,含 **MSH_SUPPLEMENT** D1-D4) + **VSIX_SCAN** (6 个检测器) + **CVE-2026-48710 (BadHost)** (3 层) + **TRAPDOOR** (9 条规则) + **NODE_IPC_COMPROMISE** (11 条规则) + **TYPOSQUAT_VPMDHAJ** (3 条规则) + **AXIOS_POISONING** (3 条规则)
553
591
  - SBOM 输出(CycloneDX + SPDX)
554
592
  - HTML、文本和合规报告(NIST + EU CRA)
555
593
  - 策略即代码引擎(YAML)
@@ -616,6 +654,11 @@ node --test test/detectors-corpus.test.js
616
654
  - `test/cve-2026-48710-badhost/transitive.test.js` — 7 个传递性依赖测试(Tier 1/2, fastapi 版本门控, 固定版本抑制)
617
655
  - `test/cve-2026-48710-badhost/codePattern.test.js` — 6 个静态代码模式测试(auth 上下文, INFO 穿透, scope 抑制)
618
656
  - `test/cve-2026-48710-badhost/integration.test.js` — 4 个集成测试(端到端复合发现项, 清洁项目, 无 Python 文件)
657
+ - `test/trapdoor.test.js` — 40 个 TrapDoor 活动检测测试(D1–D9:活动标记、载荷指纹、发布者黑名单、Gist 外泄、AI 注入、诱饵名称、加密原语、XOR 密钥、凭证验证)
658
+ - `test/node-ipc.test.js` — 37 个 node-ipc 入侵检测测试(D1–D11:版本黑名单、tarball 哈希、CJS 注入、载荷哈希、DNS C2 模式、引导解析器、DNS TXT 外泄、运行时触发、临时制品、未授权发布者、影响范围)
659
+ - `test/msh-supplement.test.js`——17 个 MSH 补充测试 (ctf-scramble-v2 停止,守护化,地理终止开关,C2 死信)
660
+ - `test/typosquat-vpmdhaj.test.js`——16 个域名抢注活动测试 (维护者阻止,前缀检测,Levenshtein,预安装加载器,Bun 加载器,AWS/ECS/Vault/GitHub 凭证外泄)
661
+ - `test/axios-poisoning.test.js`——13 个 Axios 投毒测试 (版本黑名单停止,诱饵依赖,加密启发式,跨平台 RAT,C2 回调)
619
662
  - `test/cli.test.js` — commander 集成测试(帮助、版本、扫描、报告、错误处理)
620
663
 
621
664
  ### 需要帮助?
@@ -0,0 +1,24 @@
1
+ const BLOCKED_VERSIONS = new Map([
2
+ ['axios', ['1.14.1', '0.30.4']],
3
+ ]);
4
+
5
+ export function scanVersionBlocklist(pkgJson) {
6
+ const pkgName = pkgJson?.name || '';
7
+ const pkgVersion = pkgJson?.version || '';
8
+
9
+ const blocked = BLOCKED_VERSIONS.get(pkgName);
10
+ if (!blocked) return { triggered: false, stopCondition: false, matchedVersion: null };
11
+
12
+ if (blocked.includes(pkgVersion)) {
13
+ return {
14
+ triggered: true,
15
+ stopCondition: true,
16
+ matchedVersion: pkgVersion,
17
+ reason: `Known compromised version in registry poisoning campaign`,
18
+ };
19
+ }
20
+
21
+ return { triggered: false, stopCondition: false, matchedVersion: null };
22
+ }
23
+
24
+ export { BLOCKED_VERSIONS };