[카테고리:] BOF 원정대

BOF 원정대 – Level 20 (death_knight)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – dark knight – remote BOF */ #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/wait.h> #include <dumpcode.h> main() { char buffer[40]; int server_fd, client_fd; struct sockaddr_in server_addr; struct sockaddr_in client_addr; int …

BOF 원정대 – Level 19 (xavius)

우선 문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – xavius – arg */ #include <stdio.h> #include <stdlib.h> #include <dumpcode.h> main() { char buffer[40]; char *ret_addr; // overflow! fgets(buffer, 256, stdin); printf(%s\n, buffer); if(*(buffer+47) == '\xbf') { printf(stack retbayed you!\n); exit(0); } if(*(buffer+47) == '\x08') { printf(binary …

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) …

BOF 원정대 – Level 17 (succubus)

문제 소스는 아래와 같다. /* The Lord of the BOF : The Fellowship of the BOF – succubus – calling functions continuously */ #include <stdio.h> #include <stdlib.h> #include <dumpcode.h> // the inspector int check = 0; void MO(char *cmd) { if(check != 4) exit(0); printf(welcome to the MO!\n); // olleh! system(cmd); } void YUT(void) { …

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); …