We first download the 3 challenge files using wget <link1> <link2> <link3>.
Running cat on both level3.hash.bin and level3.flag.txt.enc displayed gibberish, as expected. Let’s dive into the python script provided instead. I used nano to do this so that I can fix the code immediately if required. I’ve attached the full code below.
When we run this script, we are required to enter the correct password to obtain the flag. The flag will only be revealed once our (hashed) password has been validated.
So, what's the correct password that we need to submit?
I noticed an interesting section at the bottom of the script provided:
There seems to be only 7 possible passwords that we need to try. We can either run the script 7 (or less) times and submit a possible password per try, or use a loop to automate the process.
Of course, I chose the second option.
Full script
I’ve commented out the non-essential parts of the original script and only modified the level_3_pw_check() function.
This is the output when I ran the script again:
Password `f09e` is incorrect!
Password `4dcf` is incorrect!
The correct password was: 87ab
Welcome back... your flag, user:
picoCTF{m45h_fl1ng1ng_cd6ed2eb}