assessing-vector-and-embedding-weaknesses
यह क्या करती है
यह टूल उन सिस्टम की सुरक्षा जांचता है जो AI की मदद से documents में जानकारी ढूंढते हैं। यह ऐसी कमज़ोरियां देखता है जिनसे data लीक हो सकता है या गलत जानकारी डाली जा सकती है।
कब इस्तेमाल करें
- ✓AI-आधारित document search system की सुरक्षा टेस्ट करते समय।
- ✓यह सुनिश्चित करने के लिए कि अलग-अलग उपयोगकर्ताओं का data आपस में न मिले।
- ✓जब सिस्टम में बाहरी documents जोड़ने की अनुमति हो।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/assessing-vector-and-embedding-weaknesses/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“जांचो कि Company X का document search system data लीक और गलत जानकारी डालने से सुरक्षित है या नहीं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल उस हिस्से पर आम हमलों की नकल करता है जो text को 'vectors' (संख्यात्मक रूप) में बदलकर सेव करता है। यह जांचता है कि क्या इन vectors से मूल text वापस निकाला जा सकता है, या क्या एक उपयोगकर्ता का data दूसरा उपयोगकर्ता देख सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Assessing Vector and Embedding Weaknesses
Authorized use only: These tests interact with vector stores and embedding models in RAG systems you own or are authorized to assess. Embedding inversion and cross-tenant probing against systems you do not control may expose third-party data and is prohibited without authorization.
Overview
Retrieval-Augmented Generation (RAG) systems convert documents into embedding vectors stored in a vector database (Pinecone, Qdrant, Weaviate, Chroma, pgvector, FAISS) and retrieve the nearest vectors to ground LLM responses. OWASP LLM08:2025 Vector and Embedding Weaknesses covers the security risks unique to this layer:
- Embedding inversion — embeddings are not one-way. A trained inversion model (or a black-box reconstruction attack) can recover substantial portions of the original text from its vector, leaking source documents (maps to MITRE ATLAS AML.T0024.001 Invert ML Model).
- Membership inference — querying whether a specific record contributed to the corpus (AML.T0024.000).
- Cross-tenant / multi-tenant leakage — when one namespace/collection is shared or filter isolation is missing, a tenant retrieves another tenant's chunks.
- Knowledge-base poisoning — an attacker who can write to the corpus inserts crafted chunks that dominate retrieval (high cosine similarity to expected queries) and carry indirect prompt-injection payloads.
- Retrieval manipulation — adversarial documents tuned to be retrieved for many unrelated queries ("retrieval hijacking").
The parent technique is AML.T0024 — Exfiltration via ML Inference API: an attacker uses legitimate inference/query access to exfiltrate data (source text via inversion, membership, or model extraction). This skill provides a repeatable assessment of all five weakness classes.
When to Use
- During a security assessment of any RAG / vector-search application (OWASP LLM08 coverage).
- When a vector store is multi-tenant and you must prove namespace/metadata isolation.
- When the corpus accepts user-supplied or third-party documents (poisoning surface).
- When the embedding endpoint is externally reachable (inversion/membership surface).
- When validating retrieval-filtering controls before go-live.
Prerequisites
- Authorization and scope covering the target embedding endpoint and vector store.
- Python 3.10+.
- Read (and, for poisoning tests, write) access to a test collection — never the production corpus.
# Vector DB clients + embeddings + similarity tooling
python -m pip install numpy scikit-learn sentence-transformers
python -m pip install qdrant-client chromadb pinecone-client weaviate-client
# (optional) text-embedding inversion research baseline
python -m pip install vec2text
Objectives
- Measure embedding-inversion exposure on the target embedding model.
- Run a membership-inference probe against the corpus.
- Test multi-tenant isolation (namespace, metadata filter, RBAC) for cross-tenant leakage.
- Inject benign poisoned chunks into a test collection and measure retrieval dominance.
- Detect indirect prompt-injection content surviving in retrieved chunks.
- Recommend controls: tenant-scoped filters, content validation, embedding-access limits.
MITRE ATT&CK Mapping
| ID | Tactic | Official Technique Name | Role in this skill |
|---|---|---|---|
| AML.T0024 | ATLAS: Exfiltration | Exfiltration via ML Inference API | Using query/embedding access to exfiltrate source data |
| AML.T0024.000 | ATLAS: Exfiltration | Infer Training Data Membership | Membership-inference probe against the corpus |
| AML.T0024.001 | ATLAS: Exfiltration | Invert ML Model | Embedding-inversion reconstruction of source text |
| AML.T0020 | ATLAS: Resource Development | Poison Training Data | Knowledge-base poisoning of the corpus |
| AML.T0051.001 | ATLAS: Initial Access | LLM Prompt Injection: Indirect | Injection payloads embedded in retrieved chunks |
Workflow
Step 1: Inventory the RAG pipeline
Document the embedding model + dimensions, the vector store and its tenancy model, the chunking strategy, retrieval top_k and similarity metric (cosine/dot/L2), and any metadata filters applied at query time.
# Example: inspect a Qdrant collection
from qdrant_client import QdrantClient
client = QdrantClient(url="http://localhost:6333")
info = client.get_collection("docs")
…
अक्सर पूछे जाने वाले सवाल
embedding inversion क्या है?
यह एक कमज़ोरी है जिसमें किसी document का मूल text उसके संख्यात्मक रूप (embedding) से वापस निकाला जा सकता है, जैसे text की 'तस्वीर' दोबारा बनाना।
cross-tenant leakage क्या है?
यह तब होता है जब एक उपयोगकर्ता उसी सिस्टम में दूसरे उपयोगकर्ता की जानकारी देख या access कर सके। आमतौर पर यह data अलग रखने में गड़बड़ी से होता है।
knowledge-base poisoning क्या है?
यह एक हमला है जिसमें document system में गलत या खतरनाक जानकारी डाल दी जाती है, ताकि सही जानकारी की जगह वह मिले, या छिपे हुए commands चलाए जा सकें।
जानकारी
लेखक का मूल विवरण
Test RAG vector stores (Pinecone, Qdrant, Weaviate, Chroma, pgvector, FAISS) for embedding inversion, cross-tenant data leakage, and data poisoning per OWASP LLM08:2025. Use when performing an authorized security assessment of a RAG pipeline's retrieval layer or auditing multi-tenant vector-store isolation.
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7671
- लाइसेंस
- 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
writing-skills
311kयह आपके एजेंट को नई स्किल लिखना और हर एक को पहले टेस्ट करना सिखाती है, यह जांचते हुए कि स्किल सच में उसका व्यवहार बदलती है।
writing-for-agents
310kAI एजेंट्स के लिए साफ़ निर्देश कैसे लिखें, यह समझाती है, जिसमें स्किल, AGENTS.md और CLAUDE.md फ़ाइलें शामिल हैं, ताकि एजेंट अनुमानित ढंग से व्यवहार करे।
bengali-nlp
280kयह आपके एजेंट को Bengali text प्रोसेस करने देता है। यह भाषा को समझने और उसके text को normalize करने जैसी उसकी खास बातों को संभालने में मदद करता है।