OverTheWire - Natas - Level 7 → Level 8
Warning: This post contains a solution!
Only continue if:
1.) you want to see a possible alternative solution or
2.) you are stuck and need a hint!
1.) you want to see a possible alternative solution or
2.) you are stuck and need a hint!
Login using given credentials.
URL: http://natas8.natas.labs.overthewire.org
Username: natas8
Password: DBfUxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Following code is used to verify the entered secret, as available in the site sourcecode:
|
|
The entered secret is compared with the $encodedSecret
to verify the entered secret. Based on the code, the entered secret is:
- Base64 encoded:
base64_encoded
- String reversed:
strrev()
- Converted from binary to hex:
bin2hex()
The solution is simple, just take the value from $encodedSecret
and execute the steps backwards to get the valid secret.