But the victory didn't erase linebacker Hayes Pullard's memory of 2012, when second-ranked USC lost at Stanford Stadium, 21-14.
Pullard, a fifth-year senior, will have a final chance at victory in Palo Alto when the Trojans open Pac-12 Conference play on Saturday against the Cardinal.
"We're going to the Farm," Pullard said, "and you have to bring your lunch pail and be ready for a dogfight."
USC's defense practiced against its new up-tempo offense during spring practice and training camp, which helped the unit's conditioning.
Pullard said the Trojans were prepared to be physical against Stanford's offense, which operates at a slower pace.
"They like to play hard-nosed football and that's what you have to match," he said.
Pullard made seven tackles in USC's loss to the Cardinal two years ago. He made 11 in last season's victory.