A train was travelling through Ecclesfield when rocks were thrown from a bridge near Butterthwaite Lane at around 6.30pm on Sunday, August 5.
British Transport Police said the driver spotted three youths on the footbridge and a fourth at the side of the track.
A number of rocks struck the Northern train, causing damage.
APPEAL: Police seek man over assault of woman outside Rotherham pubA BTP spokesman said: "Trespassing on the railway, and throwing items at trains travelling at high speed is highly dangerous.
"Not only do trespassers put themselves at risk, but throwing items could result in someone being seriously injured or indeed killed."Anyone with information should call BTP on 0800 40 50 40 quoting reference 452 of August 5.