For specular lighting you use the dot product of the normalised point->light vector and the reflected ray vector, the calcs for reflecting a ray are in the function I gave before. To reflect a vector you need to know what the initial vector is (incoming) and the surface normal of the point it is reflecting off.
The only way I've raytraced cubes so far is by creating a mesh and using ray->triangle intersections, the example you linked to doesn't allow for rotating the cube at all so if you wanted to do that then you'd need to rotate the ray around the cube, find the intersection (if that's possible) then un-rotate and do your lighting and reflection, a similar procedure would be needed for shadowing.
There may be some specific way to raytrace cubes but I don't know, another idea may be to define the cube as 6 planes and do some sort of tests with those.