Tap into Hash¶
Writeup de Arnold-26, repris avec son autorisation. Source :
cylab-academy-writeups— challenge #466, résolu le 2026-11-23. Flags tronqués.
Catégorie : Reverse Engineering · Challenge : #466 · Résolu le : 2026-11-23
Énoncé¶
Can you make sense of this source code file and write a function that will decode the given encrypted file content? Find the encrypted file here. It might be good to analyze source file to get the flag.
Résolution¶
Méthode : déchiffrement XOR du blockchain.
block_chain.py chiffre une chaîne de hashes de blocs par XOR repetitif avec sha256(key)[:16], après y avoir insere le flag au milieu. Le fichier enc_flag donne la clé et le chiffre : un XOR avec sha256(key)[:16] puis depadding PKCS#7 révèle le flag au milieu de la chaîne de hashes.