Natas Level 7 -> Level 8
Skills: PHP, Encoding/decoding data formats
Visiting source of the homepage, we see little PHP encodedSecret() function and a $encodedSecret value -
All we need to need do is reverse engineer the function and find a plaintext password.
We focus on the return of the function where it performs some conversion.
First, the plaintext $secret is base64 encoded and then reversed using strrev function and then converted to hex.
We should perform exact opposite on the target value -
We can write one-liner reverse engineering script in PHP - We perform hex2bin() first, then strrev() and base64 decode.
Great!!! We decoded the exact plain text for the encoded/scrambled hex string.
Submitting "oubWYf2kBq" in the homepage, we should see password for next level -
Last updated