v10 = __readfsqword(0x28u); //canary加持 v7 = 3LL; LODWORD(stat_loc.__uptr) = 0; v6 = 0LL; sub_4009A6(a1, a2, a3); HIDWORD(stat_loc.__iptr) = open("./flag.txt", 0); if ( HIDWORD(stat_loc.__iptr) == -1 ) { perror("./flag.txt"); _exit(-1); } read(SHIDWORD(stat_loc.__iptr), &buf, 0x30uLL); //flag读到栈上 close(SHIDWORD(stat_loc.__iptr)); puts("This is GUESS FLAG CHALLENGE!"); while ( 1 ) { if ( v6 >= v7 ) //可以利用三次 { puts("you have no sense... bye :-) "); return0LL; } v5 = sub_400A11(); //内部使用fork if ( !v5 ) break; ++v6; wait((__WAIT_STATUS)&stat_loc); } puts("Please type your guessing flag"); gets(&s2); //明显的溢出 if ( !strcmp(&buf, &s2) ) puts("You must have great six sense!!!! :-o "); //只输出正确或失败,整个程序输出不可控 else puts("You should take more effort to get six sence, and one more challenge!!"); return0LL; }