10. You either know, XOR you don't

Challenge Description:

I've encrypted the flag with my secret key, you'll never be able to guess it. Remember the flag format and how it might help you in this challenge! 0e0b213f26041e480b26217f27342e175d0e070a3c5b103e2526217f27342e175d0e077e263451150104

My Solution:

Since our first flag, we would notice that all of them started with the word crypto, so we XOR it with the hex value above to try to get the key, and then use that key to get the full flag:

import pwn

EncryptedData = bytes.fromhex("0e0b213f26041e480b26217f27342e175d0e070a3c5b103e2526217f27342e175d0e077e263451150104")
SecretKey = ""
FlagStarting = b"crypto{"

SecretKey += pwn.xor(EncryptedData, FlagStarting).decode()[:9].replace("+", "")

XORing = pwn.xor(EncryptedData, SecretKey.encode()).decode()

print("Here is your flag:")
print(SecretKey)
print(XORing)

The Flag:

crypto{1f_y0u_Kn0w_En0uGH_y0u_***********}

myXORkey was the XOR secret key.

Last updated