They also know their share about Shareece Wright, a San Francisco teammate less than two weeks ago.
Boldin and Smith took it to the team they helped win the Super Bowl nearly three years ago, while Wright's embarrassing outing helped out his former 49ers on a day Baltimore missed chances in every phase in a 25-20 loss to San Francisco on Sunday.
"When you have a guy on your team for that long and get to see him every day in practice, you understand his weaknesses, as well as his strengths," Boldin said. "That was one of the things that we wanted to attack."
Phil Dawson kicked four field goals, including a 53-yarder, in the first win since Week 1 for San Francisco (2-4). Boldin -- a Super Bowl star for the Ravens against San Francisco following the 2012 season -- had a late 51-yard catch that set up Quinton Patton's 21-yard reception for the first touchdown of his career.
Flacco's desperation pass to the end zone on the final play went incomplete to Steve Smith, and the quarterback wound up 33 of 53 for 343 yards. Smith dropped two balls in the end zone before catching one.
Kaepernick went 16 of 27 for 340 yards, and Boldin made five catches for 102 yards. Torrey Smith had three receptions for 96 yards.
The rematch of the Super Bowl three seasons ago featured a pair of last-place teams trying to turn around their seasons, and it showed in some sloppy play.
Steve Smith caught a 34-yard TD pass in the third, but the Ravens (1-5) are reeling through the worst start in franchise history. Tough weekend for the Harbaugh brothers after Baltimore coach John Harbaugh's little brother Jim's Michigan team lost Saturday to Michigan State on a botched punt.
The 49ers won for the first time since Sept. 14 against Minnesota.
Now San Francisco must prepare in a hurry for a short week with rival Seattle coming to town Thursday night. The Seahawks have won five of the last six meetings, including the playoffs.
Kaepernick is sensing a shift.
"We're a 2-4 football team that needs to get some more wins," he said. "Our team is building where we're gradually picking up momentum."
Baltimore's previous four losses featured second-half collapses. This time, it all but began from the opening kickoff.
The Ravens appeared a step behind all day. Their problems came in pairs, too: Steve Smith's two end-zone drops, two drops by the defense on would-be interceptions and Flacco's two picks.
"I don't have the frustration gauge out. I don't get frustrated. I don't get down, just disappointed," Harbaugh said. "I get determined is what I get. We have a bunch of guys that feel the same way. We have to get it done, and it starts with me."
Wright, released by the 49ers on Oct. 10 without playing a game, then signed by the Ravens last week, was flagged for holding Boldin in the first quarter to set up Dawson's second field goal. Torrey Smith burned the cornerback on his career-long TD, capping a 49-second, two-play drive that made it 13-3.
Wright yielded a 26-yard gain to Boldin on another drive that ended with a field goal by Dawson, and then fell down on Patton's TD catch.
"It was a quick week, but I've got to be ready," Wright said.
Early in the third with no intended receiver in sight, Flacco threw right to 49ers cornerback Kenneth Acker, who returned the interception 45 yards.
Baltimore, making its second Bay Area trip in less than a month after a loss at Oakland on Sept. 20, had won four straight against San Francisco, including that 34-31 Super Bowl victory at the Superdome.
49ers left tackle Joe Staley acknowledged during the week the offense prematurely spoke in the huddle late of having a victory parade.
Kamar Aiken added a 2-yard touchdown catch for the Ravens, who had won six in a row against NFC teams and dropped to 19-10 vs. the NFC under Harbaugh.
http://www.pro32.ap.org and http://www.twitter.com/AP-NFL
Colts OG Nelson out with same injury as Wentz
Adam Schefter breaks down Quenton Nelson's foot injury that will have him sidelined for 5-12 weeks.
The significance of 'One More' for Ryan Clark and Troy Polamalu
Ryan Clark reflects on the bond between himself and Troy Polamalu.
Las Vegas Raiders add defensive depth, sign tackle Gerald McCoy
Veteran defensive tackle Gerald McCoy, 33, drafted by the Tampa Bay Buccaneers in the first round all the way back in 2010, has joined the Las Vegas Raiders with a free-agent deal announced by the team on Wednesday.
What if the Packers traded for WR Michael Thomas?
Dan Orlovsky makes a hypothetical trade where the Packers would acquire Saints WR Michael Thomas in exchange for QB Jordan Love.
NFL training camp updates: Colts' Reich addresses calls for Foles; Hurts' highs and lows, more
Frank Reich had a message for fans calling for Indy to sign Nick Foles from the Bears. Check out the notable news and insights from around NFL camps.
Washington Football Team bans Native American headdresses, face paint from FedEx Stadium
The Washington Football Team has banned fans from wearing Native American headdresses or face paint to games at FedEx Field this season.