Gholam-Reza Jalali, director of Iran's Passive Defense Organization, told the Mehr News Agency computer experts were investigating the malware but didn't reveal what facilities were targeted or when it was detected.
Jalali said damage from the cyberattack "is very slight in the initial stage, and it is likely to be mistaken for executable files of the government."
He said the country's computer experts were studying the worm "so that the necessary actions can be taken to deal with it."
The Stars worm is the second cyberattack on Iran's computer network in the past eight months. The Stuxnet worm, suspected of being aimed at Iran's nuclear program, infected many Iranian industrial sites last September.
"It must be taken into consideration that [the fact that we dealt with] Stuxnet does not mean that the threat has been completely eliminated since worms have specific life cycles and can continue their activities in other forms," Jalali told the Mehr News Agency.
"Therefore the country should prepare itself to tackle future worms since future worms, which may infect our systems, could be more dangerous than the first ones."
Scarlett Johansson steps out with fiance after pregnancy reveal
Susan Sarandon 'very excited' about daughter's pregnancy