Insecure Deserialization
Identification
White-Box Approach (Access to the source code)
Check for serialisation functions like:
And others.
TIP: We must pay special attention to any point where user-supplied input might be passed directly to these functions.
Black-Box Approach (No access to the source code)
1) Analysing Server Responses
2) Examining Cookies
Cookies are often used to store serialised data in web applications. By examining the contents of cookies, one can usually infer:
3) Append a tilde (~) at the end of a PHP file
Exploitation Techniques
1) Update Properties of an object
Storing User Data in Cookies:
Exploitation steps:
2) Object Injection
Object injection is a vulnerability that arises from insecure data deserialisation in web applications. It occurs when untrusted data is deserialised into an object, allowing attackers to manipulate the serialised data to execute arbitrary code, leading to serious security risks.
Requirements:
Knowledge of code that handles deserialization blindly without user input sanitization or any security measures have been implemented in the code.
Steps:
Last updated