I'm working on a CTF challenge that is an introduction to smashing the stack. I have the binary working in GDB, and can overwrite the correct part of the stack with printable characters.
The challenge, however, is that the binary expects 0xdeadbeef in the correct stack location - and I'm a bit stumped on how to input that value. I've seen examples online where python is used to supply hex values as the argument to the binary - but this particular binary runs, prints a query message, THEN expects input, instead of just reading an argument.
What is the best way to handle this, initially in GDB to confirm my approach, and then using NC to receive the actual flag? I'm working on Ubuntu.
Apologies for asking a basic question, but this has been tripping me up.