Skip to content

Course

Deserialization Attacks

Insecure deserialization across Java, PHP, Python, and .NET — how gadget chains turn data into code execution, why pickle and YAML keep burning teams, and how to design serialization that does not become a remote-control protocol.

9 lessons

Course Q&A

Reviews

Enrolled members can rate this course.

No reviews yet.

Attack Surface and Mental Model

Why deserializers are interpreters, how object injection works, and where exploitation stops being theoretical.

  1. 01Deserializers Are InterpretersThe core mental model: a deserializer does not merely load data — it executes a construction program supplied by whoever wrote the bytes.22mOpen
  2. 02The Anatomy of Object InjectionHow malformed object graphs abuse constructors, magic methods, callbacks, and property writes long before business logic sees the object.20mOpen
  3. 03Impact, Blast Radius, and What Attackers Actually WantWhy deserialization bugs often become RCE, when they stop at data tampering or denial of service, and how deployment details decide severity.18mOpen

Language Gadgets and Payloads

Java, PHP, Python pickle, and YAML attack paths — the idioms attackers look for and the code shapes defenders should recognize.

  1. 01Java Native Deserialization and Gadget ChainsJava serialization turns classpaths into exploit toolkits — how readObject, reflection, and commons-collections-style chains work conceptually.24mPremium
  2. 02PHP Object InjectionPHP unserialize exploits autoloading and magic methods — the framework conventions attackers exploit and the signatures defenders should hunt.22mPremium
  3. 03Python Pickle and YAML Pitfallspickle is executable by design, PyYAML has multiple loaders with very different behavior, and compatibility migrations often preserve the vulnerability.25mPremium

Safe Serialization and Defense

.NET-specific traps, safer data formats, validation boundaries, and practical hardening for legacy systems.

  1. 01.NET Serializer TrapsBinaryFormatter is the obvious villain, but type-name handling in JSON.NET, XML serializers, and formatter-style callbacks create quieter exposure.21mPremium
  2. 02Safe Formats, Schemas, and Validation BoundariesChoose formats that carry data rather than object behavior, validate at the trust boundary, and construct application objects explicitly.23mPremium
  3. 03Hardening and Migrating Legacy DeserializersA practical defense plan for systems that cannot switch formats overnight: inventory, isolate, constrain, monitor, and retire dangerous paths.24mPremium