In truth, the 9/11 attack on the World Trade Center was almost as much of a surprise for the Iranians as it was for the Americans. The Iranian theocracy was vastly more pleased at the outcome than any American, but they had nothing to do with the attack. Indirectly, some of their funding had gone into support and training of some of the operatives, but they would have been totally unaware of any of these objectives.
This one bears right back at al-Qaeda, as a separate entity. Al-Qaeda may have sought sanctuary in the early days, before they congregated in Afghanistan, and the Iranians provided them safe passage over their territory, but that was largely the extent of aid and comfort they offered. Iran shares borders on the east with Afghanistan, and on the west with Iraq, so they may have been in on the safe passage both ways on a number of occasions.
On an up-note, I think we do have to recognize that the terrorists are currently so holed up that their only recent tactic has been to kidnap individuals in predominantly Moslem countries, execute them and then post it on the internet. This tactic means they have been seriously damaged. They would certainly be bombing embassies and ships if they could.
For those who think this is a new war, BTW, remember that the man who killed Robert Kennedy, Sirhan Sirhan was a Palestinian national. They've been at war with us since we backed Israel in 67. We've just ignored it, at least until 9/11.