ㅇㅂㅇ

제목은 금고-문-훈련이다.

 

문제를 보면 '최후의 날 프로젝트'의 청사진을 회수하는 임무를 준다.

 

결론은 소스 코드를 분석하라는 내용인 것 같다. 문제에서 java 소스 코드를 다운받아보자.

 

import java.util.*;

class VaultDoorTraining {
    public static void main(String args[]) {
        VaultDoorTraining vaultDoor = new VaultDoorTraining();
        Scanner scanner = new Scanner(System.in); 
        System.out.print("Enter vault password: ");
        String userInput = scanner.next();
	String input = userInput.substring("picoCTF{".length(),userInput.length()-1);
	if (vaultDoor.checkPassword(input)) {
	    System.out.println("Access granted.");
	} else {
	    System.out.println("Access denied!");
	}
   }

    // The password is below. Is it safe to put the password in the source code?
    // What if somebody stole our source code? Then they would know what our
    // password is. Hmm... I will think of some ways to improve the security
    // on the other doors.
    //
    // -Minion #9567
    public boolean checkPassword(String password) {
        return password.equals("w4rm1ng_Up_w1tH_jAv4_eec0716b713");
    }
}

 

자바 코드를 보면 주석으로 패스워드의 안정성을 걱정하는 듯하다.

 

그리고 맨 아래 부분 코드에 입력받은 패스워드를 검사하는 부분을 보면 패스워드가 뭔지 알 수 있다.

 

플래그는 picoCTF{w4rm1ng_Up_w1tH_jAv4_eec0716b713} 이다.

'PicoCTF > WriteUp' 카테고리의 다른 글

[The Numbers] - 50p  (0) 2020.11.29
[Glory of the Garden] - 50p  (0) 2020.11.29
[Insp3ct0r] - 50p  (0) 2020.11.29
[Warmed Up] - 50p  (0) 2020.11.29
[2Warm] - 50p  (0) 2020.11.29

+ Recent posts