agentleFS
zhaji2333zhaji2333/CkSKILLS/.agents/skills/web-deser-xxe/SKILL.md

web-deser-xxe

Skill155 starsChanged 12 days agoMITView on GitHub

反序列化/XXE/原型污染/JNDI/XSLT/EL/沙箱脚本注入专项。当出现 XML/SOAP/序列化对象/JSON 深合并/yaml.load/不可信反序列化入口时调用。

The file

Files
SKILL.md

web-deser-xxe — 反序列化/XXE/原型污染/JNDI/XSLT/EL/沙箱脚本注入专项

何时调用

  • XML 导入/SOAP/Office/Excel 解析
  • Java/PHP/Python/.NET 反序列化
  • JSON 深合并/__proto__/原型污染
  • JNDI/LDAP/EL/XSLT 表达式
  • sandbox 脚本(Groovy/JS)

30 秒分诊

  1. 确认数据格式与解析库(报错栈/响应头/JS 特征)
  2. 先打 XXE(最简单):外部实体读文件
  3. 反序列化:找 gadget 链与白名单边界
  4. 原型污染:找 merge/set 的可控路径

首枪顺序

  • XXE:<!ENTITY x SYSTEM "file:///etc/passwd"> → 回显字段
  • XXE 被 WAF 拦 → UTF-16/BOM、参数实体、SVG/Office 包装
  • Java 反序列化:ysoserial gadget / TemplatesImpl / SignedObject
  • PHP:phar 反序列化 + 文件操作触发;Python:pickle __reduce__
  • 原型污染:__proto__/constructor.prototype 污染配置/模板
  • JNDI:${jndi:ldap://...} 打 log4j 类
  • 表达式/模板:SpEL T(java.lang.Runtime)、EL ${...}、XSLT 扩展函数
  • 沙箱脚本(Groovy/JS):逃逸后命令执行(见 ai-agent)

知识库索引(按需开小块,禁通读)

文件用途大小
knowledge/deserialization-xxe-02-二、反序列化专项.md反序列化总览与链0.8KB
knowledge/deserialization-xxe-03-三、XXE-专项.mdXXE 专项0.7KB
knowledge/deserialization-test.md真实 SRC 反序列化实战大全0.6KB
knowledge/xxe-test.mdXXE 进阶(盲打/带外/OOB)0.4KB
knowledge/prototype-pollution-test.md原型链污染0.5KB
knowledge/jndi-injection-test.mdJNDI 注入8.2KB
knowledge/el-injection-test.mdEL 表达式注入7.2KB
knowledge/groovy-sandbox-exec-test.mdGroovy 沙箱逃逸2.2KB

其余 13 个知识块(按标题搜,禁止通读):ls knowledge/;原始清单见 ../../../docs/MIGRATION.md。

相关

  • web-injection / ai-agent / source-audit

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.