Both men made par on the first two holes, before Dufner took the lead at the third.
Another birdie at the fifth saw the American extend his lead to two, before an eagle at the seventh put him firmly in control at three up.
Dufner was four up by the time they reached the turn after a birdie at the eighth.
Hanson staged a comeback on the back nine, winning three holes in a row at 10, 11 and 12 to get himself back into contention.
However, a birdie at 13 gave the American some breathing space. The Swede hit back at the next hole but a three at the par-four 15th hole edged Dufner near to the finish line.
A bogey at the 17th let Hanson in with a shout of winning a half-point, but the Swede missed a 10-footer on the final hole that would have tied the match.