Iran has tightened online security since its uranium enrichment centrifuges were hit in 2010 by the Stuxnet computer worm, which Tehran believes was planted by arch-adversaries Israel or the United States.
The unit tasked with fighting cyber attacks, the Passive Defence Organisation, said a virus had infected several sites in Hormozgan province in recent months but was neutralised.
Head of the Hormozgan branch of the organisation, Ali Akbar Akhavan, said: "Enemies are constantly attacking Iran's industrial units through internet networks in order to create disruptions.
"This virus has even penetrated some manufacturing industries in Hormozgan province, but with timely measures and the co-operation of skilled hackers in the province, the progress of this virus was halted.
"As an example, the Bandar Abbas Tavanir Co, a producer of electricity in the province and even adjacent provinces, has been the target of internet attacks in recent months."
Bandar Abbas is the capital of Hormozgan province on Iran's southern coast and home to an oil refinery and container port.
Israeli officials have threatened military action against Iranian nuclear facilities if Western sanctions on Tehran's banking and oil sectors do not persuade the Islamic Republic to shelve its disputed atomic programme.
Western powers suspect Iran is trying to develop the means to produce nuclear weapons. Tehran says it is enriching uranium only for civilian energy.