As an exercise, we have to exploit insecure code by causing a buffer overflow by inputting to many characters into the console.
The solution requires both assembly code and literal bytes not directly related to instructions be entered. Is there a way to tell gcc that I want some literal value to be placed somewhere in the program?
I'm looking for something like
movl $123, %eax
.lit 0x11 0x22 0x33
Which would result in 0x11 0x22 0x33
being assembled into the output after the movl
instruction's machine-code bytes.
` and ``, and that's if your lucky - some tools use the manpages as documentation! Low level programming sure is hard, but I feel like a significant part of the reason for this the clusterf*uck that are unchangable codebases and standards from 1980 that are outdated as hell but you still have to deal with at every corner. /rant
– Nearoo Nov 21 '19 at 14:08