Australia were 176 for four at tea. They were reeling at 98 for four after being sent in to bat but Marsh (67 not out) and Steve Smith (29 not out) added an unbeaten 78 for the fifth wicket with positive stroke play.
David Warner hit two boundaries off Dale Steyn in the first over of the match but made only 12 before he was bowled by Steyn, edging an attempted cut into his stumps.
Chris Rogers made four before he was caught at short leg off Morne Morkel.
New cap Alex Doolan and Marsh added 48 for the third wicket before Doolan was caught at midwicket off Ryan McLaren for 27.
Captain Michael Clarke became Steyn's second victim when he top-edged a hook to fine leg after scoring 23.
Marsh, who survived a sharp chance to Hashim Amla at gully off Morkel when he had 12, went through a quiet period when he scored only nine runs in 18 overs on either side of lunch but reached his half-century off 101 balls with seven fours.