President Trump has warned the US is "targeting" 52 Iranian sites and will strike "very fast and very hard" if Tehran attacks Americans or US assets.
His comments followed the US assassination of Qasem Soleimani, a top Iranian general, in a drone strike.
Iran has vowed to avenge his killing.
Mr Trump wrote on Twitter that Iran "is talking very boldly about targeting certain USA assets" in response to the general's death.
He said the US had identified 52 Iranian sites, some "at a very high level & important to Iran & the Iranian culture, and those targets, and Iran itself, WILL BE HIT VERY FAST AND VERY HARD" if Tehran strikes at the US.
"The USA wants no more threats!" Trump added.
The president said the 52 targets represented the 52 Americans held hostage in Iran for more than a year from late 1979, after they were seized at the US embassy in Tehran.
Shortly after Mr Trump's tweets, the website of a US government agency appeared to have been hacked by a group calling itself "Iran Cyber Security Group Hackers".
A message on the American Federal Depository Library Programme site read: "This is a message from the Islamic Republic of Iran.
"We will not stop supporting our friends in the region: the oppressed people of Palestine, the oppressed people of Yemen, the people and the Syrian government, the people and government of Iraq, the oppressed people of Bahrain, the true Mujahideen resistance in Lebanon and Palestine, [they] will always be supported by us."
The web page contained a doctored image of President Trump, depicting him being hit in the face and bleeding at the mouth.
"This is only small part of Iran's cyber ability!" [sic], the hackers wrote.