9. Favourite byte
Challenge Description:
For the next few challenges, you'll use what you've just learned to solve some more XOR puzzles.
I've hidden some data using XOR with a single byte, but that byte is a secret. Don't forget to decode from hex first.
73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d
My Solution:
Since the XOR key is one byte, we can brute force it by trying all the bytes, and when we get the flag we will know the correct XOR key:
from pwn import *
EncryptData = bytes.fromhex("73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d")
for i in range(255):
XORing = xor(EncryptData, i).decode(errors="ignore")
if XORing.startswith("crypto"):
print("Here is your flag:")
print(XORing, hex(i))The Flag:
crypto{0x10_15_my_**************}XOR key was 0x10.
Last updated