DarkKnight

    [LOB] Level13: darkknight → bugbear

    [LOB] Level13: darkknight → bugbear

    bugbear keyword : RTL /* The Lord of the BOF : The Fellowship of the BOF - bugbear - RTL1 */ #include #include main(int argc, char *argv[]) { char buffer[40]; int i; if(argc < 2){ printf("argv error\n"); exit(0); } if(argv[1][47] == '\xbf') { printf("stack betrayed you!!\n"); exit(0); } strcpy(buffer, argv[1]); printf("%s\n", buffer); } 분기문을 통해 RET 부분에 덮여씌워지는 주소 앞주소'\xbf'를 필터링 한다. 즉, '\xbf'로 시작하..

    [LOB] Level12: golem → darkknight

    [LOB] Level12: golem → darkknight

    Darkknight /* The Lord of the BOF : The Fellowship of the BOF - darkknight - FPO */ #include #include void problem_child(char *src) { char buffer[40]; strncpy(buffer, src, 41); printf("%s\n", buffer); } main(int argc, char *argv[]) { if(argc