diff options
Diffstat (limited to 'scarymaze/README.md')
| -rw-r--r-- | scarymaze/README.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/scarymaze/README.md b/scarymaze/README.md new file mode 100644 index 0000000..9ea4f80 --- /dev/null +++ b/scarymaze/README.md @@ -0,0 +1,35 @@ +# scarymaze + +"I tried to get to level 489, but I was too scared." + +I was hoping that the strings from OpenSSL would make it fairly easy to +determine the behavior of the following function, but that was not the case. No +one had solved the challenge until it was re-released with symbols included. + +```rust +fn my_encrypt(packet: &[u8]) -> Vec<u8> { + let mut rng = rand::thread_rng(); + let mut iv = [0 as u8; 16]; + rng.fill_bytes(&mut iv); + + let cipher = Cipher::aes_128_cbc(); + let key = AES_KEY.as_bytes(); + let mut data = encrypt(cipher, key, Some(&iv), packet).unwrap(); + + let mut ciphertext = Vec::from(iv); + ciphertext.append(&mut data); + ciphertext +} +``` + +Once you realized that the network traffic was being encrypted with AES-128-CBC, +you could capture packet traces and decrypt it. The packet format was designed +to be simple enough that be reverse engineered from packet traces and client +interaction alone. + +Then, you were to write your own client which would solve the mazes for you. The +server would give you the flag when you had reached level 489. + +Solving mazes can be done with an +[algorithm](https://en.wikipedia.org/wiki/Depth-first_search) usually introduced +within the first month of a university computer science program. |