The vault door's Java source code (VaultDoorTraining.java) is provided directly — no need to decompile anything. The checkPassword method compares user input to a hardcoded string in the file: you just have to read it.
| Platform | picoGym |
| Category | Rev Eng |
| Points | 100 pts |
| Difficulty | Beginner |
| Tools | javac java text editor |
The challenge provides a complete source file directly, VaultDoorTraining.java, which simulates a vault door. Once compiled and run, the program asks the user to enter a password to "open" the door:
$ java VaultDoorTraining
Enter vault password:
No binary to disassemble, no bytecode to decompile — this is the softest possible starting point of the "Vault-Door" series: the source code is readable as-is.
We open VaultDoorTraining.java in a text editor. The overall structure looks like this:
public 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(0);
if (vaultDoor.checkPassword(input)) {
System.out.println("Access granted.");
} else {
System.out.println("Access denied!");
}
}
public boolean checkPassword(String password) {
// ... the verification logic is here
}
}
We immediately spot the entry point: the checkPassword(String password) method, called right after user input. This is what decides whether access is granted.
Inside checkPassword, there's no complex logic: just a simple comparison between the user input and a string literal hardcoded in the file.
public boolean checkPassword(String password) {
return password.equals("crackthevaultpassword123");
}
The expected password isn't encrypted, encoded, or obfuscated in any way — it's written plainly in the source code, like an ordinary variable.
We just have to copy the string literal found inside .equals("..."). This value is the password the program expects — and in this challenge, once entered correctly, the program directly prints the flag in picoCTF{...} format as its success message.
To confirm, we compile and run the program locally with the JDK, then enter the password we found:
$ javac VaultDoorTraining.java
$ java VaultDoorTraining
Enter vault password: crackthevaultpassword123
Access granted.
picoCTF{...}
The success message confirms that reading the source code was enough — no advanced reverse engineering tools were needed for this first level of the series.
The flag is deliberately hidden — follow the method, you've earned it. 💪
.equals( and suspicious string literals" is one of the very first static analysis tools in reverse engineeringReconstructing a password from a character-by-character check in Java.
Discuss this writeup with the community on the CTFdojo Discord.
Join the Discord →