Web deserialization

From NoorQureshi/security-skills · View interactive version

Web deserialization is an AI agent skill from the GitHub repository NoorQureshi/security-skills. Insecure deserialization → RCE via gadget chains. Load when the app deserializes attacker data: Java (rO0/AC ED base64), PHP `unserialize` (O:), Python pickle, .NET BinaryFormatter/ViewState, Ruby Marshal/YAML. Signals: serialized blobs in cookies/params, `__VIEWSTATE`, `rO0AB`, `O:8:`.

How to use this skill

Skill file

Insecure deserialization

When it applies

The app takes serialized objects from the client (cookies, hidden fields, params, message

queues) and deserializes them. Recognizable by format markers.

Why it works

Deserialization reconstructs objects and can invoke their methods (magic methods, readObject,

__wakeup). A crafted object graph ("gadget chain") strings together existing library methods

to reach a dangerous sink — command execution — during/after deserialization.

Method

Payloads & full variation set: CODE0 next to this file — work the set, not the first line.

  1. Spot the blob & format: Java rO0AB/AC ED 00 05, PHP O:8:"...":, .NET

__VIEWSTATE/AAEAAAD, Python pickle, Ruby Marshal \x04\x08.

  1. Confirm it's deserialized untrusted: tamper a byte → parse error/behaviour change.
  2. Generate a gadget chain with the right tool for a library on the classpath:
  1. Deliver in the sink; start with an OOB command (curl/nslookup to your host) as safe proof.

Gotchas

Verify success

An OOB callback or command output proving code executed during deserialization.

References

ysoserial / phpggc / ysoserial.net; PortSwigger deserialization labs; OWASP.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.