Java Exploit Chain logo

Java Exploit Chain

OrganizationPopular
wgpsec
java-exploit-chain

Java 白盒审计漏洞利用链组装。当需要将 Java 审计中发现的多个漏洞组合为完整攻击路径、 或需要评估 Maven/Gradle 依赖中的已知 CVE 对项目的实际影响时触发。 核心: 单个中低危漏洞通过组合可升级为高危/Critical 利用链。 覆盖: 信息泄露→认证绕过→RCE 的典型链路、Gadget Chain 分析方法(ysoserial/marshalsec)、 Maven 依赖 CVE 审计与实际可利用性评估。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill namejava-exploit-chain
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 Java Exploit 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/code-audit/java/java-exploit-chain .claude/skills/java-exploit-chain
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Java Exploit 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 Java Exploit 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 Java Exploit 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.

Java 漏洞利用链组装

白盒利用链组装 = 在源码层面验证多漏洞串联的可行性。工作范围是: 从已发现的单点漏洞出发,分析它们之间的因果关系和数据流衔接,评估组合后的实际危害等级。构造远程 exploit、发送 payload、绕过 WAF 等运行时黑盒利用技术属于对应 exploit skill 范畴。

深入参考


利用链组装原则

三阶段模型: 信息收集(INFO)→ 权限获取(AUTH)→ 代码执行(RCE)

每条利用链按三阶段拆解,每个阶段的输出必须满足下一阶段的前置条件。任何一个环节断裂则链路不成立。

评分规则: 链整体严重度 = 最终效果严重度 x 链路可行性系数(0.6-1.0)

  • 全路径可行、无额外条件: 系数 1.0
  • 需特定配置或低概率条件: 系数 0.8
  • 强环境依赖(特定 JDK 版本、关闭 SecurityManager 等): 系数 0.6

证据要求: 每个环节必须有 EVID 证据支撑(代码位置、配置项、数据流截断点),不可凭推测补全链路。

Maven/Gradle 依赖 CVE 审计

依赖清单提取:

  • Maven: mvn dependency:tree -DoutputType=dot 生成完整依赖图
  • Gradle: gradle dependencies --configuration runtimeClasspath 列出运行时依赖
  • 自动化: OWASP Dependency-Check 插件集成到 CI,生成 HTML/JSON 报告

NVD/GitHub Advisory 交叉比对: 使用 NVD API 或 GitHub Advisory Database 查询依赖的 CPE 匹配 CVE。

关键判断 — 有 CVE 不等于可利用:

  1. 版本匹配: 确认项目使用的版本确实在受影响范围内(注意传递依赖可能引入不同版本)
  2. 代码路径可达: 漏洞触发代码是否在项目的实际调用链中(依赖了库但未使用漏洞函数则不可利用)
  3. 攻击面暴露: 漏洞入口是否对外可达(内部工具类 vs 面向用户的 API)

高频危险依赖: commons-collections 3.x、fastjson <1.2.83、log4j-core 2.0-2.17.0、shiro <1.2.5、struts2 2.0-2.5.30、spring-cloud-gateway <3.1.1、jackson-databind <2.13.4

Gadget Chain 分析方法

  • classpath 扫描: 从 pom.xml/build.gradleWEB-INF/lib 确认目标环境中存在哪些可用 Gadget 库及版本
  • ysoserial payload 选择: 根据 classpath 依赖匹配可用链(CommonsCollections1-7、BeanShell、Groovy、Spring、Hibernate 等),选择触发效果(命令执行 / JNDI lookup / 文件写入)
  • marshalsec 用于 JNDI 利用: 搭建恶意 LDAP/RMI 服务 → 目标 JNDI lookup 触发远程类加载 → RCE;注意 JDK 版本限制
  • 自定义 Gadget 发掘: 当标准链不可用时,在项目代码中搜索 readObject/readResolve/readExternal 重写,追踪其中的危险操作(反射调用、文件 I/O、Runtime.exec、JNDI lookup),尝试构造项目特有的 Gadget Chain

典型利用链模式(5 种)

编号链路最终效果典型系数
1Actuator 信息泄露 → 密钥提取 → 伪造 JWT → 管理员越权 → RCECritical0.8
2Shiro RememberMe 默认密钥 → 反序列化 → RCECritical1.0
3文件读取(路径穿越) → 配置泄露(DB 凭据) → SQL 注入写文件 → WebShellCritical0.8
4SSRF → 内网服务探测 → 未授权 Redis → 写 crontab → 反弹 ShellHigh0.6
5SpEL 注入 → RCE(单点链路,条件苛刻需验证 EvaluationContext 类型)Critical0.8

每条链的前置条件、完整步骤、证据要求和降级方案详见 chain-patterns.md

链路可行性验证清单

  • 每一步的前置条件已由上一步的输出满足(数据流可衔接)
  • 网络可达性已确认(防火墙/ACL/安全组不阻断链路中的网络请求)
  • 运行时环境约束已评估(JDK 版本、SecurityManager 是否启用、容器沙箱限制)
  • JDK 版本对 JNDI 远程类加载的限制已考虑(8u121+ RMI / 8u191+ LDAP)
  • 链路中使用的 Gadget Chain 在目标 classpath 中确实存在且版本匹配
  • 降级方案已标注: 某环节不可行时是否存在替代路径(如 RMI 不可用时切换 LDAP/本地 Gadget)
  • 链整体评分已使用 最终效果严重度 x 可行性系数 公式计算
  • 所有环节的 EVID 证据已收集完整,无推测性补全
  • 依赖 CVE 审计已完成三步验证(版本匹配 → 代码路径可达 → 攻击面暴露)

检测清单

  • P4 阶段发现的所有漏洞已按攻击阶段(INFO/AUTH/EXEC)分类
  • 漏洞间的因果关系和数据流衔接已分析
  • Maven/Gradle 依赖树已提取并与 NVD/GitHub Advisory 交叉比对
  • 高频危险依赖的版本范围已逐一核查
  • classpath 中可用 Gadget Chain 已扫描确认
  • 所有可行利用链已按模板记录(前置条件 / 步骤 / EVID / 评分)
  • 每条链的可行性系数已根据环境约束合理赋值
  • 不可行链路已标注原因和降级方案
  • 严重度评分与 pipeline 一致

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 Java Exploit Chain AI skill do?

Java 白盒审计漏洞利用链组装。当需要将 Java 审计中发现的多个漏洞组合为完整攻击路径、 或需要评估 Maven/Gradle 依赖中的已知 CVE 对项目的实际影响时触发。 核心: 单个中低危漏洞通过组合可升级为高危/Critical 利用链。 覆盖: 信息泄露→认证绕过→RCE 的典型链路、Gadget Chain 分析方法(ysoserial/marshalsec)、 Maven 依赖 CVE 审计与实际可利用性评估。

Why use Java Exploit Chain on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/code-audit/java/java-exploit-chain. 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 Java Exploit 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 Java Exploit Chain?

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

Is the Java Exploit 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 👇