Vault Doors
vault-door-training
Author: Mark E. Haase
Description
Your mission is to enter Dr. Evil's laboratory and retrieve the blueprints for his Doomsday Project. The laboratory is protected by a series of locked vault doors. Each door is controlled by a computer and requires a password to open. Unfortunately, our undercover agents have not been able to obtain the secret passwords for the vault doors, but one of our junior agents obtained the source code for each vault's computer! You will need to read the source code for each level to figure out what the password is for that vault door. As a warmup, we have created a replica vault in our training facility. The source code for the training vault is here: VaultDoorTraining.java
Solution
When we open java code we see checkPassword function, with the flag.
public boolean checkPassword(String password) {
return password.equals("w4rm1ng_Up_w1tH_jAv4_eec0716b713");
}Flag; picoCTF{w4rm1ng_Up_w1tH_jAv4_eec0716b713}
vault-door-1
Description
This vault uses some complicated arrays! I hope you can make sense of it, special agent. The source code for this vault is here: VaultDoor1.java
Solution
The checkPassword functions validates the password character by character, but in a weird order...
I used CyberChef to sort, extract and join the characters.

RegEx pattern '(.)':
Flag: picoCTF{d35cr4mbl3_tH3_cH4r4cT3r5_ff63b0}
vault-door-2
...Challenge Missing From PicoCTF...
vault-door-3
Description
This vault uses for-loops and byte arrays. The source code for this vault is here: VaultDoor3.java
Solution
Password checker seems awfully hard to solve, but awfully easy to reverse the process.
Tweeking the logic a bit and modifing the function:
{% hint style="success" %} Flag: picoCTF{jU5t_a_s1mpl3_an4gr4m_4_u_1fb380} {% endhint %}
vault-door-4
Description
This vault uses ASCII encoding for the password. The source code for this vault is here: VaultDoor4.java
Solution
Each byte from myBytes represents ASCII code. We can take each byte, convert it into char and create a flag.
{% hint style="success" %}
Flag: picoCTF{jU5t_4_bUnCh_0f_bYt3s_c194f7458e}
{% endhint %}
{% hint style="info" %}myBytes contains numbers in different bases, but using conversion Java takes care of it.
{% endhint %}
vault-door-5
Description
In the last challenge, you mastered octal (base 8), decimal (base 10), and hexadecimal (base 16) numbers, but this vault door uses a different change of base as well as URL encoding! The source code for this vault is here: VaultDoor5.java
Solution
The code first encodes password with URL Encoding and then Base64. To decode we must do reverse => Base64 Decode -> URL Decode. Without diving in too much code we can utilize CyberChef again to get the flag.
{% hint style="success" %}
Flag: picoCTF{c0nv3rt1ng_fr0m_ba5e_64_0b957c4f}
{% endhint %}
vault-door-6
Description
This vault uses an XOR encryption scheme. The source code for this vault is here: VaultDoor6.java
Solution
XOR Cipher is a symetric cipher, meaning plaintext can be encoded with KEY and ciphertext decoded with the same KEY. Since we know the KEY decryption is simple.
{% hint style="success" %} Flag: picoCTF{n0t_mUcH_h4rD3r_tH4n_x0r_95be5dc} {% endhint %}
vault-door-7
Description
This vault uses bit shifts to convert a password string into an array of integers. Hurry, agent, we are running out of time to stop Dr. Evil's nefarious plans! The source code for this vault is here: VaultDoor7.java
Solution
The program is using Bitwise OR and Logical Shift operations to convert password to array of integers, which have been modified by operations.
This part flag[index * 4 + i] = (char) ((flag_byte >> (8 * (3 - i))) & 0xFF) is simply automatated loop instead of 4 lines of code.
Important part is (flag_byte >> (8 * (3 - i))) & 0xFF. First reverse the shift and then mask with Bitwise AND to ensure that only the least significant byte (8 bits) is extracted.
{% hint style="success" %} Flag: picoCTF{A_b1t_0f_b1t_sh1fTiNg_07990cd3b6} {% endhint %}
vault-door-8
Description
Apparently Dr. Evil's minions knew that our agency was making copies of their source code, because they intentionally sabotaged this source code in order to make it harder for our agents to analyze and crack into! The result is a quite mess, but I trust that my best special agent will find a way to solve it. The source code for this vault is here: VaultDoor8.java
Solution
First of all the code is a mess! Let's format it so we can read it. I used VSCode to do this F1 -> Format Document (Prettier Extension).
For now switchBits is not important, as desciption says it switchs bits positions and that's it. We should focus on scramble, if we reverse the process of bit switching we should get the original flag. Not the positions, but the order.
{% hint style="success" %} Flag: picoCTF{s0m3_m0r3_b1t_sh1fTiNg_89eb3994e} {% endhint %}
Last updated