Wargame
-
lvl 07 darkelf ->argeWargame/HackerSchool The Load of the BOF Redhat 2019. 3. 14. 14:16
→ 소스코드는 아래와 같다. 1 /* 2 The Lord of the BOF : The Fellowship of the BOF 3 - orge 4 - check argv[0] 5 */ 6 7 #include 8 #include 9 10 extern char **environ; 11 12 main(int argc, char *argv[]) 13 { 14 char buffer[40]; 15 int i; 16 17 if(argc < 2){ 18 printf("argv error\n"); 19 exit(0); 20 } 21 22 // here is changed! 23 if(strlen(argv[0]) != 77){ 24 printf("argv[0] error\n"); 25 exit(0); 26 } 27 28 ..
-
lvl 06 wolfman -> darkelfWargame/HackerSchool The Load of the BOF Redhat 2019. 3. 11. 09:13
→ 소스코드는 아래와 같다. 1 /* 2 The Lord of the BOF : The Fellowship of the BOF 3 - darkelf 4 - egghunter + buffer hunter + check length of argv[1] 5 */ 6 7 #include 8 #include 9 10 extern char **environ; 11 12 main(int argc, char *argv[]) 13 { 14 char buffer[40]; 15 int i; 16 17 if(argc < 2){ 18 printf("argv error\n"); 19 exit(0); 20 } 21 22 // egghunter 23 for(i=0; environ[i]; i++) 24 memset(environ[i]..
-
lvl 05 orc -> wolfmanWargame/HackerSchool The Load of the BOF Redhat 2019. 3. 11. 09:12
→ 소스코드는 아래와 같다. 1 /* 2 The Lord of the BOF : The Fellowship of the BOF 3 - wolfman 4 - egghunter + buffer hunter 5 */ 6 7 #include 8 #include 9 10 extern char **environ; 11 12 main(int argc, char *argv[]) 13 { 14 char buffer[40]; 15 int i; 16 17 if(argc < 2){ 18 printf("argv error\n"); 19 exit(0); 20 } 21 22 // egghunter 23 for(i=0; environ[i]; i++) 24 memset(environ[i], 0, strlen(environ[i])); ..
-
lvl 04 goblin -> orcWargame/HackerSchool The Load of the BOF Redhat 2019. 3. 8. 10:34
→ 소스코드는 아래와 같다. 1 /* 2 The Lord of the BOF : The Fellowship of the BOF 3 - orc 4 - egghunter 5 */ 6 7 #include 8 #include 9 10 extern char **environ; 11 12 main(int argc, char *argv[]) 13 { 14 char buffer[40]; 15 int i; 16 17 if(argc < 2){ 18 printf("argv error\n"); 19 exit(0); 20 } 21 22 // egghunter 23 for(i=0; environ[i]; i++) 24 memset(environ[i], 0, strlen(environ[i])); 25 26 if(argv[1][47]..