Goals from Phil Bardsley and Oumare Tounkara were enough to down a spirited York side, as Steve Bruce used all 19 players at his disposal.
Craig Gardner made his debut for the club, while Titus Bramble, Michael Turner, Lee Cattermole and Kieran Richardson all made triumphant returns from injury.
The away side took just 13 minutes to break the deadlock when Phil Bardsley cut inside from the left to beat former Sunderland goalkeeper Michael Ingham from just inside the area.
Cattermole was the provider for Sunderland’s second goal, supplying a clever volleyed ball to Tounkara, who beat Ingham with a low shot into the corner.
Bramble gave York the chance to pull a goal back after the break, bringing Jamie Reed down inside the area, who then converted from the spot past Trevor Carson.
Despite a lively display from the home side, Steve Bruce’s men maintained their lead in a game that allowed his side to get some match fitness ahead of their trip to Germany on Friday.