[태그:] strcpy

BOF 원정대 – Level 18 (nightmare)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – nightmare – PLT */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dumpcode.h> main(int argc, char *argv[]) { char buffer[40]; char *addr; if(argc < 2){ printf(argv error\n); exit(0); } // check address addr = (char *)&strcpy; if(memcmp(argv[1]+44, &addr, 4) …