Brazil score a controversial late penalty to beat Egypt 4-3 in their opening game of the the 2009 Confederations Cup in South Africa.