본문으로 건너뛰기
Skillpedia
에이전트35k · #8347

red-teaming-llms-with-garak

하는 일

이 도구는 ‘악의적인’ 질문을 AI 모델에 보내 부적절하게 응답하는지 확인하며, AI 모델의 보안을 시험합니다. 문제가 생기기 전에 보안 결함을 찾는 데 도움을 줍니다.

사용하는 경우

  • ✓AI 모델을 실제 서비스에 적용하기 전.
  • ✓보안 업데이트가 효과가 있었는지 확인할 때.
  • ✓모델의 보안 위험을 파악하고 싶을 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/red-teaming-llms-with-garak/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/red-teaming-llms-with-garak/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 AI 모델이 민감한 정보를 드러내도록 속일 수 있는지 시험해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 여러 종류의 까다로운 질문을 AI 모델에 보냅니다. 그다음 답변을 분석해 모델이 자신을 지키지 못한 횟수를 셉니다. 이를 통해 모델이 가장 취약한 부분을 보여 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Red-Teaming LLMs with garak

Legal and Authorized-Use Notice: This skill is for authorized AI security testing and educational purposes only. Probe only models, API keys, and endpoints you own or have explicit written permission to test. Automated probing of third-party LLM APIs may violate their terms of service and consume billable tokens. Unauthorized probing of systems you do not control may be illegal.

Overview

garak (Generative AI Red-teaming and Assessment Kit) is an open-source LLM vulnerability scanner maintained by NVIDIA. It plays the role that a network vulnerability scanner like Nessus plays for hosts, but for large language models: it sends thousands of adversarial prompts ("probes") at a target model, captures the generations, and runs automated "detectors" over the responses to decide whether each attempt succeeded. Probe families cover prompt injection (promptinject, latentinjection), jailbreaks (dan), training-data and system-prompt leakage (leakreplay), malware generation (malwaregen), cross-site-scripting payload emission (xss), encoding-based bypasses (encoding), toxicity, and more. garak is described in the paper "garak: A Framework for Security Probing Large Language Models" (arXiv:2406.11036) and is distributed from the NVIDIA/garak GitHub repository.

The scanner is generator-agnostic. It can target Hugging Face models loaded locally, OpenAI-compatible APIs, AWS Bedrock, Replicate, Cohere, NIM endpoints, GGUF/llama.cpp models, and arbitrary REST endpoints via a JSON generator spec. After a run, garak emits a .report.jsonl line-delimited log of every attempt and detector verdict, a human-readable .report.html, a garak.log debug log, and a hit log of confirmed vulnerabilities. The terminal output prints a per-probe, per-detector pass/fail summary with a hit rate (for example dan.Dan_11_0 jailbreak: FAIL ok on 38/40), which is the primary artifact you interpret.

This skill maps to the MITRE ATLAS techniques AML.T0051 (LLM Prompt Injection) and AML.T0054 (LLM Jailbreak) because garak operationalizes both: it crafts prompt-injection and jailbreak inputs at scale and measures whether the target's guardrails hold. It supports the NIST AI RMF MEASURE-2.7 subcategory by providing repeatable, quantitative security/resilience measurement of a deployed AI system.

When to Use

  • When you need a fast, repeatable baseline security assessment of an LLM before or after deployment.
  • When validating that a guardrail, system prompt, or safety fine-tune actually reduces jailbreak and injection success rates (run before/after and compare hit rates).
  • When producing evidence for an AI risk assessment or model card security section (NIST AI RMF MEASURE-2.7).
  • When triaging which OWASP LLM Top 10 risks (LLM01 prompt injection, LLM02 sensitive information disclosure, LLM07 system prompt leakage) actually manifest in your model.
  • When regression-testing an LLM endpoint in CI after model or prompt changes.

Prerequisites

  • Python 3.10+ (3.12 recommended) and a virtual environment.
  • Install garak from PyPI:
    python -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
    python -m pip install -U garak
    garak --version
    
  • For the bleeding-edge version:
    python -m pip install -U git+https://github.com/NVIDIA/garak.git@main
    
  • An API key for the target if probing a hosted model (for example export OPENAI_API_KEY="sk-...").
  • Written authorization to test the target, and awareness of token cost (probes generate thousands of calls).

Objectives

  • Enumerate available probes and detectors and pick a scoped suite.
  • Configure garak against a local Hugging Face model, an OpenAI-compatible API, and an arbitrary REST endpoint.
  • Run prompt-injection, jailbreak, and leakage probe families and capture reports.
  • Interpret the per-probe hit-rate output and the .report.jsonl.
  • Re-run after applying a mitigation to demonstrate risk reduction.
  • Produce a defensible findings artifact for an AI risk assessment.

MITRE ATT&CK Mapping

This skill uses MITRE ATLAS (the adversarial-ML companion to ATT&CK) technique IDs.

ID Tactic Official Name Relevance
AML.T0051 ML Attack Staging / Impact LLM Prompt Injection garak's promptinject and latentinjection probes craft malicious prompts that subvert intended model behavior.

…

자주 묻는 질문

‘프로브’란 무엇인가요?

모델을 속이거나 무너뜨리려고 설계된 특별한 시험 질문입니다. AI 모델의 방어력을 확인하는 데 쓰입니다.

‘탈옥’이란 무엇인가요?

AI 모델이 안전 규칙을 무시하고, 보통은 거부하는 질문에 답하도록 만드는 시도입니다.

모델을 시험하려면 허가가 필요한가요?

네, 자신이 소유하지 않은 모델이나 API를 시험하기 전에는 반드시 명시적인 서면 허가가 있어야 합니다. 허가 없이 시험하면 불법이거나 서비스 약관 위반이 될 수 있습니다.

상세 정보

작성자의 원본 설명

Runs NVIDIA garak probe suites (jailbreak, prompt injection, data leakage, toxicity, and more) against an LLM endpoint - Hugging Face models, OpenAI-compatible APIs, or Bedrock - then interprets the resulting hit-rate report for triage. Use when baselining LLM security before/after deployment, validating that a guardrail or fine-tune reduces jailbreak/injection success rates, or producing evidence

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#8347
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬