Rooney slotted home a pair of second-half penalties to give the visitors their win, although skipper Nemanja Vidic will miss the remainder of the group phase after being sent off for a high tackle on Gabriel Giurgiu.
United took the lead in the 64th minute when Sergiu Costin instinctively stuck out an arm to prevent Rooney from finding strike-partner Javier Hernandez.
Costin was fortunate not to be sent off but Rooney sent Branko Grahavac the wrong way from the spot.
But three minutes later German referee Felix Brych showed Vidic a straight red card for his challenge on Giurgiu.
The home side threatened but their hopes were ended by the dismissal of Milan Perendija for a second bookable offence two minutes from time after which Rooney struck again by finding the same corner as previously after he had been tripped by Liviu Antal.