Friday, 19 October 2012

[ HackYou CTF 2012 : Secure&Safe - Halloween ]

For this particular challenge, I am given this image below.

It reminded me of an old challenge used in one of the Korean CTF where i just fill the Black colour with another colour. Immediately, i used MS Paint (yeah as i am a poor chap. :( ) and filled the Black area with White colour and i got back the following image.


Hmmm...what is the dots representing? After analysing for some time, my gut feel tells me that it's not morse code nor Braille. The 2 dots could represent 1 and 1 dot represent 0 like Binary.
But wait a minute, there are only 7 of it for each character? Well, it could be 7-bit ascii.


1100001 1101001 1101110 1110100 1011111 1100001
1100110 1110010 1100001 1101001 1100100 1011111 1101111 1100110 1011111 1101110
1101111 1011111 1100111 1101000 1101111 1110011 1110100 1110011

So i developed a Python script just to decode this.
import sys,os
'''
We are only interested in the following 7-bit ascii
1100001 1101001 1101110 1110100 1011111 1100001
1100110 1110010 1100001 1101001 1100100 1011111 1101111 1100110 1011111 1101110
1101111 1011111 1100111 1101000 1101111 1110011 1110100 1110011
'''
string = "" 
string = chr(int('1100001',2))
string += chr(int('1101001',2))
string += chr(int('1101110',2))
string += chr(int('1110100',2))
string += chr(int('1011111',2))
string += chr(int('1100001',2))

string += chr(int('1100110',2))
string += chr(int('1110010',2))
string += chr(int('1100001',2))
string += chr(int('1101001',2))
string += chr(int('1100100',2))
string += chr(int('1011111',2))
string += chr(int('1101111',2))
string += chr(int('1100110',2))
string += chr(int('1011111',2))
string += chr(int('1101110',2))

string += chr(int('1101111',2))
string += chr(int('1011111',2))
string += chr(int('1100111',2))
string += chr(int('1101000',2))
string += chr(int('1101111',2))
string += chr(int('1110011',2))
string += chr(int('1110100',2))
string += chr(int('1110011',2))
print("%s\n" % string)

The result from this Python script is "aint_afraid_of_no_ghosts" and that is the key to this challenge.

Cheers,
Jacob Soo

No comments:

Post a Comment