llm-redteam
它能做什么
这项技能教智能体如何对语言模型应用进行红队测试,检查其安全弱点。它关注的是注入的文本是否会导致真实的操作、泄露或不安全的输出,而不只是奇怪的回复。
适用场景
- ✓当测试人员需要检查聊天机器人、助手或 copilot 是否存在提示注入的时候。
- ✓当测试人员怀疑某个 AI 功能可能泄露其系统提示或私有数据的时候。
- ✓当测试人员需要查看 AI 智能体是否会调用它不应使用的工具的时候。
技能链接
https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/llm-redteam/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请测试这个客服聊天机器人是否存在提示注入,并检查它能否泄露其系统提示。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会运行一组携带唯一标记的攻击提示,然后检查模型是否泄露信息、执行操作,或输出不安全的内容。仅重复攻击载荷的回复会被视为噪声。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
LLM Red-Team
Reflection is not exploitation. A model that echoes your payload is noise; a model that acts on it — leaks its system prompt, emits your canary, calls a tool, renders raw HTML downstream — is a bug. Prove the action, then chain it to concrete impact.
This is the first-class LLM-attack skill. The scanner behind it is bughunter/tools/llm_redteam.py (canary-based corpus runner, /llm-redteam). For auditing an MCP server, use skills/mcp-server-audit; for attacking a deployed agent black-box, use skills/agentic-app-audit.
0. QUICK KILL CHECKLIST
Kill the lead (classify Informational, move on) when:
- The model refuses and no canary / leak / tool-call ever lands. "It said something edgy" is not a finding.
- System-prompt "leak" is just generic assistant boilerplate ("I am a helpful assistant"), not the target's actual instructions.
- Prompt injection fires but reads/changes nothing the current user couldn't already access (no cross-tenant data, no tool with impact).
- Output looks like XSS but the host app escapes it before rendering (check the actual downstream sink, not the chat response).
- Exfil payload is a markdown image beacon but the client never fetches remote images.
1. ROUTING TABLE — signal on target -> what to run
| Signal | Run |
|---|---|
| Any chat/assistant endpoint | bughunter/tools/llm_redteam.py --url <endpoint> --field <json-field> (full corpus) |
| OpenAI-style API | --template '{"messages":[{"role":"user","content":"{{PAYLOAD}}"}]}' --response-path choices.0.message.content |
| Only want one class | --category jailbreak (see --list-categories) |
| Uploads/RAG/"summarize this doc" | indirect-injection + token-smuggling (invisible unicode in the doc) |
| Agent has tools | excessive-agency category + skills/agentic-app-audit |
| Confirm blind exfil | plant a canary host, correlate with bughunter/tools/oob_listener.py |
2. ATTACK CLASSES (corpus categories)
The runner fires a canary per run (RT_PWNED_xxxx); a category "lands" when the canary / a real leak / a tool-call shows up in the response.
- prompt-injection — direct instruction override, delimiter breaks.
- jailbreak — DAN / developer-mode persona escape.
- system-prompt-leak — repeat-above, keyword-anchor, scenario-escape.
- data-exfil — markdown-image beacon / canary emission to an attacker host.
- indirect-injection — payload framed as a retrieved document / tool result (the high-value one for RAG apps).
- guardrail-bypass — base64 / split-string instruction smuggling.
- multi-turn-crescendo — single-shot simulation of a gradual escalation jailbreak.
- cross-lingual — override instruction in another language to dodge English-only filters.
- cipher-obfuscation — leetspeak / ROT13-wrapped instruction.
- token-smuggling — invisible "Sneaky Bits" unicode (U+2062/U+2064) carrying a hidden instruction (shared encoder with
bughunter/tools/hai_payload_builder.py). - excessive-agency — coerce an unsafe tool call / exfil (SSRF via "fetch URL", email send, payment).
- insecure-output — get the model to emit raw HTML/script that a downstream sink renders (XSS via AI).
3. CANONICAL OWASP ASI01-ASI10 (single source of truth)
This table is the ONE authoritative ASI mapping for the whole toolkit — skills/bug-bounty and skills/web2-vuln-classes both defer to it. If you edit the taxonomy, edit it here.
| ID | Class | What to test | Chain to |
|---|---|---|---|
| ASI01 | Prompt Injection / Goal Hijack | Override objectives via direct or indirect injection | IDOR / exfil / tool abuse |
| ASI02 | Tool Misuse | Attacker-controlled tool params ("fetch this URL", code tool) | SSRF / RCE |
| ASI03 | Privilege Compromise | Agent uses broader perms / admin tokens than the user | Priv-esc / cross-tenant |
| ASI04 | Supply Chain | Compromised plugin / MCP server / tool-output poisoning next agent | RCE / data theft |
| ASI05 | Code Execution | Unsafe code-interpreter / sandbox escape | RCE |
| ASI06 | Memory & Context Poisoning | Persistent RAG/memory corruption across sessions/users | Stored injection affecting all users |
| ASI07 | Agent Communication | Inter-agent spoofing / IDOR (agent A reads agent B's context) | Cross-tenant disclosure |
| ASI08 | Excessive Agency | Destructive action without confirmation; cascading failures | Funds/email/delete |
| ASI09 | Insecure Output Handling | AI output rendered as XSS / SQLi / comm |
常见问题
什么才算真正的发现?
这项技能说明,模型必须对攻击载荷采取行动,例如泄露指令或调用工具,而不是仅仅重复它。
它涵盖间接注入吗?
涵盖。这项技能包括隐藏在助手所读取的文档或页面中的注入。
它对应哪些标准?
这项技能对应 OWASP LLM Top 10,以及 ASI01 至 ASI10。
详情
作者的原始描述
LLM application red-teaming — prompt injection (direct + indirect), jailbreak, system-prompt leak, data exfiltration, guardrail bypass, multi-turn crescendo, cross-lingual + cipher + invisible-unicode token smuggling, excessive agency / tool abuse, insecure output handling. Canonical OWASP LLM Top 10 + ASI01-ASI10 mapping. Use when a target exposes a chat/completions/assistant/copilot endpoint, an AI feature that consumes user text or documents, or any /v1/chat, /api/chat, /mcp surface.
热度
- GitHub 星标
- 5.5k
- 排名
- #14790
- 许可证
- MIT
- 更新时间
- 2026/10/28
评论
- …
同一仓库的更多技能
bug-bounty
5.5k帮你的智能体分阶段规划漏洞赏金审查,从检查项目范围、梳理资产,到测试线索、验证影响并撰写报告。
agentic-app-audit
5.5k帮你的智能体从外部审查正在运行的 AI 助手,检查其是否存在工具调用被劫持、记忆被投毒,以及以超出用户权限的方式执行操作等风险。
argus
5.5k帮你的智能体运行六种自动化扫描器,检查常见的 Web 和 AI 应用缺陷,例如开放的跨域访问、JWT 弱点,以及通过带外确认的盲注漏洞。
bb-methodology
5.5k帮你的智能体规划一次漏洞赏金测试会话,分阶段选择下一步和合适的检查,并舍弃无法造成真正危害的想法。