Prompt
We need to break into a program that the hackers have created. You will need to provide the identifier in your prompt (should be a 4 digit value) as the only argument to the program.
Walk-Through
This challenge involves using a debugger to exploit a compiled binary. One possible tool to use is the “GDB” Linux program. A Linux binary is provided and the user is tasked with extracting the secret flag. This can be solved by attaching GDB to the provided binary to help search for any clues in the program. The GDB command, info functions
will return a list of all the functions that are in scope. This list contains an interesting function called getflagbytid
and can be called by breaking on line 1 of the main function and using the “call” command in GDB.
(we use the example identifier of 1234
, your solution will vary based on the identifier you use)
In newer versions of GDB, you may need to prefix the return type a type for GDB to call the function successfully, e.g. call (void) getflagbytid(1234)
.
This challenge can also be completed by reversing the binary in Ghidra as shown for Binary 1.
Questions
What is the flag hidden in the program?
©️ 2024 Cyber Skyline. All Rights Reserved. Unauthorized reproduction or distribution of this copyrighted work is illegal.