0
#include <string.h>
#include <stdio.h>

void overflowed() {
    printf("%s\n", "Execution Hijacked");
}

void function1(char *str) {
    char buffer[5];
    strcpy(buffer, str);
}

void main(int argc, char *argv[]) {
    function1(argv[1]);
    printf("%s\n", "Executed normally");
}

Hello .. I am trying to execute overflowed() function using eip controlling can anyone show me how to execute it and how to compute offset between two address?

I computed the offset between main and overflowed() and before making breakpoint in the main then I made breakpoint in the main then run with the offset + the address of overflowed() , it is not work.

ndim
  • 35,870
  • 12
  • 47
  • 57

0 Answers0