Challenge Description
The 4th addition to the “PW Crack” challenge series! How exciting!
Check out the previous challenges if you’re interested:
Downloaded files
In this challenge, we are provided with 3 files, as usual. The files, in no particular order, are level4.flag.txt.enc
, level4.hash.bin
and level4.py
.
Like in the previous “PW Crack” challenges, gibberish is displayed when we run cat
on the flag.txt.enc
and hash.bin
files. The Python script contains the most important clues.
What’s the password in this challenge
The major similarity in all “PW Crack” challenges is that we are only awarded the flag after the correct password has been submitted into the pw_check()
function.
How can we find the correct password?
The above functions in the Python script will always work as expected, so I only zoomed into the
level_4_pw_check()
function and the lines below.Interestingly, this challenge is extremely similar to PW Crack 3 challenge. However, in the previous challenge, we are provided with 7 possible passwords to attempt. This challenge gives us 100.
The approach is similar; I’m still going to iterate through the list of possible passwords with a
for
loop.
Running the script to get the flag
After modifying the provided script, running it will display the flag. Additionally, the output reveals that the correct password was actually the 82nd password in the provided list of possible passwords.
Flag
picoCTF{fl45h_5pr1ng1ng_d770d48c}