darkelf

    [LOB] Level7: darkelf → orge (renew)

    [LOB] Level7: darkelf → orge (renew)

    orge /* The Lord of the BOF : The Fellowship of the BOF - orge - check argv[0] */ #include #include 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); } // egghunter for(i=0; environ[i]; i++) memset(environ[i], 0, strlen(environ[i])); if(a..

    [LOS]Level6 darkelf 문제풀이

    [LOS]Level6 darkelf 문제풀이

    query : {$query}"; $result = @mysql_fetch_array(mysql_query($query)); if($result['id']) echo "Hello {$result[id]}"; if($result['id'] == 'admin') solve("darkelf"); highlight_file(__FILE__);?>6번째 줄을 보면 or, and 가 필터링되어 있다.id 값은 guest로 되어있고, id 값이 admin이여야 문제가 풀린다.따라서 or, and를 우회하면 끝날 것 같다.[*] or, and 대체1. or : ||2. and : &&우회하는 법만 알면 풀이는 매우 간단하다