Compute Magic Walkthrough
Challenge Statement#
Attachment: computemagic
Solution#
First, we check the file type.
file computemagic
Since this is an non stripped ELF 64-bit PIE executable, the symbol and function names are visible.
We can now disassemble the binary and view the assembly code.
objdump -d computemagic > disassembly.txt
We find a long switch statement, where each function calls a different function - magic_fail(), read_flag(), check_other().
We also find that the func_24 is the only function that calls the read_flag function correctly.
So, the answer would be to trigger func_24, which can be done when “X” is the input.
Adapted from harishkannan05/THM-HackfinityBattle-Writeup under MIT.