-
running the
cat.elf
binary prompts for a password -
however, by using
ltrace ./cat.elf
while the program is running, we’re able to see that the validation is made by thestrcmp
function ;
chmod +x cat.elfmadalinux@asgard:~/workspace/ctf_workspace$ ltrace ./cat.elfputs("https://www.youtube.com/watch?v="...https://www.youtube.com/watch?v=oHg5SJYRHA0) = 44printf("The password is: ") = 17__isoc99_scanf(0x562134000a56, 0x7ffeb325c0a0, 0, 0The password is: 7481) = 1strcmp("7481", "{redacted}") = -57
NOTE: for you own safety, don’t open that youtube link :)
- Run the program again and use the password found in the
strcmp
function as input to get the flag.