"The Ransomeware virus which has massively attacked the adjacent countries' systems was identified by the home-made Padvish anti-ransomware-virus and the systems which had installed the anti-virus have not been harmed," the ministry said on Wednesday.
In relevant remarks earlier today, Head of Iran's Civil Defense Organization Brigadier General Gholam Reza Jalali said that the US intelligence services are to blame for the WannaCry virus that affected tens of thousands of computers worldwide last week.
"The preliminary studies have indicated that the virus has originated from the US and is related to the US intelligence agency, and the US has not been harmed in the (virus) attack," Jalali said on Wednesday.
Stressing that the ransomware virus showed that cyber threat is a serious issue, he advised the internet users to install the Iranian anti-ransomware-virus software to remain safe from its attacks.
Also, on Monday, Russian President Vladimir Putin blamed the US for developing the sophisticated hacking tools used in a worldwide cyberattack, crippling computers including those used by Russian law enforcement agencies.
Speaking at a news conference following an economic conference in China, Putin told journalists that Russia "had nothing to do" with the WannaCry virus, which reportedly used infiltration techniques developed by US intelligence agencies.
The US hacking codes had been previously released in a leak by an online hacking collective that identified itself as Shadow Brokers.
Some suspected that Russia was backing Shadow Brokers, but no evidence has emerged to support that claim.
"With regard to the source of these threats, then I believe that Microsoft has spoken directly about this," Putin said. "They said, that the first sources of this virus were the United States intelligence agencies. Russia has absolutely nothing to do with this."
The virus — known as ransomware — locks computer files and posts a demand for payment in the online currency bitcoin. The virus first hit Friday and has spread to more than 150 countries.