Hacking

Moderators: None (Apply to moderate this forum)
Number of threads: 78
Number of posts: 216

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Format String Problem On Fedora 9 Posted by arunpanakkal on 18 May 2009 at 12:38 AM
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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.