South Australian police are investigating an apparently random assault in which an elderly driver was hit in the head with a hammer while he gave a lift to another man, who then stole his car.