The train driver was injured during the attack, officials said, and the militant group claimed to have killed six security personnel.