hi ,
I am trying to write some value to 0x08049818 which is under GOT section and contains address of Printf fuction. I tried command like
./myprogram \x18\x98\x04\x08%143$n'
according to the books i have reffered it should write value from stack to my address (0x08049818)
but i am getting and error message stating
"segmentation fault"
the C Program which i am using is a sample from a hacking book
here is its source
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] )
{
if( argc != 2 )
{
printf("Error - supply a format string please\n");
return 1;
}
printf( argv[1] );
printf( "\n" );
return 0;
}
i am using Fedora core 9
could you tell me how to solve this problem