After a frustrating night in front of goal, Sunderland eventually found a way through as the game moved into the final 10 minutes when Andy Reid's low cross was turned in by the unfortunate Daniel Blanchett for an own goal.
Three minutes later, Campbell was flattened by Sam Gaughran, and then stepped up to score the penalty.
Craig Mackail-Smith increased his chances of starting the season with an hour of play for Posh.
Mackail-Smith has been struggling since the end of last season with a groin injury but managed 60 minutes and could now face Derby on Saturday.
Darren Ferguson's side started well and Lee Frecklington headed straight at Marton Fulop from Daniel Blanchett's cross.
Mackail-Smith had the ball in the net after the break but was offside.