It does not offer that much of a saving, as the $\Delta v$ needed for a Moon transfer is 3120 m/s, which is not a lot less than a Mars transfer at 3600 m/s. Timing the Moon to be in the right place may even give you a slightly less optimal launch window for the Mars transfer.
However, such manoeuvres are entirely possible. A single Moon flyby can save you a little over 100 m/s. But, you also have the possibility of a tipple Moon flyby:
1) Spend the first 3120 m/s of $\Delta v$ in LEO, to get a minimal Moon transfer orbit. Doing a flyby will not get you up to escape velocity, as the Moon can not bend the orbit 180 degrees (relative to the Moon). The new orbit can be targeted to have an orbital period of exactly 1 month.
2) After one month spent in the new orbit, the spacecraft encounters the Moon at the same location, and completes the first manoeuvre. The target velocity is just at Earth's escape velocity.
3) At the border of the Earth's Hill sphere, perform a very small burn (some 10-20 m/s). Fall back towards the Earth, and do a little extra burn at periapsis. On the outbound leg, the last Moon flyby is performed, and the spacecraft does now have enough velocity to achieve a Mars transfer orbit.
All in all, saving approximately 300 m/s of those 480 m/s gives you a lot more trouble than it is worth, adding more things that can go wrong with the mission, and adding several extra months to the trip time.
Out of pure theoretical obscurity, you can actually skip the periapsis burn at stage 3) of the tripple Moon flyby. The spacecraft does then still have a little $v_{inf}$ after escaping the system, but not enough for a Mars transfer. An "Earth flyby" is not possible in this context, as what we are trying to achieve is a higher Earth $v_{inf}$. However, we can take advantage of Earth not being just a planet, but a system including the Moon. Entering a two-body system, you can actually gain some $v_{inf}$:

The synodic period to synch up with the Earth-Moon system is of course several years long, and one such flyby is not enough to gain the remaining velocity for a Mars transfer. So after a few decades, you have eventually gained all of the 480 m/s for "free". (Easily lost in station keeping during the extremely long and precision demanding mission.)