The Iranians may be more circumspect than assumed about attacking U.S. targets. If so, I'd imagine in the most oblique and deniable fashion..., i.e, via uncontrollable, spontaneously sympathetic "friends".
Anything more overt would provide U.S. forces with all the rationale needed to retaliate in kind. I can't imagine a tit-for-tat respone by U.S. forces and I CAN imagine that every U.S.-related facility within a 6,000 mile radius being at full alert.
Even with a supposedly deniable attack there would remain the question among the Iranian leadership whether we'd let such slide.
A wider war might benefit some within Iran but it decidedly would not benefit the Iranian state as a whole.