Ai Identity Security logo

Ai Identity Security

OrganizationPopular
wgpsec
ai-identity-security

AI 系统身份与权限安全测试方法论。当目标系统涉及 Agent 身份认证、多 Agent 权限管理、 角色设定安全、会话管理、或 MCP/API 凭据管控时触发。 覆盖: 角色逃逸(假定场景/假定角色/遗忘法/目标劫持)、权限失控(Action 越权/MCP 未授权资源获取)、 多 Agent 身份伪造、会话劫持、凭据泄露与滥用。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill nameai-identity-security
Stars
1.7K
Forks
242
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wgpsec on GitHub. Read the source before you install it.

Installation

Install the Ai Identity Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/ai-security/ai-identity-security .claude/skills/ai-identity-security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Identity Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ai Identity Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ai Identity Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AI 身份与权限安全测试方法论

概述

AI 身份安全关注的是应用层角色设定与权限边界的可靠性。与 prompt-jailbreak(针对模型安全对齐)不同,身份安全测试的目标是验证业务赋予 AI 的角色限制、权限分配、会话隔离和凭据管控是否可被绕过。当 Agent 获得工具调用和外部系统访问能力后,身份失控的影响从"说了不该说的话"升级为"做了不该做的事"。

攻击面总览

攻击类别子攻击GAARM 编号
角色逃逸假定场景 / 假定角色 / 遗忘法 / 目标劫持0052.001-004
权限失控Action 模块越权 / MCP 未授权资源获取 / 账户越权0053/0057/0058
身份伪造会话令牌窃取 / Agent 身份伪装 / 信任链欺骗0059
会话与凭据会话劫持 / 缓存欺骗 / API Key 泄露0055/0056

深入参考


Phase 0: 身份架构侦察

  • 识别 Agent 认证方式(API Key / OAuth / Session Token / 无认证)
  • 枚举权限模型(RBAC / ABAC / 无显式权限控制),确认角色设定的实现方式(system prompt / 代码逻辑 / 配置文件)
  • 探测会话管理机制(会话 ID 生成方式、过期策略、跨会话隔离程度)

Phase 1: 角色逃逸测试 (GAARM.0052)

  • 假定场景逃逸:构造混淆场景使模型偏离工作目标,结合关键字定位尝试泄露系统设定
  • 假定角色逃逸:要求模型扮演特定角色(DAN / 开发者模式),使其忽略应用层角色限制
  • 遗忘法逃逸:诱导模型"忘记"先前的角色指令,重置为无约束状态
  • 目标劫持:通过操纵使 AI 偏离原始角色设定去执行攻击者期望的任务

角色逃逸与越狱的边界:jailbreak 攻击模型的安全对齐(让模型生成有害内容),角色逃逸攻击应用的业务角色设定(让客服 Bot 执行管理操作)。两者可组合使用但测试目标不同。

Phase 2: 权限失控测试 (GAARM.0053/0057/0058)

  • Action 模块越权:通过 Prompt 注入或参数篡改,触发 Agent 执行超出授权范围的 Action(如将普通查询操作替换为管理操作)
  • MCP 未授权资源获取:测试 MCP Server 权限验证是否存在缺陷,恶意 Server 能否绕过权限检查访问系统资源(详见 mcp-security
  • 账户越权:验证 Agent 在多租户场景下是否能跨账户访问数据

Phase 3: 多 Agent 身份伪造 (GAARM.0059)

  • 会话令牌窃取:通过 Prompt 注入诱导 Agent 输出会话凭据或将其发送到外部端点
  • Agent 身份伪装:在多 Agent 系统中伪造来自高权限 Agent 的消息,欺骗目标 Agent 执行越权操作
  • 信任链欺骗:利用 Agent 间的隐式信任关系,通过攻陷低权限 Agent 间接控制高权限 Agent

Phase 4: 会话与凭据安全 (GAARM.0055/0056)

  • 会话劫持:测试会话 ID 的可预测性、固定性和传输安全性
  • 缓存欺骗:验证 CDN/代理缓存是否可能泄露包含认证信息的响应
  • API Key 泄露:检查 Agent 配置中的凭据是否可通过 Prompt 注入被诱导输出

检测清单

1. [ ] 身份架构已侦察?认证方式、权限模型、会话管理机制已明确?
2. [ ] 角色逃逸:假定场景/角色/遗忘法/目标劫持是否能突破角色设定?
3. [ ] 权限失控:Action 参数是否可被篡改?MCP 权限验证是否完整?
4. [ ] 身份伪造:多 Agent 间消息来源是否经过验证?信任链是否可被利用?
5. [ ] 会话安全:会话 ID 是否安全生成?是否存在固定会话攻击面?
6. [ ] 凭据管控:API Key 和 Token 是否可通过注入被泄露?
7. [ ] 跨租户隔离:多租户场景下数据访问边界是否可靠?

参考资源

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ai Identity Security AI skill do?

AI 系统身份与权限安全测试方法论。当目标系统涉及 Agent 身份认证、多 Agent 权限管理、 角色设定安全、会话管理、或 MCP/API 凭据管控时触发。 覆盖: 角色逃逸(假定场景/假定角色/遗忘法/目标劫持)、权限失控(Action 越权/MCP 未授权资源获取)、 多 Agent 身份伪造、会话劫持、凭据泄露与滥用。

Why use Ai Identity Security on TypingMind?

Because you install it once and use it with any model. Ai Identity Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ai Identity Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/ai-security/ai-identity-security. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ai Identity Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ai Identity Security?

As many as you like. As long as a model supports skills, you can use Ai Identity Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ai Identity Security AI skill free?

It is published on GitHub by wgpsec. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇