segment .text global retaddr retaddr: enter 0,0 lea eax, [ebp + 8] leave ret
fakeint.c
#include <stdio.h> int *retaddr (int); int main (void) { printf ("%s\n", * retaddr ("Hello World")); return 0; }
Compiling:
nasm -f elf retaddr.asm
gcc -o fake fake.c retaddr.o
This will raise some warnings ... but
at least here works (:
Nenhum comentário:
Postar um comentário