I'm trying to overwrite the return address caused by a buffer overflow. I've already calculated the distance between the buffer and the return address. The address that I want to jump to is 0x00005555555314
but every time I try to use \x14
in a printf statement it comes up as a blank character.
For example when I use $ perl -e 'print "A"x40 . "\x14\x53\x55\x55\x55\x55" . "\n"'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASUUUU
the character for the /x14
is blank. It's not appearing on the stack either when I look.
Is there anyway to print this character in hexadecimal? Or am I doing something else wrong?
perl -e 'print ....' | xxd
. Then you can observe that the \x14 is actually properly send to the output.