A vulnerability that’s like that quiet neighbor you never notice, until they set your house on fire.
Let’s be honest. In the great world of penetration testing, Insecure Deserialization is like the middle child. It doesn’t get the same immediate love as SQL Injection (the golden child) or XSS (the annoying toddler that is everywhere :]). Most developers look at a serialized object and say, “It’s just a stream of bytes, what could go wrong?”
If you think passing data back and forth between your server and client is just simple “data transport,” you are in for a very wrong impression.
In this blog, we are going to dissect this vulnerability from the absolute basics to the “shell popping” finale. Grab a coffee 🍵 You might need it 😃.
Press enter or click to view image in full size
Before we break things, we need to understand how they work.
Imagine you have a complex object in your code. Maybe it’s a User object with a username, a role, and maybe a stash of API keys. This object lives happily in your computer’s memory (RAM). But RAM is volatile, if you turn off the server, the object dies. Tragic.
To save this object (to a file, database, or send it over a network), we need to…