MozillaCTF 2012 – Text Transformation Puzzle (50)

In this challenge we received the first paragraph of the book Flatland and the the key 49665857477f4b40304276. There are two interesting things about this; the paragraph was full of spelling errors and the key translates to mostly ASCII:

[dutchy@azer ~]$ echo "49665857477f4b40304276" | xxd -p -r -

The spelling errors in the text result in this string: pTldwFsySqD. Same length as the key in ASCII, could this be related? Let’s find out!
The usual approach of finding an answer which requires a key is xor, so let’s try that:

key = '\x49\x66\x58\x57\x47\x7f\x4b\x40\x30\x42\x76'
bla = 'pTldwFsySqD'
res = ""
for (ch1, ch2) in zip(key,bla):
    res += chr( ord(ch1) ^ ord(ch2) )

Running this piece of code results in: 92430989c32. This is the final answer!

Note: The guy that created the challenge pulled a little switcharoo on some letters and used pTldwFysSqD as the encrypted string. After talking to him he fixed the flag in the database.

Comments are closed.