[lob] darkknight -> bugbear
·
Wargame/Hackerchool
1. intro 2. code 및 분석 2.1 C code /* 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); } 2.3. 분석 2.3.1. assembler code (중요 부분) 지금까지는 retu..
[lob] golem -> darkknight
·
Wargame/Hackerchool
1. intro 2. code 및 분석 2.1 C code /* 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