The M4 Carbine. It us the more shorter, compact version of the M16.

The M4A1 Carbine is one of the main weapons utilized by the U.S. Armed Forces in the film. The M4A1 is seen in the hands of members of the 2nd Battalion 5th Marines including Staff Sergeant Michael Nantz and Second Lieutenant William Martinez. USAF Technical Sergeant Elena Santos is also seen with M4's. The Marines' M4A1 carbines are fitted with ACOG scopes, M203 Grenade Launchers, RIS foregrips, Surefire Universal weaponlights, and most interestingly, AN/PEQ-15 laser designators; an improved, compact version of the AN/PEQ-2 system first employed in the early 2000's. In several scenes, bayonets are seen fixed on the M4's (which appear to be OKC-3S bayonets, adopted by the Marines to replace the M9 bayonet). The M4s are also all equipped with what appear to be Magpul Back Up Sights (MBUS) though these are never actually used.

Sopmod m4 m203 06

M4A1 variant with a M203 grenade launcher.