Cross Domain Attack Chain logo

Cross Domain Attack Chain

OrganizationPopular
wgpsec
cross-domain-attack-chain

Web 与 AI 跨域攻击链方法论。当目标系统同时包含传统 Web 应用和 AI/LLM 组件、 需要评估 Web 漏洞对 AI 系统的影响或 AI 漏洞对 Web 系统的影响时触发。 覆盖双向攻击链: Web→AI(XSS 窃取对话/SSRF 调用模型 API/SQLi 污染 RAG/文件上传 RAG 投毒) 和 AI→Web(注入生成存储型 XSS/Agent 执行 SQL 命令/工具读取敏感文件/沙箱逃逸 RCE)。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill namecross-domain-attack-chain
Stars
1.7K
Forks
242
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the Cross Domain Attack Chain 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/cross-domain-attack-chain .claude/skills/cross-domain-attack-chain
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cross Domain Attack Chain 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 Cross Domain Attack Chain 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 Cross Domain Attack Chain 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.

Web/AI 跨域攻击链方法论

概述

现代系统中 Web 服务与 AI/LLM 组件共享数据管道和基础设施。Web 层的低危漏洞(如受限 SSRF)接触到内部模型 API 时可升级为 Prompt 注入;反过来,Prompt 注入通过 Agent 工具链回写数据库可产生存储型 XSS。跨域攻击链的价值在于将两个领域的"中低危"串联为"高危/严重"。

跨域攻击路径总览

方向编号入口漏洞跨域跳板最终影响
Web→AIW2A-1XSS劫持 AI 对话接口窃取对话内容/注入恶意上下文
Web→AIW2A-2SSRF访问内部模型 API获取 embedding/直接执行 prompt
Web→AIW2A-3SQLi修改向量库记录污染 RAG 检索结果
Web→AIW2A-4文件上传上传含隐藏指令文档RAG 投毒/间接注入
Web→AIW2A-5API 越权管理接口未鉴权篡改 System Prompt/模型配置
AI→WebA2W-1Prompt 注入模型输出未转义生成存储型 XSS payload
AI→WebA2W-2Agent 劫持SQL/命令工具执行任意 SQL 查询或系统命令
AI→WebA2W-3工具滥用文件读取工具读取服务器敏感文件
AI→WebA2W-4代码执行沙箱逃逸反弹 shell/RCE
AI→WebA2W-5MCP 投毒外部回调工具数据外泄到攻击者服务器

Phase 0: 攻击面映射

  • 识别系统中 Web 与 AI 组件的所有交互点:RAG 数据源(数据库、文件存储、CMS)、模型 API 端点、共享缓存/队列
  • 绘制数据流图,标注哪些 Web 用户输入最终会进入 LLM 上下文(直接或经 RAG 检索)
  • 确认 AI 输出回写到 Web 层的路径:是否直接渲染到页面、存入数据库、或触发后端操作

Phase 1: Web→AI 攻击路径

1.1 XSS → 窃取 AI 对话/注入上下文 利用 XSS 劫持用户与 AI 的 WebSocket 或 API 会话,窃取对话历史或注入恶意上下文(GAARM.0040.001)。关键在于 AI 聊天界面是否将 Markdown/HTML img 标签渲染为实际请求,从而通过 img src 外泄会话内容。

1.2 SSRF → 调用内部模型 API Web 层 SSRF 若能触达内网模型端点,可直接发送 prompt 请求、获取 embedding 或修改参数。Agent 自身的网络访问能力也可能成为 SSRF 跳板(GAARM.0041.001)。

1.3 SQLi → 污染 RAG 向量库 当 RAG 系统使用关系型数据库存储文档 chunk 或元数据时,SQL 注入可修改检索内容,间接将恶意指令注入 LLM 上下文,实现持久化的间接 Prompt 注入。

1.4 文件上传 → RAG 投毒 上传含隐藏指令的文档(PDF 中的白色文字、DOCX 中的隐藏段落、图片 EXIF 中的文本),文档被 RAG 管道索引后,隐藏指令在检索阶段被注入到模型上下文中。

1.5 API 越权 → 修改 System Prompt/模型配置 管理接口若缺乏鉴权或存在 IDOR,攻击者可直接修改 System Prompt、调整模型温度参数、切换底层模型版本,从根本上改变 AI 的行为边界。

Phase 2: AI→Web 攻击路径

2.1 Prompt 注入 → 生成存储型 XSS 诱导模型生成包含 <script> 或事件处理器的 HTML 片段,若 Web 层对 AI 输出未做输出编码,payload 被存储并在其他用户浏览时执行。

2.2 Agent 劫持 → 执行 SQL/系统命令 通过间接注入劫持 Agent 目标,使其调用数据库查询工具执行 DROP TABLE 或调用 shell 工具执行系统命令(GAARM.0041.002),影响直接作用于 Web 后端基础设施。

2.3 工具滥用 → 读取敏感文件 劫持 Agent 的文件系统工具读取 .env、数据库凭据、TLS 私钥等服务器敏感文件,并通过对话输出或回调机制将内容传递给攻击者。

2.4 沙箱逃逸 → 反弹 shell 代码执行型 Agent 若沙箱隔离不足,Prompt 注入可诱导生成并执行逃逸 payload,获取宿主机 shell 权限,完成从 AI 层到基础设施层的穿透。

2.5 MCP 投毒 → 数据外泄 通过恶意 MCP Server 的工具描述投毒,劫持 Agent 在调用合法工具时附带数据外泄动作,将用户对话或内部数据通过 HTTP 回调发送到攻击者服务器。

攻击链组合决策

可用入口推荐组合路径预期严重度
XSS + AI 聊天界面W2A-1 → 窃取对话 → 提取内部信息High
SSRF + 内网模型端点W2A-2 → 直接 prompt → 信息泄露/后续注入Critical
文件上传 + RAG 管道W2A-4 → RAG 投毒 → A2W-1 存储型 XSSCritical
SQLi + 向量库W2A-3 → 持久化注入 → A2W-2 Agent 执行命令Critical
Prompt 注入 + Agent 工具A2W-2/A2W-3 → 读取凭据 → 横向移动Critical
MCP 第三方 ServerA2W-5 → 数据外泄 + A2W-2 命令执行High

检测清单

1. [ ] Web 与 AI 组件的交互点已完整映射?数据流方向已标注?
2. [ ] Web 用户输入到 LLM 上下文的路径是否存在注入点?
3. [ ] AI 输出回写到 Web 层时是否做了输出编码和消毒?
4. [ ] RAG 数据源(数据库/文件存储)是否对写入做了权限控制?
5. [ ] 内部模型 API 是否限制了网络访问来源?
6. [ ] Agent 工具调用是否有参数校验和权限隔离?
7. [ ] 文件上传到 RAG 索引的管道是否检测隐藏指令?
8. [ ] 跨域攻击链的组合路径是否纳入威胁建模?

Frequently asked questions

What does the Cross Domain Attack Chain AI skill do?

Web 与 AI 跨域攻击链方法论。当目标系统同时包含传统 Web 应用和 AI/LLM 组件、 需要评估 Web 漏洞对 AI 系统的影响或 AI 漏洞对 Web 系统的影响时触发。 覆盖双向攻击链: Web→AI(XSS 窃取对话/SSRF 调用模型 API/SQLi 污染 RAG/文件上传 RAG 投毒) 和 AI→Web(注入生成存储型 XSS/Agent 执行 SQL 命令/工具读取敏感文件/沙箱逃逸 RCE)。

Why use Cross Domain Attack Chain on TypingMind?

Because you install it once and use it with any model. Cross Domain Attack Chain 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 Cross Domain Attack Chain in TypingMind?

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

Which AI models can use Cross Domain Attack Chain?

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 Cross Domain Attack Chain?

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

Is the Cross Domain Attack Chain 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 👇