HackTheBox 0ld is g0ld Challenge
https://app.hackthebox.com/challenges/31
Description
Old algorithms are not a waste, but are really precious…
Exploitation
pdf2john 0ld\ is\ g0ld.pdf > hash.txt
john --wordlist=/usr/share/dict/rockyou.txt hash.txt
we find jumanji69
open the pdf to get
.-. .---- .--. ... .- -- ..- ...-- .-.. -- ----- .-. ... ...--
so lets convert the morse code btw you can use online tools
morse_code = ".-. .---- .--. ... .- -- ..- ...-- .-.. -- ----- .-. ... ...--"
morse_dict = {
'.-': 'A', '-...': 'B', '-.-.': 'C', '-..': 'D', '.': 'E',
'..-.': 'F', '--.': 'G', '....': 'H', '..': 'I', '.---': 'J',
'-.-': 'K', '.-..': 'L', '--': 'M', '-.': 'N', '---': 'O',
'.--.': 'P', '--.-': 'Q', '.-.': 'R', '...': 'S', '-': 'T',
'..-': 'U', '...-': 'V', '.--': 'W', '-..-': 'X', '-.--': 'Y',
'--..': 'Z', '-----': '0', '.----': '1', '..---': '2', '...--': '3',
'....-': '4', '.....': '5', '-....': '6', '--...': '7', '---..': '8',
'----.': '9', '..--..': '?', '-.-.--': '!', '.-.-.-': '.'
}
decoded_message = ''.join(morse_dict[char] if char in morse_dict else '?' for char in morse_code.split())
print('HTB{'+decoded_message+'}')
Summary
0ld is g0ld: reduce the custom rules to a scriptable check and use the smallest reliable path to the flag.