The group of rigid motions of the cube is isomorphic to $S_4$.

The standard way of proving that $\phi$ is surjective is the following. First, show that $G$ has $24$ elements. Then, since you've proven that $\phi : G \rightarrow S_4$ is an injective function between two sets of the same cardinality, it follows that $\phi$ must be surjective. (For if not, the image of $\phi$ would have $< 24$ elements in it, so by the pigeonhole principle, there would be some $\pi \in S_4$ with at least two distinct elements mapping to it via $\phi$, contradicting the injectivity of $\phi$.)

To show that $G$ has $24$ elements, use the orbit-stabilizer theorem. For example, $G$ acts on the set of $6$ faces of the cube, and the stabilizer of a face is a cyclic group of order $4$ generated by a $90^{\circ}$ degree rotation. Thus, $G$ has $6 \cdot 4 = 24$ elements. You could also use the action of $G$ on vertices ($8 \cdot 3$), edges ($12 \cdot 2)$ or diagonals ($4 \cdot 6$) instead of faces.


Surjective: The group of rigid motions of a cube contains $24$ elements, same as $S_4$. Proof - A cube has $6$ sides. If a particular side is facing upward, then there are four possible rotations of the cube that will preserve the upward-facing side. Hence, the order of the group is $6\times 4 = 24$.

Injective: A cube has $4$ diagonals. For one of the diagonals's head and tale attach $1$, for another $2$ and so on. We choose tale and head of a diagonal same, since there is no way to have rigid motion for a cube to change head and tale and still the diagonal remains in same orientation. For first diagonal you can attach any one of $1$, $2$, $3$, or $4$, as you could choose for first place in $S_4$. For the second diagonal it remains $3$ numbers to choose to attach as same for the second place in $S_4$. And till the last one, and we are done.

pic