Five teenagers were captured on CCTV clinging to the rear of a train crossing the Sydney Harbour Bridge, police say.