noxCTF – World Wide Dictionary writeup

So, we decided to solve the World Wide Dictionary challenge.

The obvious thing to do is to convert those characters to 1 and 0.
It seems the right thing to do in this part of the challenge.

But unfortunately, I have been trying to do this and suddenly my “sublime text editor” crashed, I was pretty sure at this moment that the challenge writers exploited my sublime.

So an alternative way(and what I eventually did) is to save the data in a file and to try to replace the characters with the ones and zeros.

I wrote this python script to do this replacement.

def main():
    with open("replace.txt", "r+") as file:
        data = file.read().replace("O", "0").replace("I", "1")
        file.seek(0)
        file.write(data)

main()

And now we have this ASCII representation of the binary code or something like this.

When I looked at the length of the characters, I saw it was 104,790.
It’s not so hard to understand that this number cannot be divided by 8.
Strange, So It’s probably not an executable.

Then what is it?
I checked the divisors of 104,790 and discovered that 6 is a divisor of this number.
That is the time for Google of course.

I clicked the first result because Wikipedia is awesome and one of the options caught my eye:

So let’s dive even deeper:

And deeper:

What you can see here is a conversion table between six-bit binary and braille in ASCII format.
It’s great for me.

I copy-pasted the table and did some “sublime” magic tricks(using sublime’s great multi-cursor) and build the following python dictionary:

map = {
"000000" : " ",
"011011" : "!",
"000100" : "\"",
"010111" : "#",
"111001" : "$",
"110001" : "%",
"111011" : "&",
"000010" : "'",
"101111" : "(",
"011111" : ")",
"100001" : "*",
"010011" : "+",
"000001" : ",",
"000011" : "-",
"010001" : ".",
"010010" : "/",
"000111" : "0",
"001000" : "1",
"001010" : "2",
"001100" : "3",
"001101" : "4",
"001001" : "5",
"001110" : "6",
"001111" : "7",
"001011" : "8",
"000110" : "9",
"100101" : ":",
"000101" : ";",
"101001" : "<",
"111111" : "=",
"010110" : ">",
"110101" : "?",
"010000" : "@",
"100000" : "A",
"101000" : "B",
"110000" : "C",
"110100" : "D",
"100100" : "E",
"111000" : "F",
"111100" : "G",
"101100" : "H",
"011000" : "I",
"011100" : "J",
"100010" : "K",
"101010" : "L",
"110010" : "M",
"110110" : "N",
"100110" : "O",
"111010" : "P",
"111110" : "Q",
"101110" : "R",
"011010" : "S",
"011110" : "T",
"100011" : "U",
"101011" : "V",
"011101" : "W",
"110011" : "X",
"110111" : "Y",
"100111" : "Z",
"011001" : "[",
"101101" : "\\",
"111101" : "]",
"010100" : "^",
"010101" : "_"
}

At this moment I had to write a script that converts the binary to an ASCII representation using this dictionary.

The python script:

map = {
"000000" : " ",
"011011" : "!",
"000100" : "\"",
"010111" : "#",
"111001" : "$",
"110001" : "%",
"111011" : "&",
"000010" : "'",
"101111" : "(",
"011111" : ")",
"100001" : "*",
"010011" : "+",
"000001" : ",",
"000011" : "-",
"010001" : ".",
"010010" : "/",
"000111" : "0",
"001000" : "1",
"001010" : "2",
"001100" : "3",
"001101" : "4",
"001001" : "5",
"001110" : "6",
"001111" : "7",
"001011" : "8",
"000110" : "9",
"100101" : ":",
"000101" : ";",
"101001" : "<",
"111111" : "=",
"010110" : ">",
"110101" : "?",
"010000" : "@",
"100000" : "A",
"101000" : "B",
"110000" : "C",
"110100" : "D",
"100100" : "E",
"111000" : "F",
"111100" : "G",
"101100" : "H",
"011000" : "I",
"011100" : "J",
"100010" : "K",
"101010" : "L",
"110010" : "M",
"110110" : "N",
"100110" : "O",
"111010" : "P",
"111110" : "Q",
"101110" : "R",
"011010" : "S",
"011110" : "T",
"100011" : "U",
"101011" : "V",
"011101" : "W",
"110011" : "X",
"110111" : "Y",
"100111" : "Z",
"011001" : "[",
"101101" : "\\",
"111101" : "]",
"010100" : "^",
"010101" : "_"
}

def main():
    with open("replace.txt", "r") as file:
        data = file.read()


    chunks = [] 
    for i in range(0, len(data), 6):
        chunks.append(map[data[i: i + 6]].encode())

    with open("out.txt", "wb") as file:
        file.write(b''.join(chunks))


main()

The result in “out.txt” file looks like a binary data:

I took this data and put it in “010 Editor” as a hexadecimal representation using CTRL+shift+v.

I found out it’s base64 encoded data:

I decoded the base64 data and saw it is actually a PNG image.

Cool, I felt we are so close to the end of this challenge, In retrospect, we were indeed.

When I opened the image I saw something that looks like the sign language:

I searched for so many sign language images on google and didn’t found the specific image I had or at least the signs itself.

And in this desperate situation, I thought for myself, How the fuck did he generate those signs.

Then, I Googled “text to sign language”:

I used this website to convert all the characters to its signs, and:

Yeah, these are the exact signs the challenge writer used.
I converted the signs, the result is:
the flag is d1c710n4ry

So by the format, the flag was:

noxCTF{d1c710n4ry}

Couldn’t have done it without my team.