Reputation: 4223
I'm trying to overflow a buffer of 64bytes.
The buffer is being filled by a call to gets
My understanding is that I need to write a total of 65 bytes to fill the buffer, and then write another 4 bytes to fill the stack frame pointer.
The next 4 bytes should overwrite the return address.
However, the address that I wish to write is 804846A
.
0x0804846A
? If so, I'm finding it hard to enter 04 (^D) ebp
register to be 0x42414141
The architecture in question is x86.
update: I managed to get ASCII codes 0x04
and 0x08
working. The issue seems to be with 0x84
. I tried copying the symbol corresponding to 0x84
from http://www.ascii-code.com which is apparently „
. However, C seems to resolve this symbol into a representation greater than 1 byte.
I also tried to use ä
as mentioned in http://www.theasciicode.com.ar
This also resulted in a representation greater than 1 byte.
Upvotes: 2
Views: 1168
Reputation: 4353
You seem to be depending on implementation details of a particular compiler and CPU architecture. For example:
Upvotes: 1