By Mike Mount, with reporting from Suzanne Kelly and Pam Benson

The United States believes that Iran is behind cyberattacks on American banks and the oil industry in the Middle East, officials said.

Although officials have not made such an assertion publicly, they have characterized the attacks that occurred in recent months as initiated by a "state actor." The U.S. intelligence apparatus observed and tracked the attacks as coming out of Iran, a third official said Monday. The official would not describe further what was observed but said the belief is the perpetrators were surrogates working with the Iranian government.

“We strongly believe there is a relationship between the people typing the code and people running the government,” according to the official.

"It certainly is the case that Iran is improving its capabilities in the cyber field. We're paying attention. We are concerned about their increasing ability to operate in this realm," a U.S. intelligence official said.

Defense Secretary Leon Panetta noted the attacks in a speech last week and warned that United States must beef up its cyber defenses or risk a potentially devastating strike.

Calling it a "pre-9/11 moment," Panetta said he is particularly worried about a significant escalation of attacks and highlighted a cyber virus known as "Shamoon." The virus infected the computers of major energy firms in Saudi Arabia and Qatar this past summer.

In Saudi Arabia, more than 30,000 computers were rendered useless by the attack on the state oil company ARAMCO. Ras Gas was affected in Qatar.

Panetta said the attacks were probably the most devastating to ever hit the private sector.

Iran denied any involvement in the attack on the oil industry, according to a report broadcast Monday on PRESS TV, a government-run news agency.

"One of the main aims of the United States is to make itself look like the victim," said Mehdi Ahkavan Bahabadi, the director of the Iran Cyberspace Center.

The report noted Iran itself has been the victim of numerous online assaults, including Stuxnet, a complex cyberattack against its nuclear program believed to have been created by American and Israeli programmers.

Panetta's speech also covered recent attacks against large U.S. banks, which hit with unprecedented speed and disrupting services to customers.

While the attacks did not do any significant damage or result in any financial losses, it caught the attention of U.S. intelligence, according to officials.

Officials said they have not heard any talk with in the government regarding a possible retaliatory strike for the cyber attack on the banking system.

Panetta did not publicly say Iran was behind both attacks but sources say that is what U.S. officials believe.

The New York Times reported that while there seems to be no real evidence that the cyber attacks were sanctioned by the Iranian government,

U.S. officials have begun to focus their suspicion on a recently created Iranian military unit called "cybercorps."

The unit was developed in response to American and Israeli cyberattacks on the Iranian nuclear enrichment plant at Natanz.