# Cubeworld #1 writeup:

#### Step 1

The first step of the challenge was looking at the key_*.png files. The files contained images of a cube with latin letters on it. We labeled a cube with the letters found in the images.

#### Step 2

A significant clue that was given, was that the solution had five words to it, and we now turned our attention to the five mp4 files, which presumably represented the five words of the solution.

Each mp4 file contains several movements of the cube. We figured out that each movement represents a character, constructing a single word.

So we looked at the letters that were on the rotating axis for each rotation. For example, in the first rotation in 1.mp4 file, we identified that the possible letters are {E,F,U,W} and for the second rotation we identified that the possible letters are {Y,Q,R,E,I,N,L}

#### Step 3

At this point, we went over all the words in the provided words.txt file and using a simple python script we found for each sequence of movements all the words with a length that matches the number of movements in the sequence and for which the first character matched one of the letters in the first movement, the second character matched one of the letters in the second movement and so onâ€¦

The script printed out one, or very few, matching words for each sequence and it wasn’t hard to come up with the words for the answer since we looked for an actual sentence that makes sense.

## Cubeworld #2 writeup:

#### Step 4 (continued from cubeworld #1)

Instead of mp4 files, we had four png files, supposedly representing the four stated words of the flag.

Each png file contained a Rubik’s cube in a different scrambled configuration.

We guessed that this cube was reached from the word it represented by these steps:

1. Starting from a Rubik’s cube in the solved position
2. for LETTER in WORD:
3. — Rotate the cube according to the rotation defined by LETTER (see World cube #1 writeup above)

#### Step 5

By sheer chance, one of our team members, had just written a python Rubik cube library.

We used the python library and executed the following algorithm:

1. For WORD in WORDS.TXT:
2. — Rotate a solved cube, by WORD as indicated in the previous step
3. — If the cube reached is equal to one of the four cubes in the png files:
4. — — Save WORD as a possible solution to that png file

This step was complicated by the fact, that we actually thought that each letter has 4 possible rotations, and therefore, the above process was too slow.

#### Step 6

We examined the key_*.png’s again, and noted that the rotation was always in relation to the orientation of the letter.

For example if the letter B was written sideways, the rotation was sideways as well.

This reduced the possibilities to two rotations for letter, clock-wise and counter-clockwise.

We assume that the original intention was a single rotation for each letter, none-the-less, but this gave us enough speed to execute the algorithm in the previous step

#### Step 7

The algorithm produced the following output:

```cube 0 found {'accurately'}
cube 1 found {'describing'}
cube 2 found {'accommodation', 'addiction', 'attention'}
cube 3 found {'conditions'}  ```

It was not hard to guess that the solution was: “HackTM{accurately_describing_accommadation_conditions}”

We really enjoyed this challenge!