Im trying to understand buffer overflows
*include<string.h>
int main(int argc, char **argv){
char buf[256];
strcpy(buf, argv[1]);
}
This code is vulnerable to buffer overflow. Im trying to learn about exploiting these kind of codes, so, I know its common to make it spawn a shell, but what would I input if I wanted to make the program print out "hello world" ? Is it A*256 cout<<"hello world" ?
I know I have to overwrite the memory and such, but I dont know the details. Can someone explain to me how and why it it possible to exploit the code above ?
Buffer and stack overflows are a tricky subject,if you want to get a deep understanding of these exploits check out a book called, "hacking the art of exploitation".Other than that I can't help you since I'm very new to the subject aswell.Can any one tell me how to run these exploits against a server,I know u have to have the right permissions,but other than that i'm lost.:whoa: