A silent cyber war between the US and Iran may already be underway, as tensions between the two foes continue to dangerously escalate.

Last week it was reported the US had launched cyberattacks to disable Iranian computer systems which controlled its rocket and missile launchers.

According to US sources, the cyberattacks were ordered by US President Donald Trump after Iranian forces allegedly blew up two oil tankers in the Gulf earlier this month.

A series of attacks on oil tankers near the Persian Gulf has ratcheted up tensions between the US and Iran - and raised fears over the safety of one of Asia'€s most vital energy trade routes, where about a fifth of the world's oil passes through its narrowest at the Strait of Hormuz. (AAP)

In the last 24 hours, Iranian officials have confirmed they had sustained a determined cyberattack – but that it had been unsuccessful.

US officials have now warned American companies and government departments to brace for expected retaliatory attacks from Iran.

What is Stuxnet?

Welcome to the future , where wars are fought without the sound of Tomahawks whistling overhead or fighter jets screaming off aircraft carrier decks to destroy enemy positions.

The present standoff and cyber sabre rattling between the US and Iran has precedent.

In the late 2000s Iran was the victim of a fabled and audacious cyberattack, known as Stuxnet.

Iranian technicians work at the Bushehr nuclear power plant, outside the southern city of Bushehr, Iran. (AAP)

The Stuxnet attack, a worm virus widely believed to be a joint US-Israeli intelligence creation, disrupted thousands of centrifuges at an Iranian nuclear enrichment facility, Natanz.

It is notoriously difficult to attribute cyberattacks to a specific actor, and neither the US or Israel has ever officially claimed responsibility, but numerous books, articles and documentaries have detailed the incident.

It is believed a double agent used a flash drive to infect the Natanz computer systems, which were not connected to the Internet to specifically protect the network from an outside attack.

How did Stuxnet take out Iranian nuclear facility?

Once successfully implanted, the Stuxnet worm sat dormant inside the Natanz computer network until a very specific set of conditions was met.

The malware virus then got to work, changing codes in the system while sending out signals that made it appear everything was running normally. The backdoor the Stuxnet work created allowed outsiders to covertly seize control of the plant.

Stuxnet allowed the centrifuges at Natanz to spin at a much higher rate and tear themselves apart. Natanz was knocked offline, severely hampering Iranian ambitions to develop nuclear armed weapons.

There was no need for missiles or smart bombs; just a standard thumb drive and a click of a mouse.

Iran has also shown a willingness to conduct destructive campaigns.

How Iranian hackers attacked the US

Iranian hackers in 2012 launched an attack against state-owned oil company Saudi Aramco, releasing a virus that erased data on 30,000 computers and left an image of a burning American flag on screens.

In 2016, the US indicted Iranian hackers for a series of punishing cyberattacks on US banks and a small dam outside of New York City.

Tensions have run high between the two countries since the US withdrew from the 2015 nuclear deal with Iran last year and began a policy of "maximum pressure".