Aller au contenu
Skillpedia
Agents35k · #8167

orchestrating-llm-attacks-with-pyrit

Ce qu’il fait

Cet outil automatise les tests de sécurité des systèmes d'IA. Il simule de longues conversations complexes pour détecter des failles que des tests simples pourraient manquer.

Quand l’utiliser

  • ✓Lorsque des tests rapides, avec une seule question, ne suffisent pas.
  • ✓Lorsque vous évaluez des assistants IA qui mémorisent les conversations passées.
  • ✓Pour créer des tests de sécurité reproductibles et détaillés.

Lien du skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/orchestrating-llm-attacks-with-pyrit/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/orchestrating-llm-attacks-with-pyrit/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Teste le modèle d'IA pour voir s'il révèle des informations sensibles au cours d'une conversation en plusieurs échanges.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil utilise des modèles d'IA pour dialoguer avec le système cible et chercher des vulnérabilités. Un « évaluateur » analyse les réponses et oriente la conversation vers un objectif précis.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Orchestrating LLM Attacks with PyRIT

Legal and Authorized-Use Notice: PyRIT generates adversarial and potentially harmful prompts to test AI systems. Use it only against models and endpoints you own or are explicitly authorized to assess. Multi-turn orchestrators consume large numbers of tokens against both the target and the adversarial/scoring models; account for cost and terms of service. Unauthorized use is prohibited.

Overview

PyRIT (Python Risk Identification Tool for generative AI) is an open-source automation framework from Microsoft's AI Red Team, distributed at github.com/microsoft/PyRIT. Where a single-shot scanner sends one prompt and checks the answer, PyRIT automates multi-turn adversarial conversations: an attacker model and a scorer model collaborate in a loop to drive a target model toward a defined objective (for example, eliciting restricted content, leaking a system prompt, or making an agent perform an unauthorized tool call). This mirrors how real adversaries iterate against a chatbot rather than relying on one magic prompt.

PyRIT is built from composable primitives. Targets (pyrit.prompt_target) wrap the systems being probed and the helper models — OpenAIChatTarget, AzureMLChatTarget, HTTPTarget, and others. Orchestrators / attacks (pyrit.orchestrator) implement attack strategies; all multi-turn strategies subclass MultiTurnOrchestrator. The headline strategies are RedTeamingOrchestrator (a generic adversarial-chat loop), CrescendoOrchestrator (the Crescendo technique — start benign and escalate gradually so each turn looks reasonable in isolation), and TreeOfAttacksWithPruningOrchestrator (TAP — branch multiple attack lines in parallel, expand the branches the scorer rates as progressing, and prune dead ends). Scorers (pyrit.score) such as SelfAskTrueFalseScorer decide whether the objective was met and feed that judgment back into the loop. Converters mutate prompts (base64, translation, ASCII art) to evade filters, and memory persists every turn for later analysis.

This skill maps to MITRE ATLAS AML.T0051 (LLM Prompt Injection) and AML.T0054 (LLM Jailbreak) because PyRIT operationalizes both at scale across conversation turns, and supports NIST AI RMF MEASURE-2.7 by producing repeatable, scored security measurements of an AI system.

When to Use

  • When single-shot scanning (e.g. garak) finds a model robust to one-prompt attacks and you need to test multi-turn escalation (Crescendo) or adaptive branching (TAP).
  • When assessing a conversational agent or assistant where state accumulates over a dialogue.
  • When you need an automated, scorer-driven harness rather than manual prompt-by-prompt red teaming.
  • When building reproducible red-team campaigns with persisted conversation memory for evidence and regression.
  • When evaluating whether guardrails hold under gradual, plausibly-deniable escalation.

Prerequisites

  • Python 3.11+ (3.12/3.13 supported); a dedicated virtual environment.
  • Install PyRIT from PyPI:
    python -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
    python -m pip install -U pyrit
    python -c "import pyrit; print(pyrit.__version__)"
    
  • Credentials/endpoints for: the target model, an adversarial chat model (the attacker), and a scoring model (often the same as the adversarial model). For OpenAI/Azure set OPENAI_API_KEY / Azure OpenAI env vars, or use a .env file PyRIT loads.
  • Written authorization to test the target.

Objectives

  • Initialize PyRIT memory and configure target, adversarial, and scoring endpoints.
  • Run a generic adversarial-chat attack with RedTeamingOrchestrator.
  • Run a gradual-escalation attack with CrescendoOrchestrator.
  • Run an adaptive branching attack with TreeOfAttacksWithPruningOrchestrator.
  • Apply prompt converters to evade input filters.
  • Persist and export the full conversation for evidence and triage.

MITRE ATT&CK Mapping

This skill uses MITRE ATLAS technique IDs.

ID Tactic Official Name Relevance
AML.T0051 ML Attack Staging / Impact LLM Prompt Injection PyRIT orchestrators inject crafted instructions across turns to subvert intended behavior.
AML.T0054 Privilege Escalation / Defense Evasion LLM Jailbreak Crescendo and TAP iteratively bypass guardrails; the scorer confirms when restrictions are defeated.

Workflow

…

Questions fréquentes

Qu'est-ce que le « red teaming » ?

C'est un processus de sécurité dans lequel une équipe tente activement de trouver des failles dans un système en simulant de véritables attaques.

Pourquoi utiliser des conversations en plusieurs échanges ?

De nombreuses vulnérabilités n'apparaissent que lorsque l'IA est amenée dans des situations complexes au fil d'une conversation, et non avec une seule requête.

Ai-je besoin d'une autorisation pour utiliser cet outil ?

Oui, vous ne devez l'utiliser que sur des systèmes qui vous appartiennent ou que vous êtes explicitement autorisé à tester.

Détails

Description originale de l’auteur

Build automated multi-turn adversarial attacks against conversational LLM targets using Microsoft PyRIT's RedTeamingOrchestrator, CrescendoOrchestrator (gradual escalation), and TreeOfAttacksWithPruningOrchestrator (adaptive branching), with scorer feedback loops and persisted conversation memory. Use when single-shot LLM scanning is insufficient and you need multi-turn, scorer-driven AI red-team

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularité

Étoiles GitHub
35k
Position au classement
#8167
Licence
Apache-2.0
Mis à jour
31/08/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires