Category: web
Author: kotsios
If you want something with your heart, then the Univese will give it to you. In the meantime, can you help Morty to escape from the jail?
Reveal Spoiler
# PHP DeserializationThe student has to enumerate the application and find the "backup.php" file The "backup.php" is the same application with another one link in the menu section - "s3r1al1z3.php"
Hint 1: "s3r1al1z3.php" - It indicates the vulnerability is a php deserialization.
Hint 2: The content of the main site changed from: "The universe is basically an animal. It grazes on the ordinary. It creates infinite idiots just to eat them." - Rick
To: "The universe is basically a good hint. It leeds to escape. It creates files to idiot's servers just to hack them." - Rick
Content of the "univese.txt"
<?php
class File
{
public $filename = 'flag.txt';
public $content = 'Try harder';
public function __destruct()
{
file_put_contents($this->filename,$this->content);
}
}
//$o = unserialize($_GET['uxxxxxxe']);
?>
From the last line of the script is the last hint.
Hint 3: The GET parameter for the php deserialization is "universe"
Using the "universe.txt" write a script that upload a malicious file.
I wrote the "deserialise.php" which serialize the malicous "simple_shell.php"
http://192.168.125.11:5052/simple_shell.php?cmd=cat%20/home/flag.txt