The horrific incident happened at Ballyare Woods between Letterkenny and Ramelton at approximately 7.30pm.
The girls had enjoyed a picnic and had been walking through the woods when the attacker struck.
The 12 year old girl was left badly shaken and also had a severe red mark on her side where she had been struck.
The man ran off when the girl called out to another friend who was also in the woods on the picnic.
The terrified girls ran back to their homes and told their parents about the horrific incident.
A number of men immediately searched the woods but could not find any trace of the man.
Gardai were alerted to the attack and interviewed the girls and their families about the attack.
They have also issued an appeal to a man who was walking his dogs in the woods earlier to contact them.
Garda Inspector David Kelly said “We are asking anybody who was in this area and may have seen anybody acting suspiciously to come forward.
“We have launched a full investigation into this incident and we would appeal for witnesses,” he said.