Both men are currently wanted by the FBI.
The case was filed on Tuesday in federal court in New Jersey, and several of the alleged targets were based in that state. Numerous others are spread across the country and abroad, including in Israel, the United Kingdom, Saudi Arabia and Afghanistan.
The targets of the attacks include higher education institutions, human rights activists, telecommunications and media agencies and defense contractors, according to the indictment. The attacks go as far back as at least 2013, it said.
One allegedly targeted group was a New York-based international organization that promoted the nonmilitary and safe use of nuclear technology. Heidarian and Farhadi hacked sensitive nuclear information in the lead-up to the Joint Comprehensive Plan of Action, commonly known as the Iran nuclear deal, in 2015, according to the indictment.
Another target was a government agency in Afghanistan that allowed the hackers to access internal communications going up to the Afghan president, the indictment said.
“We will not bring the rule of law to cyberspace until governments refuse to provide safe harbor for criminal hacking within their borders,” John Demers, assistant attorney general for national security, said in a statement. “Today’s defendants will now learn that such service to the Iranian regime is not an asset, but a criminal yoke that they will now carry until the day they are brought to justice.”