Deserialization Xxe logo

Deserialization Xxe

Community
zhaji2333
deserialization-xxe

当发现XML导入/SOAP/Office解析、序列化数据(Java/PHP/Python/.NET)、JSON深合并、yaml.load、不可信反序列化入口时调用。负责反序列化RCE链、XXE、原型污染、phpggc/ysoserial利用链构造与验证。

Overview

Publisherzhaji2333
RepositoryCkSKILLS
Skill namedeserialization-xxe
Stars
123
Forks
16
Bundled files
Instructions only
LicenseMIT
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 zhaji2333 on GitHub. Read the source before you install it.

Installation

Install the Deserialization Xxe 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.
    https://github.com/zhaji2333/CkSKILLS/tree/main/.agents/skills/deserialization-xxe
  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/zhaji2333/CkSKILLS.git /tmp/CkSKILLS
mkdir -p .claude/skills
cp -r /tmp/CkSKILLS/.agents/skills/deserialization-xxe .claude/skills/deserialization-xxe
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deserialization Xxe 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 Deserialization Xxe 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 Deserialization Xxe 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.

deserialization-xxe — 反序列化与解析器漏洞专项深度挖掘

何时调用(触发条件)

  • XML 导入/上传、SOAP 接口、Office/Excel 解析
  • 序列化数据入口(Java readObject、PHP unserialize、Python pickle、.NET BinaryFormatter)
  • JSON 深合并/深拷贝(Node.js 原型污染)
  • yaml.load 未指定安全 Loader
  • 代码审计发现危险函数(见 source-code-audit)

一、漏洞类型全景

类型语言/场景修复
H1. 反序列化Java/PHP/Python/.NET禁用危险反序列化、白名单
H2. XXEXML导入、SOAP、Office解析禁用外部实体
H3. 原型污染Node.js对象合并过滤危险键

二、反序列化专项

各语言危险入口

Java:   readObject / XMLDecoder / JNDI lookup / JdbcRowSetImpl / TemplatesImpl
PHP:    unserialize / phar反序列化
Python: pickle.loads / yaml.load(Loader=Loader)
.NET:   BinaryFormatter / XMLSerializer

利用工具

语言工具
Javaysoserial / marshalsec(RMI/LDAP 起服务)
PHPphpggc
Pythonpickle 手工构造

利用链思路

  • Java:Gadget 链(CommonsCollections、CommonsBeanutils 等)→ RMI/LDAP 打 JNDI
  • PHP:POP 链(Laravel/ThinkPHP/Yii 框架 gadget)+ phar 协议触发
  • Python:pickle 反序列化执行命令
  • 入口识别:base64/hex 编码的序列化流、rO0AB(Java)、a:{}(PHP)、O:8:(PHP对象)

三、XXE 专项

基础 Payload

xml
<?xml version="1.0"?>
<!DOCTYPE foo [
  <!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<foo>&xxe;</foo>

进阶利用

  • 无回显:外部 DTD + 带外(OOB)读取文件
  • SSRF:SYSTEM "http://169.254.169.254/latest/meta-data/"
  • 文件读取:file:///etc/passwd、php://filter/read=convert.base64-encode/resource=config.php
  • 协议:http/ftp/gopher
  • Office 文档 XXE:docx/xlsx 内 XML 注入外部实体

触发场景

  • XML/Excel/CSV 导入
  • SOAP 接口
  • 文档预览/转换
  • SVG 上传(图片上传点也测 XXE)

四、原型污染专项(Node.js)

__proto__ / constructor.prototype / constructor.prototype.__proto__

触发场景

  • JSON.parse 后深合并(lodash.merge、Object.assign 递归合并)
  • 配置合并、查询参数合并

利用思路

  • 污染 __proto__.isAdmin=true / __proto__.shell=...
  • 污染 __proto__.env(pug/ejs 模板引擎 RCE)
  • 污染 Object.prototype 影响全局校验逻辑

五、验证要点

  • 反序列化:先确认可控输入点与编码方式,再选 gadget 链验证 RCE
  • XXE:先测回显(文件读取),无回显用 OOB DNSLog 验证
  • 原型污染:控制台/接口验证 Object.prototype 被污染
  • 每个 payload 至少尝试到 Level 4 绕过(编码/变形/协议)

六、修复建议

  • 禁用危险反序列化或使用白名单/黑名单过滤
  • XML 解析禁用外部实体(XXE 防护)
  • yaml 使用 SafeLoader
  • 深合并过滤 __proto__/constructor 键
  • 输入校验:拒绝序列化对象格式(按业务白名单)

Frequently asked questions

What does the Deserialization Xxe AI skill do?

当发现XML导入/SOAP/Office解析、序列化数据(Java/PHP/Python/.NET)、JSON深合并、yaml.load、不可信反序列化入口时调用。负责反序列化RCE链、XXE、原型污染、phpggc/ysoserial利用链构造与验证。

Why use Deserialization Xxe on TypingMind?

Because you install it once and use it with any model. Deserialization Xxe 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 Deserialization Xxe in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zhaji2333/CkSKILLS/tree/main/.agents/skills/deserialization-xxe. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Deserialization Xxe?

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 Deserialization Xxe?

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

Is the Deserialization Xxe AI skill free?

Yes. It is published on GitHub by zhaji2333 under the MIT license. 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 👇