Draw a square. Then delete the fill and duplicate the square.
Move one box on top of the other, positioning it above and to the right of the other box.
Draw four short lines that don't touch either box. If you find that Snap to Objects is making this step difficult, feel free to temporarily turn off this option. The lines are shown in the following figure:
Connect one end of one line to a corner of the rear square.
Connect the other end of that line to the corresponding corner of the front square.
Repeat steps 4 5 with the second, third, and fourth lines.
You can fill the panes of the cube with a gradient and use the Gradient Transform tool to fine tune the look.