<-- home

HackFest Final 2017 / Crypto 1

Simple xor task (repeating XOR)

In a repeating XOR, if the key is shorter than the message (in our case), the key is duplicated in order to cover the whole data

So just xor original bmp header image with new header , and we get the right key

#!/usr/bin/env python

from pwn import *

a = open("crypto10.enc").read()
b = 0xee
c = xor(a,b)

file = open("flag.bmp","w")
file.write(c)
file.close()