labs
Lab - 1: Modifying serialized objects (A)
This lab uses a serialization-based session mechanism and is vulnerable to privilege escalation as a result. To solve the lab, edit the serialized object in the session cookie to exploit this vulnerability and gain administrative privileges. Then, delete Carlos's account. You can log in to your own account using the following credentials: wiener:peter
enter with the user
wiener
and at my-account page
we are interested in the
Cookie: session
and if select that value ('Tzo0OiJVc2VyIjoyOntzOjg6InVzZXJuYW1lIjtzOjY6IndpZW5lciI7czo1OiJhZG1pbiI7YjowO30%3d') in Burp (after decoding from URL and base64), the following result will be seen.
send it to Repeater and change the
b:0
tob:1
then send request to
/admin
and found an admin interface
Lab - 2: Modifying serialized data types (P)
This lab uses a serialization-based session mechanism and is vulnerable to authentication bypass as a result. To solve the lab, edit the serialized object in the session cookie to access the administrator account. Then, delete Carlos. You can log in to your own account using the following credentials: wiener:peter
login with wiener
session cookie is as follow:
after encoding
if try to access
/admin
panel -> 401 responsechange the session cookie as follow:
the encoded version as follow
now we can access as administrator
Lab - 3: Using application functionality to exploit insecure deserialization (P)
This lab uses a serialization-based session mechanism. A certain feature invokes a dangerous method on data provided in a serialized object. To solve the lab, edit the serialized object in the session cookie and use it to delete the morale.txt file from Carlos's home directory. You can log in to your own account using the following credentials: wiener:peter ;You also have access to a backup account: gregg:rosebud
login with
wiener
account and Delete the accountgrep the POST request of delete
after decoding the session cookie:
changing the cookie into
then decode and send this request
Lab - 4: Arbitrary object injection in PHP (P)
This lab uses a serialization-based session mechanism and is vulnerable to arbitrary object injection as a result. To solve the lab, create and inject a malicious serialized object to delete the morale.txt file from Carlos's home directory. You will need to obtain source code access to solve this lab. You can log in to your own account using the following credentials: wiener:peter
login with
wiener
in Burp sitemap, there is a file at
/libs/CustomTemplate.php
GET request to this file appending
~
to read the source code, like this
in response, find a magic function
__destruct()
send a request containing the session cookie to Burp Repeater
replace the session cookie with the following
Lab - 5: Exploiting Java deserialization with Apache Commons (P)
This lab uses a serialization-based session mechanism and loads the Apache Commons Collections library. Although you don't have source code access, you can still exploit this lab using pre-built gadget chains. To solve the lab, use a third-party tool to generate a malicious serialized object containing a remote code execution payload. Then, pass this object into the website to delete the morale.txt file from Carlos's home directory. You can log in to your own account using the following credentials: wiener:peter
Last updated