Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
wgpsec avatar

Java Deserialization Methodology

  • 20 installs
  • 1.6k repo stars
  • Updated July 19, 2026
  • wgpsec/aboutsecurity

Helps with ai & agent building tasks during AI-assisted development.

About

java-deserialization-methodology is a Claude Code skill in the AI & Agent Building category.

  • java-deserialization-methodology
  • AI & Agent Building
  • AI-coding skill

Java Deserialization Methodology by the numbers

  • 20 all-time installs (skills.sh)
  • Ranked #10,442 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/wgpsec/aboutsecurity --skill java-deserialization-methodology

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs20
repo stars1.6k
Last updatedJuly 19, 2026
Repositorywgpsec/aboutsecurity

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Java 反序列化漏洞方法论

Java 反序列化是 Java 生态中最危险的漏洞类之一——一旦成功通常直接 RCE。

⛔ 深入参考(必读)

  • 需要 ysoserial gadget chain 优先级表、URLDNS 检测、payload 构造 → references/ysoserial-gadgets.md
  • 需要 JNDI 注入、Fastjson 版本 payload、Shiro/WebLogic/JBoss/Jenkins 专项 → references/jndi-fastjson.md

---

Phase 1: 识别 Java 反序列化入口

1.1 原生 Java 序列化数据(魔术字节)

  • 二进制:\xac\xed\x00\x05(hex: aced0005
  • Base64 编码后:以 rO0AB 开头
  • Gzip 压缩后再 Base64:以 H4sIAAAA 开头

检查位置:Cookie(rememberMe/VIEWSTATE)、POST Body、自定义 Header、WebSocket、RMI/T3/IIOP 协议端口

1.2 JSON 反序列化(Fastjson/Jackson)

  • Fastjson:JSON 中含 @type 字段 → references/jndi-fastjson.md
  • Jackson:启用了 DefaultTyping → JSON 中含类名数组 ["com.xxx.Class", {...}]
  • 识别:发送畸形 JSON 观察错误堆栈中的库名

1.3 特定中间件端口

端口服务漏洞方向
7001/7002WebLogicT3/IIOP 反序列化
8009AJP (Tomcat)GhostCat (CVE-2020-1938)
1099RMI RegistryRMI 反序列化
1090/8500JBoss JMXJMXInvokerServlet
50000JenkinsJenkins CLI 反序列化

Phase 2: 利用决策树

发现序列化入口
├─ 原生序列化 (rO0AB/aced0005)?
│   ├─ 先 URLDNS 确认漏洞存在 → [references/ysoserial-gadgets.md](references/ysoserial-gadgets.md)
│   └─ 逐个尝试 CC1-7 → CommonsBeanutils → Spring → Groovy
├─ Fastjson (@type 字段)?
│   └─ 识别版本 → 选择对应 payload → [references/jndi-fastjson.md](references/jndi-fastjson.md)
├─ Shiro (rememberMe=deleteMe)?
│   └─ 默认密钥 kPH+bIxk5D2deZiIxcaaaA== → [references/jndi-fastjson.md](references/jndi-fastjson.md)
└─ Log4j (Java 应用 + 用户输入)?
    └─ ${jndi:ldap://...} → [references/jndi-fastjson.md](references/jndi-fastjson.md)

注意事项

  • 先用 URLDNS 检测,确认漏洞存在后再尝试命令执行 gadget
  • ysoserial 的 Runtime.exec() 不支持管道/重定向,需要 Base64 编码命令
  • Java 版本影响 JNDI 利用方式(JDK < 8u191 最简单,8u191+ 需本地 Gadget)
  • 多个 gadget chain 逐一尝试,不同 classpath 环境适用不同 gadget

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.