// Payloads · Insecure Deserialization

Insecure Deserialization

Insecure Deserialization

Serialization is the process of turning some object into a data format that can be restored later. People often serialize objects in order to save them to storage, or to send as part of communications. Deserialization is the reverse of that process — taking data structured from some format, and rebuilding it into an object - OWASP

Summary

Deserialization Identifier

Check the following sub-sections, located in other chapters :

Object TypeHeader (Hex)Header (Base64)Indicators
.NET ViewStateFF 01/wCommonly found inside hidden inputs around HTML forms
BinaryFormatter0001 0000 00FF FFFF FF01AAEAAADBase64 decode and check for the long FF FF FF FF sequence.
Java SerializedAC EDrOBase64 decode and check first bytes.
PHP Serialized4F 3ATzPrefixes like O:, a:, s:, i:, b: and length indicators.
Python Pickle80 04 95gASVText: opcodes like (lp0, S'Test'.
Ruby Marshal04 08BAgKBase64 decode and look for \x04\x08 at the start.

POP Gadgets

A POP (Property Oriented Programming) gadget is a piece of code implemented by an application’s class, that can be called during the deserialization process.

POP gadgets characteristics:

  • Can be serialized
  • Has public/accessible properties
  • Implements specific vulnerable methods
  • Has access to other “callable” classes

Labs

References

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.