Chicago won its fifth straight and inched within three games of division-leading Detroit in the American League Central.
Jose Contreras (3-7) continued to turn his season around with an eight-inning effort, during which he gave up two runs on five hits with eight strikeouts. After losing his first five decisions this year, he has won three out of five.
The score was tied going into the sixth before the White Sox erupted for four runs off Jeremy Sowers (2-6). Jim Thome reached on a one-out single and moved to third on a base hit by Paul Konerko.
Castro then hit the first pitch from Sowers over the wall in right for his fifth home run this year.
Jason Nix kept the inning going with a double and scored on a single by Gordon Beckham.
Copyright 2009 by United Press International.