The Ducks (No. 10 ESPN/USA Today; No. 9 AP) made 30-of-37 free throws and Brooks had 19 points and a career-high 10 rebounds in a 66-59 win over the Cardinal on Thursday night.
Tajuan Porter added 15 points and Bryce Taylor scored 14 for the Ducks (17-1, 5-1), who are off to their best start in 80 years and got there despite shooting a season-low 29 percent from the field and 32 percent from 3-point range.
"Our free-throw shooting saved us tonight," said Ducks coach Ernie Kent, who moved into second place on Oregon's all-time coaching win list with 181.
The Ducks ended a seven-game losing streak to the Cardinal (11-5, 3-3) by setting a season high for free throws made and attempted. They were 23-for-28 from the line in the second half.
The Ducks, who have no starter taller than the 6-foot-9 Maarty Leunen, and struggled with their small-ball style for much of the game against Stanford's 7-foot twin brothers, freshmen Robin and Brook Lopez.
Leunen, Oregon's only true post player, was held scoreless in the first half. Oregon had 10 shots blocked.
"Those two big 7-footers made it difficult for us," said Leunen, who was 2-for-11 from the field for eight points.
The Ducks stayed aggressive and continued to attack the basket and draw fouls. Brooks was 10-for-10 from the line, while Porter was 6-for-6 and Taylor went 7-for-8.
"Coaches told me to be more aggressive, attack the hole and get the big guys in foul trouble," Brooks said.
It worked, as Oregon was in the double bonus with just under nine minutes to play.
"We just kept fighting," Brooks said. "We're just battlers. We're going to play 40 minutes and I think it shows."
The Cardinal, who upset then 23rd-ranked Washington State 71-68 in overtime in their last game, made only one shot from the field in the final 5:56
"We had the tempo and everything to our liking," Stanford coach Trent Johnson said. "We just didn't have the ball go down at crucial situations. Holding them to 66 points at home, I thought we did a good job. They're a tough, explosive and very skilled basketball team."
Brooks scored nine straight for the Ducks late in the second half, giving them a 53-51 advantage with 5:04 to play.
"Their size and our quickness were the two difference in the game," Kent said. "We kept trying to impose our will on them at the offensive end. We did a good job attacking them off the dribble."
Stanford's last lead came with 5:56 to play following a three-point play by Lawrence Hill to put the Cardinal up 51-48. But that was last field goal they would make until Fred Washington's putback with 21 seconds left.
Hill led Stanford with 13 points, while Washington scored 12 and Robin Lopez had 10 points. Anthony Goods, who averaged 24.5 points in wins against Washington and Washington State last weekend, was held to seven points.
The first half was highlighted by six ties and 11 lead changes with Stanford up 26-25 at the break following Washington's go-ahead layup with 44 seconds left.
Oregon retook the lead early in the second half, going up 29-26 on a 3-pointer by Porter at the 18:47 mark.
It was all Cardinal for the next five minutes as 3-pointers by Hill and Landry Fields helped spark a 12-3 run to give them a 40-32 advantage with 13:29 to play.
The Ducks answered, tying the game 46-46 on a pair of free throws by Brooks with 8:25 remaining.
Oregon was coming off its first road sweep of Arizona and Arizona State in school history and with its highest ranking since also being ninth on December 2003.