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?

  • 1
    Printing something hexadecimal is not a security question, i.e. off-topic here. And it does change the point of your question at all if the output should be used in a buffer overflow or whatever else. But you might just use xxd, i.e. perl -e 'print ....' | xxd. Then you can observe that the \x14 is actually properly send to the output. Commented Apr 30 at 14:24


You must log in to answer this question.

Browse other questions tagged .