This post spoils a CTF challenge … Don’t read if you want to try it !

SantHackLaus is a Jeopardy CTF challenge. It is organized by IMT Lille Douai. I had a great time solving these challenges :D

Random Secret Message is a crypto challenge. We need to recover the encrypted message to find the flag. You can get the archive here.

In this archive, we found 3 files : public.key, encryptedKey and encryptedMessage.

Using RsaCtfTool, we can recover the private key associated with the public one provided : rsactftool --publickey public.key --private >> private.key.

This private key can be used to decrypt the encrypted key file : openssl rsautl -decrypt -inkey private.key -in encryptedKey -out decryptedKey.

The decrypted key is : “My_WiF3_d0eSn’T_h4v3_T0_kN0w_Th1s_Symm3tr1k_k3Y”.

We can now decrypt the final message with this key : openssl enc -d -aes-256-cbc -in encryptedMessage -out decryptedMessage -pass file:./decryptedKey.

Flag is : IMTLD{Th1S_w4s_4_R3allY_w3aK_RS4_k3y}.

[+] Bye

Feel free to tell me what you think about this post :)