Zum Inhalt springen
Skillpedia
Agenten35k · #7885

detecting-typosquatting-packages

Was er macht

Dieses Tool prüft, ob der Name eines Software-Pakets, das du installieren willst, falsch geschrieben ist oder einer bekannten, vertrauenswürdigen Version sehr ähnlich sieht. So hilfst du dabei, zu verhindern, dass du versehentlich ein gefährliches Programm installierst, das sich hinter einem vertrauten Namen versteckt.

Wann du ihn nutzt

  • ✓Bevor du ein neues Paket zu deinem Projekt hinzufügst.
  • ✓Wenn du eine Liste von Paketen prüfst, die eine KI vorgeschlagen hat.
  • ✓Bei einer Sicherheitsprüfung von Paket-Updates.

Link zum Skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-typosquatting-packages/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-typosquatting-packages/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Prüfe, ob das Paket „requets“ sicher zu installieren ist.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool vergleicht den Namen des Pakets, das du installieren willst, mit einer Liste bekannter, sicherer Namen. Es achtet auf kleine Unterschiede, etwa vertauschte oder fehlende Buchstaben, die auf einen betrügerischen Versuch hindeuten könnten.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Detecting Typosquatting Packages

Authorized Use Only: This skill is for defensive software-supply-chain security, package screening, and authorized research. Use the corpus-matching and registry-query techniques here only against registries you are permitted to query at scale and packages you intend to evaluate for your own organization. Mass automated registry scraping may violate registry terms of service.

Overview

Typosquatting is a software-supply-chain attack (MITRE ATT&CK T1195.002 — Supply Chain Compromise: Compromise Software Supply Chain) in which an adversary publishes a malicious package whose name is a near-miss of a popular legitimate package — reqeusts for requests, python-sqlite for sqlite3, crossenv for cross-env. A developer who fat-fingers the name, copies a name from a poisoned tutorial, or trusts an AI-generated dependency list (the "slopsquatting" variant, where models hallucinate package names attackers then register) installs the squat instead. Because most ecosystems execute install-time scripts (postinstall in npm, setup.py/build hooks in PyPI), the payload runs immediately with the developer's privileges.

This skill covers proactive, pre-installation detection: screening a candidate package name against a corpus of popular/known-good names using the same name-mutation primitives attackers use, then triaging high-risk matches. The canonical open-source detector is typomania (Rust Foundation), a Rust port of the academic typogard tool ("Defending Against Package Typosquatting", University of Kansas); typomania powers crates.io's live typosquatting checks. Cross-ecosystem coverage comes from Microsoft OSSGadget's oss-find-squats and, for PyPI, IQTLabs pypi-scan. The ecosyste-ms typosquatting-dataset provides a curated ground-truth corpus of known squats mapped to their legitimate targets.

Sources: Rust Foundation typomania (https://github.com/rustfoundation/typomania), Microsoft OSSGadget, ecosyste-ms typosquatting-dataset, and OWASP CI/CD / SLSA supply-chain guidance.

When to Use

  • Before adding a new dependency to package.json, requirements.txt, pyproject.toml, or Cargo.toml
  • As a CI/CD gate that screens every newly introduced dependency name in a pull request
  • When triaging an AI-generated or tutorial-sourced dependency list ("slopsquatting" review)
  • During security review of a lockfile diff to catch a swapped or newly-pinned squat
  • When building a registry-side or proxy-side guardrail that blocks installs of suspected squats

Prerequisites

  • Rust toolchain (cargo) to build/use typomania, or a prebuilt OSSGadget release
  • Python 3.8+ for pypi-scan and the helper script in this skill
  • Network access to the target registry's public API (npmjs.org, pypi.org, crates.io)
  • A corpus of "popular" package names for the ecosystem (download counts or a top-N list)

Install the tooling:

# typomania (library + example harness) — Rust Foundation
git clone https://github.com/rustfoundation/typomania
cd typomania
cargo build --release
cargo run --example registry   # demonstrates the Harness against a fake registry

# OSSGadget (Microsoft) — cross-ecosystem squat finder
# Download a release binary, then:
oss-find-squats pkg:npm/requests          # purl syntax
oss-find-squats pkg:pypi/reqeusts

# pypi-scan (IQTLabs) — PyPI typosquat enumerator
git clone https://github.com/IQTLabs/pypi-scan
cd pypi-scan
pip install -r requirements.txt

# ecosyste-ms ground-truth dataset of known squats
git clone https://github.com/ecosyste-ms/typosquatting-dataset

Objectives

  • Generate the candidate squat set for a given legitimate name using the standard mutation primitives
  • Screen a candidate package name against a popular-name corpus and flag near-misses
  • Enrich each suspected squat with registry metadata (age, downloads, maintainer, install scripts)
  • Score and triage findings to suppress false positives (legitimate forks, scoped packages)
  • Wire the check into CI/CD as a blocking gate on new dependencies

MITRE ATT&CK Mapping

Technique ID Name Tactic
T1195.002 Supply Chain Compromise: Compromise Software Supply Chain Initial Access

…

Häufige Fragen

Was ist „Typosquatting“?

Das ist, wenn jemand einen Paketnamen registriert, der einem beliebten Paket sehr ähnlich ist, aber einen kleinen Tippfehler enthält. So sollen Menschen dazu gebracht werden, ein schadhaftes Paket zu installieren.

Warum ist das gefährlich?

Schadhafte Pakete können deine Daten stehlen, deinen Computer beschädigen oder jemand anderem die Kontrolle über dein System geben, weil sie Code ausführen, sobald sie installiert sind.

Wie schützt mich dieses Tool?

Es arbeitet wie ein Sicherheitsposten vor der Installation und warnt dich vor verdächtigen Paketnamen, bevor du sie zu deinem Projekt hinzufügst.

Details

Originalbeschreibung des Autors

Flag misspelled, brandjacked, and typosquatted package names across npm, PyPI, and crates.io before installation, using edit-distance, keyboard-proximity, and known-target corpus matching with typomania, Microsoft OSSGadget's oss-find-squats, and pypi-scan. Use before adding a new dependency, as a CI/CD gate on pull requests, when reviewing an AI-generated ("slopsquatting") dependency list, or whe

repo: mukul975/Anthropic-Cybersecurity-Skills

Beliebtheit

GitHub-Sterne
35k
Platz im Ranking
#7885
Lizenz
Apache-2.0
Aktualisiert
31.8.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills