Saudi hackers have attacked websites belonging to state-backed Iranian oil firms, a Persian news agency reported.
A computer worm targeted websites for Iranol, the Iranian Oil Ministry and the National Iranian Oil Company.
Pana news agency reported that the worm was issued by a group of Saudi Arabian hackers named HP Group Hack.
Authorities said the virus, which is capable of self-replicating to spread into a computer system, was detected before it could affect the sites.
In August 2011, HP Group Hack defaced the website of a Canadian open source website builder called Joomla Canada.
Last month, an unknown group of hackers attacked and took down Iran's oil ministry website and affiliated sites.
Oil ministry spokesman Alireza Nikzad said the attack was a virus that "attempted to delete data on oil ministry servers".
The computer worm damaged some general information but failed to harm the main data of the ministry, the spokesman added.
Iran announced in February that it was poised to build its first cyber army to prevent computer worms breaking into and stealing data from Iran's networks, including nuclear facilities, power plants, data centres and banks.
Last year, Tehran authorities discovered a sophisticated Trojan called Duqu, a computer worm which surreptitiously enters a system and leaks information.
Many international experts believe the virus was developed by the United States, possibly with Israeli collaboration, to disrupt Iran's disputed nuclear programme.
In November, Iranian officials announced the development of a software program that can control the spyware.
Duqu is the successor of Stuxnet, a virus identified in June 2010 that is designed to infect computers using supervisory control and data acquisition systems.
For further news on Anonymous's recent activities, check out the IBTimes UK Cyber Warfare section.