Keane hasn’t scored since April but the striker guided Juve to victory with an early strike at the Allianz Stadium.
Weston McKenney doubled the Biancaneri’s lead with a second-half Serie A goal, while Rabiot grabbed a late brace to cap off an impressive performance.
It has now been back-to-back wins for Massimiliano Allegri’s side, who have moved up to seventh ahead of a must-win Champions League game against Benfica next week.
Juve started with great intensity and were rewarded after just eight minutes when Filip Kostic crossed from the left and an unmarked Keane finished from close range.
Keane should have found the back of the net again just after the half-hour mark, but McKenney headed wide from six yards.
The Biancaneri showed the danger they pose from set pieces to double their lead nine minutes into the second half, McKenney rising to head Juan Cuadrado powerfully into the roof of the net.
Keane nodded in another high-class signing for Kostic, but his celebrations were cut short after he was caught offside as a hungry Juve continued to cause problems.
Juve scored another goal from a Cuadrado corner in the 82nd minute, Guglielmo Vicario failed to clear Rabiot’s header before it went over the line.
The France international midfielder then capped a fine night for the Turin giants when Danilo slotted home at the end.