# Freddie's Files 
 
## FLAG:`UMDCTF-{pHR3dd13_m3RcURY_w0uld_83_pR0uD}`### SolutionAfter downloading the FreddiesFiles.zip file, we had to crack it as it was password protected. This was done thanks to [John The Ripper](https://github.com/openwall/john) with the following commands:```consoleasd@asd:~/Scrivania/UMDCTF$ zip2john FreddiesFiles.zip > tocrackver 2.0 efh 5455 efh 7875 FreddiesFiles.zip/ciphertext.txt PKZIP Encr: 2b chk, TS_chk, cmplen=91, decmplen=319, crc=293BF639ver 1.0 efh 5455 efh 7875 FreddiesFiles.zip/key.txt PKZIP Encr: 2b chk, TS_chk, cmplen=44, decmplen=32, crc=9BC81710ver 2.0 efh 5455 efh 7875 FreddiesFiles.zip/queen.txt PKZIP Encr: 2b chk, TS_chk, cmplen=6588, decmplen=16538, crc=2D86B827NOTE: It is assumed that all files in each archive have the same password.If that is not the case, the hash may be uncrackable. To avoid this, useoption -o to pick a file at a time.asd@asd:~/Scrivania/UMDCTF$ john --wordlist=rockyou.txt tocrackUsing default input encoding: UTF-8Loaded 1 password hash (PKZIP [32/64])No password hashes left to crack (see FAQ)asd@asd:~/Scrivania/UMDCTF$ john --show tocrackFreddiesFiles.zip:qfreddie78::FreddiesFiles.zip:key.txt, ciphertext.txt, queen.txt:FreddiesFiles.zip
1 password hash cracked, 0 left```
After recovering the password (*qfreddie78*) and unpacking the zip file, we extracted 3 files: [ciphertext.txt](FreddiesFiles/ciphertext.txt), [key.txt](FreddiesFiles/key.txt) and [queen.txt](FreddiesFiles/queen.txt).
We started to think what could be done with these 3 files and looking at the *key* we noticed that it was an MD5, so, at first, we saw if it was a known hash and we did not arrive at a result, then seeing the *queen* file we tried to crack the *key* (always with John The Ripper) using the *queen.txt* file as wordlist and we had a result.```consoleasd@asd:~/Scrivania/UMDCTF/FreddiesFiles$ john --wordlist=queen.txt key.txt --format=Raw-MD5Using default input encoding: UTF-8Loaded 1 password hash (Raw-MD5 [MD5 256/256 AVX2 8x3])No password hashes left to crack (see FAQ)asd@asd:~/Scrivania/UMDCTF/FreddiesFiles$ john --show --format=Raw-MD5 key.txt ?:Buddy, you're a boy, make a big noise
1 password hash cracked, 0 left```
At this point, doing the [xor](http://xor.pw/#) of the key with the ciphertext you get the flag! 
 