During a prolonged wartime, there will be various ways to procure firearms, one of which is domestically produced guns. Quality won't be as good as those made during the peace times., but first thing is to be able to supply guns.
Guns.com has some photos of captured ISIS .50 cal rifle
http://www.guns.com/2016/11/15/this-captured-isis-homebrew-50-cal-is-a-ka-boom-waiting-to-happen-photos/
From: Guns.com