Over the past year, Iranian hackers have taken aim at Mr. Trump’s presidential campaign. They have also targeted telecom companies, infrastructure systems and more than 200 oil, gas and heavy machinery companies around the world.

The hackers have “developed the ability to disrupt critical infrastructure and they already have the ability to wipe data,” said James A. Lewis, a cybersecurity expert at the Center for Strategic Studies in Washington. “But they’ve gone well beyond that now. The question is what services — pipelines? dams? — will they target now.”

Iran is still not “at the top of the league” of countries with the ability to cause widespread destruction via cyberattacks, Mr. Lewis and other experts said. But Tehran is much further along than American officials gave it credit for in 2009, when a classified intelligence assessment concluded that it had the motivation to inflict harm, but lacked the skills and resources to do so.

Since 2010 — when an Iranian nuclear facility was the target of a joint American-Israeli cyberattack — Tehran has embraced such attacks as part its strategy of “asymmetrical warfare.” While Iran’s Islamic Revolutionary Guards Corps may never match the West in conventional warfare, its specialized teams have learned how much destruction they can cause to vulnerable systems, according to American intelligence assessments and private security researchers.

Over the past five years, American officials and cybersecurity experts have tracked Iranian hackers as they have significantly advanced their capabilities beyond wiping data to sophisticated attacks on financial networks, internet infrastructure, energy companies — and, even more disconcerting, sites like the Bowman Dam in Westchester County and the Energy Department’s Idaho National Engineering Laboratory near Idaho Falls.

“They now have the ability to do serious harm,” Mr. Lewis said. “As the conflict with the U.S. continues, they’re going to be tempted. Expect to see a lot more testing of how far they can get into company networks, universities, federal networks and smaller government networks in towns and cities.”

Iran promises ‘forceful revenge’ for general’s killing.

Iranian leaders issued strident calls on Friday for revenge against the United States after the killing of Maj. Gen. Qassim Suleimani in an overnight airstrike at the Baghdad airport.