Police have busted an illegal firearms factory in Uttar Pradesh's Muzaffarnagar district and arrested two people.