Iran has foiled a cyberattack on its central bank, the country's telecommunications infrastructure company said on Friday.