There is an element to this that none have considered. While I too believe that an attack would rally people to the President, it would probably tank the U.S. economy in a big way, at least in the short term. The DOW would probably much of it's value almost overnight and economic uncertainty and chaos would ensue. In such a situation, it's hard to predict who the voters would blame.
It might do that. A lot would depend on how many attacks were attempted and how many were successful. If they actually wanted to influence the election they would already be attacking smaller targets. Whether they could pull off another WTC911 and achieve the same shock value is doubtful. It cannot be done again exactly because it has already been done, not to say they can't bring down another building or train, but it wouldn't have the impact. Also, if they have another large attack it would be like the Tet offensive. They wouldn't ever be able to do anything again.