[카테고리:] Wargame

BOF 원정대 – Level 16 (zombie_assassin)

이번 문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – zombie_assassin – FEBP */ #include <stdio.h> #include <stdlib.h> main(int argc, char *argv[]) { char buffer[40]; if(argc < 2){ printf(argv error\n); exit(0); } if(argv[1][47] == '\xbf') { printf(stack retbayed you!\n); exit(0); } if(argv[1][47] == '\x40') { printf(library retbayed …

BOF 원정대 – Level 15 (assassin)

우선 문제소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – assassin – no stack, no RTL */ #include <stdio.h> #include <stdlib.h> main(int argc, char *argv[]) { char buffer[40]; if(argc < 2){ printf(argv error\n); exit(0); } if(argv[1][47] == '\xbf') { printf(stack retbayed you!\n); exit(0); } if(argv[1][47] == '\x40') { …

BOF 원정대 – Level 14 (giant)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – giant – RTL2 */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> main(int argc, char *argv[]) { char buffer[40]; FILE *fp; char *lib_addr, *execve_offset, *execve_addr; char *ret; if(argc < 2){ printf(argv error\n); exit(0); } // gain address of execve fp …

BOF 원정대 – Level 13 (bugbear)

문제 소스는 아래와 같습니다. /* The Lord of the BOF : The Fellowship of the BOF – bugbear – RTL1 */ #include <stdio.h> #include <stdlib.h> 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); } …

BOF 원정대 – Level 12 (darkknight)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – darkknight – FPO */ #include <stdio.h> #include <stdlib.h> void problem_child(char *src) { char buffer[40]; strncpy(buffer, src, 41); printf(%s\n, buffer); } main(int argc, char *argv[]) { if(argc<2){ printf(argv error\n); exit(0); } problem_child(argv[1]); } 소스를 보면 우리가 입력할 수 있는 …

BOF 원정대 – Level 11 (golem)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – golem – stack destroyer */ #include <stdio.h> #include <stdlib.h> extern char **environ; 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 is still your friend.\n); exit(0); …

BOF 원정대 – Level 10 (skeleton)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – skeleton – argv hunter */ #include <stdio.h> #include <stdlib.h> extern char **environ; main(int argc, char *argv[]) { char buffer[40]; int i, saved_argc; if(argc < 2){ printf(argv error\n); exit(0); } // egghunter for(i=0; environ[i]; i++) memset(environ[i], 0, strlen(environ[i])); if(argv[1][47] …

BOF 원정대 – Level 9 (vampire)

이번 문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – vampire – check 0xbfff */ #include <stdio.h> #include <stdlib.h> main(int argc, char *argv[]) { char buffer[40]; if(argc < 2){ printf(argv error\n); exit(0); } if(argv[1][47] != '\xbf') { printf(stack is still your friend.\n); exit(0); } // here is …

BOF 원정대 – Level 8 (troll)

이번 문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – troll – check argc + argv hunter */ #include <stdio.h> #include <stdlib.h> extern char **environ; main(int argc, char *argv[]) { char buffer[40]; int i; // here is changed if(argc != 2){ printf(argc must be two!\n); exit(0); } …

BOF 원정대 – Level 7 (orge)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – orge – check argv[0] */ #include <stdio.h> #include <stdlib.h> extern char **environ; main(int argc, char *argv[]) { char buffer[40]; int i; if(argc < 2){ printf(argv error\n); exit(0); } // here is changed! if(strlen(argv[0]) != 77){ printf(argv[0] error\n); exit(0); …