They are black silhouette-like Goombas.
They attack by trying to ram into Mario and Co. They will always inflict two points of damage if the attack connects.
Other possible appearances
Although not named, Goombas with black-and-purple coloring appear in the final battle against Dark Bowser in Mario & Luigi: Bowser's Inside Story. When Dark Bowser is revived by Dark Fawful, he throws a ball containing different dark enemies at Bowser. Dark Goombas will dash into Bowser; they can be defeated using Bowser's punch.