NPST 02. Scrambled: Rubik's cube

Task description

oedelagte_leker.png

Over natten har det vært store utfordringer knyttet til en av maskinene i verkstedet. En serie feilproduserte leker har kommet på rullende bånd. Vi prøver å finne ut hva som har skjedd. Graver du ned i det her?

- Mellomleder

Bra, jeg videresender til fslaktern!

- Mellomleder

Fra: Tastefinger

Til: Mellomleder

Emne: FW: Scrambled

Vedlegg: oedelagte_leker_fix.png

Tror det var noe skitt på linsa da det forrige bildet ble tatt, så jeg har tatt et nytt et. Har lagt med som vedlegg.

- Tastefinger


Notes

Colors

Blå: _D{TEØULS Grønn: _SMPLSPUE Gul: :UB?)K}E_ Oransje: _LRLLEEIL Hvit DESN_EO_N Rød: OSTPWBGYR

9 cells per color? This has to be a Rubik’s cube.

Solution

  1. Draw the cells on an autosolver online: https://rubiks-cube-solver.com/solution.php?cube=0551236134633344526463112214642624132314564556325551261
  2. Follow each step of the solution from the autosolver with Excel (or Figma) (20 steps)
  3. When solved, the flag isn’t all that obvious to see.
  4. To read the flag (follow along with the image below):
    1. Start at red, read from the bottom to the top, left to right. You’ll see that the red cells are: RBW GOY PST a. RBW-GOY is the order you need to read to get the flag. Red, blue, white, green, orange and lastly, yellow. b. PST is the start of the flag format.
    2. Continuing with blue. This time from left to right, top to bottom, we get: {LØSTE_DU
    3. For white the order is bottom to top, left to right: DENNE_SO
    4. Next is green. Same order as white: M_PUSLESP
    5. Orange is bottom to top, left to right as well: ILL_ELIER
    6. Last but not least is yellow. Bottom to top, left to right: _KUBE?:)}

solved_cube.png

Flag: PST{LØSTE_DU_DENNE_SOM_PUSLESPILL_ELLER_KUBE?:)}

A better solution

We know that every solved Rubik’s cube is the same because every cell only fits in one spot once the cube is solved. This is assuming the cube uses a certain color scheme, see The Rubik’s Cube color schemes. Either way, direction doesn’t really matter as each face in this challenge is independent of each other.

With this information we don’t have to go through the steps of solving the cube at all. We can create a program that calculates the correct position for each cell based on its expected neighbors. Our job ends up being just to plot each cell color and letter on a map the program can understand. The result is a properly sorted cube.

The program: unscramble.html

Plotting cube colors and letters

In progress…

Finished plotting cube

Finished!

We get the flag by following the same procedure as the other solution to read in the correct order. The red face tells us the order in which to read (it is rotated 180deg.)

OrderFaceResult
1RedRBW GOY PST
2Blue{LØ STE _DU
3White_DE NNE _SO
4GreenM_P USL ESP
5OrangeILL _EL LER
6Yellow_KU BE? :)}

Flag: PST{LØSTE_DU_DENNE_SOM_PUSLESPILL_ELLER_KUBE?:)}