A woman punched her attacker in the face after he pushed her over and tried to take her jeans off, police have said.