Insecure Deserialization: practice machines and key commands
By Daniel Dayan ยท Updated
Insecure deserialization lets an attacker supply a crafted serialized object that triggers dangerous code during parsing. It is most common in Java, PHP, Python pickle and .NET applications. Look for serialized blobs in cookies, hidden fields and API bodies: Java streams start with rO0 in base64 and PHP uses readable O:4:"User" strings. Gadget chains in libraries on the classpath do the actual damage, and tools such as ysoserial generate them for Java. Even without a working chain, tampering with a serialized object can change roles or flags. The bug class also shows up in Jenkins, Log4j style JNDI lookups and other Java middleware, where a patched version is the only complete fix. Always confirm the framework version before sending payloads. These machines are good practice for spotting and exploiting the pattern.
Key commands
Placeholders in braces, such as {TARGET_IP}, are values you fill in for your target.
Recognise a Serialized Data Format
Spot the format of a blob found in a cookie, hidden field or API body before picking a gadget-chain tool: Java streams start with rO0 in base64 (or ac ed in hex), PHP uses readable O:4:"User" strings, and Python pickle starts with \x80.
echo "<captured_value>" | base64 -d 2>/dev/null | xxd | head -n 1Decode a Captured Serialized Blob
Base64-decode an intercepted serialized object to a file so its structure can be inspected before building or modifying a gadget chain.
echo "<captured_value>" | base64 -d > blob.bin && xxd blob.bin | less
Keep going
- Methodology: Phase 04: Foothold Execution & Initial Access
- Cheatsheet: Exploitation & Payloads
Insecure Deserialization machines (15)
1 of these are machines I solved myself and are listed first within each difficulty. 10 Linux, 5 Windows.
Listed when a machine has a catalog tag that is one of: deserialization, java deserialization, log4j, pickle, ysoserial, jenkins. Capital letters, hyphens and underscores are ignored, and the tags that matched come first in each row.
Insecure Deserialization at a glance
- By platform: 11 Hack The Box, 4 TryHackMe.
- On these practice lists: OSCP (5), CWEE (5), CPTS (4), Unofficial IppSec CPTS (3), HTB Active Directory (2), OSWE (2).
- Solved by me, with a page here: Pennyworth (Linux Very Easy).
Very Easy (2)
| Machine | Platform | OS |
|---|---|---|
| Pennyworth | HTB | Linux |
| Unified | HTB | Linux |
Easy (4)
| Machine | Platform | OS |
|---|---|---|
| Alfred | THM | Windows |
| Broker IppSec | HTB | Linux |
| Crafty IppSec | HTB | Windows |
| Tony the Tiger | THM | Linux |
Medium (4)
| Machine | Platform | OS |
|---|---|---|
| Arkham IppSec | HTB | Windows |
| Jacob the Boss | THM | Linux |
| Scrambled IppSec | HTB | Windows |
| Time IppSec | HTB | Linux |
Hard (4)
| Machine | Platform | OS |
|---|---|---|
| Feline IppSec | HTB | Linux |
| Internal | THM | Linux |
| Monitors IppSec | HTB | Linux |
| Object | HTB | Windows |
Insane (1)
| Machine | Platform | OS |
|---|---|---|
| Fatty IppSec | HTB | Linux |
Related techniques
Related guides: TJ Null OSCP list, OSCP exam scoring and time budget, OSCP vs CPTS, OSCP report template.
Practise it, then track it.
Log every box and the commands you used in ZeroBox.