The Room: “Learn about encryption algorithms such as AES, Diffie-Hellman key exchange, hashing, PKI, and TLS.”
https://tryhackme.com/room/cryptographyintro
Task 1: Introduction
1.1. You have received the following encrypted message:
“Xjnvw lc sluxjmw jsqm wjpmcqbg jg wqcxqmnvw; xjzjmmjd lc wjpm sluxjmw jsqm bqccqm zqy.” Zlwvzjxj Zpcvcol
You can guess that it is a quote. Who said it?
We can solve the question from the Quipqiup website.
Miyamoto Musashi
Task 2: Symmetric Encryption
2.1. Decrypt the file quote01 encrypted (using AES256) with the key s!kR3T55 using gpg. What is the third word in the file?
Do not forget to enter the password in the box that appears after entering the command.
The third word in the result is our answer.
waste
2.2. Decrypt the file quote02 encrypted (using AES256-CBC) with the key s!kR3T55 using openssl. What is the third word in the file?
Don’t forget to write the password.
The third word in the result is our answer.
science
2.3. Decrypt the file quote03 encrypted (using CAMELLIA256) with the key s!kR3T55 using gpg. What is the third word in the file?
Do not forget to enter the password in the box that appears after entering the command.
The third word in the result is our answer.
understand
Task 3: Asymmetric Encryption
3.1. Bob has received the file ciphertext_message sent to him from Alice. You can find the key you need in the same folder. What is the first word of the original plaintext?
Decrypt ciphertext_message thanks to a private key with openssl tool. The first word in the result is taken.
Perception
3.2. Take a look at Bob’s private RSA key. What is the last byte of p?
We read the private key.
e7
3.3. Take a look at Bob’s private RSA key. What is the last byte of q?
27
Task 4: Diffie-Hellman Key Exchange
4.1. A set of Diffie-Hellman parameters can be found in the file dhparam.pem. What is the size of the prime number in bits?
We read the dhparams.pem.
4096
4.2. What is the prime number’s last byte (least significant byte)?
4f
Task 5: Hashing
5.1. What is the SHA256 checksum of the file order.json?
2c34b68669427d15f76a1c06ab941e3e6038dacdfb9209455c87519a3ef2c660
5.2. Open the file order.json and change the amount from 1000 to 9000. What is the new SHA256 checksum?
Change the amount value with nano.
11faeec5edc2a2bad82ab116bbe4df0f4bc6edd96adac7150bb4e6364a238466
5.3. Using SHA256 and the key 3RfDFz82, what is the HMAC of order.txt?
c7e4de386a09ef970300243a70a444ee2a4ca62413aeaeb7097d43d2c5fac89f
Task 6: PKI and SSL/TLS
6.1. What is the size of the public key in bits?
4096
6.2. Till which year is this certificate valid?
2039
Task 7: Authenticating with Passwords
7.1. You were auditing a system when you discovered that the MD5 hash of the admin password is 3fc0a7acf087f549ac2b266baf94b8b1. What is the original password?
You can convert with any md5 decrypt tool.
qwerty123