assessing-vector-and-embedding-weaknesses
하는 일
이 도구는 AI로 문서에서 정보를 찾는 시스템의 보안을 점검합니다. 데이터를 노출하거나 잘못된 정보를 넣을 수 있는 취약점을 찾습니다.
사용하는 경우
- ✓AI 기반 문서 검색 시스템의 보안을 테스트할 때.
- ✓서로 다른 사용자의 데이터가 섞이지 않는지 확인해야 할 때.
- ✓외부 문서를 시스템에 추가하도록 허용할 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/assessing-vector-and-embedding-weaknesses/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Company X의 문서 검색 시스템이 데이터 유출과 잘못된 정보 주입으로부터 안전한지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 텍스트를 '벡터'(숫자 표현)로 바꾸어 저장하는 시스템 부분에 대해 흔한 공격을 시뮬레이션합니다. 이 벡터들로부터 원래 텍스트를 복구할 수 있는지, 한 사용자의 데이터를 다른 사용자가 볼 수 있는지 확인합니다.
기술 내용 (원본 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")
…
자주 묻는 질문
'임베딩 역변환'이란 무엇인가요?
문서의 숫자 표현(임베딩)에서 원래 텍스트를 복구할 수 있는 취약점입니다. 텍스트의 '그림'을 다시 그려 내는 것과 같습니다.
'교차 테넌트 유출'이란 무엇인가요?
같은 시스템 안에서 한 사용자가 다른 사용자의 정보를 보거나 접근하게 되는 것입니다. 보통 데이터 분리에 실패했을 때 일어납니다.
'지식 기반 오염(knowledge-base poisoning)'이란 무엇인가요?
정확한 정보 대신 찾아지도록 거짓이거나 악의적인 정보를 문서 시스템에 넣거나, 숨은 명령을 실행하게 만드는 공격입니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
writing-skills
311k에이전트를 위한 새 스킬을 작성하고, 각 스킬이 실제로 에이전트의 행동을 바꾸는지 사용하기 전에 테스트하도록 가르칩니다.
writing-for-agents
310k스킬, AGENTS.md, CLAUDE.md 등 AI 에이전트가 읽는 문서를 명확하게 쓰는 방법을 알려 주어 에이전트가 예측 가능하게 행동하도록 돕습니다.
bengali-nlp
280k에이전트가 벵골어 텍스트를 처리하도록 돕습니다. 언어를 이해하고 다루며, 텍스트를 정규화하고 고유한 특징을 처리합니다.