006 - 3
We’ve finally got a foothold in Janus’ network, and we’re ready to take them down. This time we’ve recovered a small batch of passwords that seem to belong to various henchmen in his organisation. We’ll need all of them cracked so we can do as much damage as possible this time around. Are you up to the task?
byuctf{password1_password2_password3_password4}
The file 006_3.txt contains four 128-character hexadecimal values. That length points toward a 512-bit digest, but I still checked them with hash-identifier rather than assuming.
$ hash-identifier
HASH: 6328C530F895CA13C75E161DEC260EC2C0BED4FCFF1B34448EA16A7FFFFA5CDC403E5CC83B23321E9AD3280952BE2ADB037DD7AFA3084B7E940C6A655B2F13BA
Possible Hashs:
[+] SHA-512
[+] Whirlpool
All four hashes receive the same result. SHA-512 is the likely choice, so I loaded the file into John the Ripper with the raw SHA-512 format and started with rockyou.txt.
$ john --format=raw-sha512 \
--wordlist=/usr/share/wordlists/rockyou.txt 006_3.txt
goldeneye007 (?)
goldeneye641 (?)
2g 0:00:00:01 DONE
2 password hashes cracked, 2 left
Only half of the hashes cracked, but the results are much more useful than two unrelated passwords would have been. Both follow the same pattern: the word goldeneye followed by three digits.
There are only one thousand possible suffixes, so instead of throwing a larger generic wordlist at the remaining hashes I generated the exact candidate space with Crunch.
$ crunch 12 12 0123456789 -t goldeneye@@@ > 006-wordlist.txt
Crunch will now generate the following number of lines: 1000
$ head 006-wordlist.txt
goldeneye000
goldeneye001
goldeneye002
Running John again with the custom list immediately finds the other two values.
$ john --format=raw-sha512 --wordlist=006-wordlist.txt 006_3.txt
goldeneye159 (?)
goldeneye069 (?)
2g 0:00:00:00 DONE
4 password hashes cracked, 0 left
At this point we know all four passwords, but John’s anonymous (?) labels do not tell us which password belongs to which line. The flag requires the original order, so that mapping matters.
I edited the input file and added a temporary username before each hash:
v0lk3n-1:6328C530F895CA13C75E161DEC260EC2C0BED4FCFF1B34448EA16A7FFFFA5CDC403E5CC83B23321E9AD3280952BE2ADB037DD7AFA3084B7E940C6A655B2F13BA
v0lk3n-2:3FAE7E18F9004673D0E68CA10264A1ABAF76FBF42E60D960A1B95289401146E4BF39E599641C730DB8F664F7F1DD02F171BEB4730AC756AAC7CF40C6BC4D623A
v0lk3n-3:5C6E3A016FC76F6EC3E062F266977A2C32FD875F0911323256B50A7AA6E24A8C0AD4E6225CA07A73BA1487A83AD7F058CE77345969F1FC04FD6168C15A39EB00
v0lk3n-4:A7383D14CF904E91C0F0226CC926CC6CA7CF91F1907025AE961627B444C412247823DA87C3AF69D8A490538554F6E59E972D4EE861726A7B2B3D808CD5096A5B
John already has the recovered values in its pot file, so --show now gives us the ordered mapping without cracking anything again.
$ john --format=raw-sha512 --show 006_3.txt
v0lk3n-1:goldeneye007
v0lk3n-2:goldeneye641
v0lk3n-3:goldeneye069
v0lk3n-4:goldeneye159
4 password hashes cracked, 0 left
Putting those passwords into the required format gives us the flag:
byuctf{goldeneye007_goldeneye641_goldeneye069_goldeneye159}