Magus File

Shortly after we solved The Tower Video, some people received an email from the user magus:

It's always interesting what the Tower brings in, how'd you find your way here? Do you have any idea what to do with this file? Getting its skillset takes a particular skill set, I'm curious if you're able to find someone with it.

Attached was a file named "magus".
This file turned out to be an ELF binary file (linux executable).
To execute it you needed to change it to an executable [chmod +x]

Running this file gives the message "MISSING KEY". Running it with a parameter gives "WRONG KEY".

A new hint from magus

I find Ghidra to be a useful option in this space

suggested to reverse engineer the magus file :-o


Starting at main(), the code is basically:

if no argument, print "MISSING KEY" and exit
if length(argument) != 16, print "WRONG KEY" and exit
if checkIfCorrectKey(argument) fails, print "WRONG KEY" and exit
plaintext = XOR( argument, ciphertext ), print plaintext and exit

The ciphertext is present in the binary. You can find it at the end of the disassembly, or by just loading the file in a text editor. It starts one character before "*6o?5".
So we have an XOR Cipher and we have the ciphertext but we needed the key.
The text is pretty long, which means that if we can guess some plaintext we can do a "known plaintext attack" as described here:

Using that script (modified to only try 16-character keys, to save some work) and some guesswork, we found the key: DECOMPILEDRAGONS

You can either run the magus command with the correct key, or you can copy and paste into an online tool like to get the final plaintext:

You really do have some impressive skills. Hopefully soon you can aid us in exploring the Tower. Though soon you may want to find other seekers. Ascending alone will be difficult. Now, send the secret key you found to the Tower to proceed forward.

Sending DECOMPILEDRAGONS to magus returns a new challenge encode DECOMPILEDRAGONS

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License