Normally a third-line grinder/agitator, Cooke was placed on the top line alongside Crosby and NHL scoring leader Evgeni Malkin three games ago.
Crosby was injured -- apparently his left knee -- in a 6-3 loss to Washington on Wednesday night, so Cooke and Petr Sykora skated on Malkin's wings Friday.
"To be counted on offensively is a real treat for me," Cooke said.
"I was an offensive player in juniors and, you know, there's not always room for everybody to be an offensive guy, so I tried to find a role for myself to keep myself in the league. But given the opportunity, I feel like I can help out and chip in so I'm just going to enjoy it."
Hal Gill also scored, and Malkin had two assists for the Penguins, who had lost eight of their previous 10 and were playing with a depleted lineup. Counting Crosby, the Penguins were without nine injured regulars for most of the game.
Three other players were knocked out of the Washington game and did not play Friday, and defenseman Brooks Orpik left Friday's game during the second period because of an undisclosed injury. He did not return.
Ryan Getzlaf had the lone goal for Anaheim, which has lost four of five.
Pittsburgh dressed five players who had played in 11 NHL games or fewer this season before Friday. Cooke, who was on one of the only two lines comprised of players who began the season at the NHL level, posted the seventh two-goal game of his 10-year career.
"He's such a warrior, so it's nice to see those types of players get rewarded and score some important goals," Pittsburgh coach Michel Therrien said. "I know the guys were pushing for him at the end to score his hat trick."
The Penguins had a 3-on-1 with an empty net in the final minute, but did not score because Malkin and Sykora -- who each had easy open shots -- were trying to set up Cooke for his first career three-goal game.
Cooke scored his sixth of the season on a wraparound with 20.3 seconds to play in the first, Malkin giving Cooke the puck before he banked it off the far post from the left of Ducks goalie Jean-Sebastien Giguere.
Twenty-three seconds into the second, Cooke struck again off of passes from Ryan Whitney and Malkin.
"We've got to be ready from the start of the game, and I don't think we were today," Anaheim forward Samuel Pahlsson said.
The Ducks aren't without their own injury issues, down four regulars themselves -- including star Teemu Selanne. Getzlaf scored on the power play 14:38 into the second off a rush into the zone by Scott Niedermayer and a pretty cross-slot set-up by rookie Bobby Ryan.
But Anaheim managed only 21 other shots -- a mere 13 after the first intermission -- on Marc-Andre Fleury, and failed in each of its other three power plays. The Ducks were playing the first of five consecutive games on the road, where it has won only two of its past 10.
"It's a big roadtrip for us, we know the importance of it, and tonight not to come out with any points is disappointing," veteran defenseman Bret Hedican said.
"Right now we're just a step slow; we're not making things happen."
Defenseman Gill scored a rare goal of his own with 4:55 to play when Jordan Staal won the faceoff back to him at the left point and his slap shot got through traffic. It was Gill's first of the season -- 30th of his 11-season career.
"I don't get to do a lot of it, but it's nice when those things go in," Gill said. "It's just nice to get the win; if it helps us win, then I'm all for it. I definitely don't mind scoring if I get the chance."
Crosby had missed 34 of the Penguins' 316 games -- including playoffs -- since he arrived as a rookie in 2005. Twenty-nine of those came last season when he had a high-ankle sprain, three the season before due to a groin injury and one during his rookie season (flu).
- The Ducks had scored at least two goals in 12 of their previous 13 games.
- Getzlaf has an eight-game points streak.
- Cooke's most recent two-goal game was Jan. 5, 2007, in Edmonton.