Hamilton assisted on Gregory Campbell's second-period goal that broke a 1-all tie, then scored on a third-period power play.
Rask allowed the game's first goal by Vernon Fiddler at 6:46 of the second. Loui Eriksson tied it at 14:17 of the second before Campbell gave the Bruins the lead at 18:27.
Kari Lehtonen made 24 saves for Dallas.
The Stars failed to score on any of their six power plays. They are 3 for 37 over the last nine games.During the same period, Boston has killed off all but two of 35 penalties.