We study the solar wind interaction with Mars in a global three-dimensional hybrid model. A well-developed, vast ion foreshock forms under a strongly flow-aligned interplanetary magnetic field (IMF) configuration but otherwise nominal solar wind and solar minimum photon flux conditions. Large-scale ultra-low frequency (ULF) waves are excited in the foreshock by backstreaming ions. The foreshock ULF waves constitute two distinct regions in the analyzed solar wind and IMF situation: the near region where the wave period is 71-83 s and the far region where the wave period is 25-28 s. The near foreshock region waves transmit downstream through the bow shock and affect dynamics of the solar wind and planetary ion populations. Especially, ion precipitation rate into the exobase and planetary ion escape rates fluctuate at the ULF wave period corresponding to the near foreshock region. The peak-to-peak amplitude of the modulation is few percent or less. Interestingly, ionospheric oxygen ion escape fluxes show more than two orders of magnitude local modulations in the heavy plume at the same period. Finally, the escape rates of the ionospheric oxygen ion populations are enhanced by 60-70% under flow-aligned IMF compared to nominal upstream conditions.