Writeup
Decrypt Message 2
Open file with IDA
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Program will generate ascii random key, and length of key will divide by 5. Then program converts flag and key into arrays, xor them together with modulo 5.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
After xoring, we are given encrypt flag, but with shuffled index (v14
is the index array)
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
We need to find correct permutation of encrypt flag. We are given 5 first characters of flag is BrU7e
.
To solve this challenge, we can bruteforce to find correct permutation of encrypted flag. After found correct one, we can calculate key by xoring correct permutation of encrypted flag and known plaintext BrU7e
. When we have key, everything is easy.
After understand how to reverse, I use python to write script
flag: BrU7e_fORcE_l5_p0w3rFu1i!
Decrypt Message 1
Compile source code with IDA and we have this
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Look into _encryption
function and we have
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Let me explain how encrypt function works:
- We divide
input
into chunks, each chunk has 2 elements
- After divided, each chunk will go to
encryption
function
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Because each chunk is encrypted seperately, so we can bruteforce each chunk to get flag
Here is my script in python to find flag
flag: GODGPT!!!