detecting-typosquatting-packages
यह क्या करती है
यह टूल जांचता है कि जिस सॉफ्टवेयर पैकेज को आप इंस्टॉल करने वाले हैं, उसका नाम किसी मशहूर और भरोसेमंद पैकेज की गलत स्पेलिंग या उससे मिलती-जुलती नकल तो नहीं है। इससे आप गलती से किसी खतरनाक प्रोग्राम को जाना-पहचाना नाम देखकर इंस्टॉल करने से बच सकते हैं।
कब इस्तेमाल करें
- ✓अपने प्रोजेक्ट में कोई नया पैकेज जोड़ने से पहले।
- ✓AI द्वारा सुझाए गए पैकेजों की सूची देखते समय।
- ✓पैकेज अपडेट की सिक्योरिटी जांच के दौरान।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-typosquatting-packages/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“जांचो कि पैकेज 'requets' इंस्टॉल करना सुरक्षित है या नहीं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल जिस पैकेज नाम को आप इंस्टॉल करना चाहते हैं, उसकी तुलना ज्ञात सुरक्षित नामों की सूची से करता है। यह छोटे अंतर खोजता है, जैसे अक्षरों की जगह बदलना या कोई अक्षर छूट जाना, जो धोखाधड़ी की कोशिश का संकेत हो सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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, orCargo.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 |
…
अक्सर पूछे जाने वाले सवाल
'typosquatting' क्या है?
जब कोई मशहूर पैकेज से मिलता-जुलता नाम, थोड़ी सी टाइपिंग गलती के साथ, रजिस्टर कर लेता है ताकि लोग गलती से खतरनाक पैकेज इंस्टॉल कर लें, तो इसे typosquatting कहते हैं।
यह खतरनाक क्यों है?
खतरनाक पैकेज आपकी जानकारी चुरा सकते हैं, आपके कंप्यूटर को नुकसान पहुंचा सकते हैं या आपके सिस्टम पर किसी और का नियंत्रण करवा सकते हैं, क्योंकि ये इंस्टॉल होते ही कोड चलाना शुरू कर देते हैं।
यह टूल मेरी सुरक्षा कैसे करता है?
यह इंस्टॉल से पहले एक सुरक्षा गार्ड की तरह काम करता है और प्रोजेक्ट में जोड़ने से पहले संदिग्ध पैकेज नामों की चेतावनी देता है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7885
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।