Iran is providing crucial equipment and technical help to Syria in its effort to track opposition forces through the Internet and other forms of electronic surveillance, according to U.S. officials.

The aid is the latest example of how Iran is helping Syria in its battle against rebel forces threatening the regime of President Bashar al-Assad. The technical assistance is coming mainly through Iran’s Ministry of Intelligence and Security, the officials said.

Iran, which has long experience in tracking dissidents internally, has supplied surveillance and communications gear, as well as technical support in computer-network surveillance, said one intelligence official. Like others interviewed, he spoke on the condition of anonymity because of the topic’s sensitivity.

Among the tactics in which Iran is advising the Syrians is how to gain access to Web forums and chat rooms, where they pose as opposition members to identify and track targets, the intelligence official said. Syrian agents are then dispatched to kill the rebels, the officials said.

An array of sophisticated techniques used to entrap Syrian opposition activists has already been unearthed by tech privacy and security groups. Pro-government hackers have covertly installed spyware on activists’ computers by sending them e-mail and Skype messages purporting to be from opposition sympathizers that include attachments containing surveillance tools, said Eva Galperin of the Electronic Frontier Foundation, an Internet privacy group based in San Francisco.

The surveillance software can record keystrokes, steal passwords, turn on webcams and record audio conversations.

Iran’s electronic assistance began at least a year ago as part of a broader program to sustain the Syrian regime that included military advisers and fighters from Hezbollah, a Lebanese Shiite militant group closely allied with Iran.

“We know that Iran is there in a whole range of capabilities, and they’re offering what capabilities they have because they look at a loss of Syria as a huge problem,” Rep. Mike Rogers (R-Mich.), chairman of the House Permanent Select Committee on Intelligence, said in an interview. “You can extrapolate from that everything they have available, from weapons systems to finance and training, and they do have a growing cyber-capability that’s concerning.”

Instead of weapons, the Obama administration has given the rebels communications gear, passed on intelligence on who is being targeted, and trained them in using covert channels to escape tracking by the government.

The intelligence official said advice on how to avoid being targeted includes “relatively simple techniques that anyone who’s computer-savvy can use to obscure” their identity.

“It’s a good way for us to help the opposition without having to send in troops and bombs,” said a former U.S. defense official.

The Syrians are reasonably good at internal security, but experts say the Iranians are better trained in electronic and computer-network surveillance.

“Technologically, they’re light-years ahead of Syria,” said Robert B. Baer, a former CIA case officer in the Middle East and author of several books on the region. “The Syrians have got to go to the Iranians for anything advanced.”

James Ball contributed to this report.