This is another tutorial on Buffer Overflow... Here we used the `PROTOSTAR STACK 6` challenge code is used to exploit in Linux x64 Linux.
The tools used in this tutorial is Peda debugger, an extension of GDB(Gnu Debugger). You can use this video also for to understand how to use Peda debugger.
The tools used in this tutorial is Peda debugger, an extension of GDB(Gnu Debugger). You can use this video also for to understand how to use Peda debugger.
Image from: wonderhowto.com |
Source Code
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> void getpath() { char buffer[64]; unsigned int ret; printf("input path please: "); fflush(stdout); gets(buffer); ret = __builtin_return_address(0); printf("No /bin/sh for you\n"); if((ret & 0x700000000000) == 0x700000000000) { printf("bzzzt (%p)\n", ret); _exit(1); } printf("got path %s\n", buffer); } int main(int argc, char **argv) { getpath(); }
1 comments :
Write commentsThe blog was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog, looking forward for more contents...Great job, keep it up.. (h) (h)
Replywebsite design company in united states