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

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

In progress…

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.)
| Order | Face | Result |
|---|---|---|
| 1 | Red | RBW GOY PST |
| 2 | Blue | {LØ STE _DU |
| 3 | White | _DE NNE _SO |
| 4 | Green | M_P USL ESP |
| 5 | Orange | ILL _EL LER |
| 6 | Yellow | _KU BE? :)} |
Flag: PST{LØSTE_DU_DENNE_SOM_PUSLESPILL_ELLER_KUBE?:)}
