Rural blacksmiths in Africa and South Asia are increasingly producing guns as a profitable addition to their usual farm implements and spare parts for vehicles and machines. These areas have been producing iron implements for over two thousand years, but in the last decade the production of cheap pistols and shotguns has mushroomed. These weapons compete on price with more sophisticated factory made guns. In rural areas, the weapons are handy for hunting, or just keeping the local predators at bay. In urban areas, these weapons have produced growing incidents of armed robbery. Criminals have found that a firearm is much more effective than a knife for this sort of thing. Blacksmiths, especially those out in the countryside, have found police attention rare, and customers (often from urban areas) abundant. These crude guns are the highest profit items these smiths can produce.
For example, India has a growing problem with homemade pistols ("kattas") and shotguns (big kattas) showing up in remote, often very poor, areas. These weapons can be made from many common forms of steel pipe, and improvised firing mechanisms (that hit the bit of sensitive explosive at the center of the rear of the cartridge, which ignites the propellant in the cartridge and fires the bullet or shotgun pellets out the smooth bore barrel).
The easiest weapon to make is basically a single shot pistol firing a .410 (10.4mm) or 20 gauge (15.6mm) shotgun shell. Accurate enough for something within 5-10 feet. Not much good for hunting. These cost $20-$50 each in most parts of the world. The next step up, which requires an experienced metal worker and some machine shop tools, is full size (or sawed off) shotgun (single or double barrel), that sells for $80-$300. These can be used for hunting. These craftsmen can also make 9mm pistols (single shot or revolvers) for $50-$600. These weapons, because they are firing a more powerful cartridge, are more dangerous to use, because they are prone to exploding, rather than firing, when the trigger is pulled.
Ironically, people out in the countryside, where there are still dangerous animals that a gun can protect a village from, have fewer firearms. That's because there's more money, more to steal, and more demand for weapons in the cities.
In some parts of the world, like Ghana, the metal working center of Akwa, in Nigeria, and the Pushtun tribal territories of Pakistan and Afghanistan, there are craftsmen who can reproduce just about any modern firearm. The Ghana, Akwa and Pushtun tribesmen have been making metal weapons for over a thousand years, and quickly applied their skills to firearms when they first encountered Europeans using them.
With all these homemade weapons, the key ingredient is ammunition. The cartridges are more difficult to manufacture than the guns, since it involves chemistry, as well as metal working and fabrication. But ammo is easier to smuggle, and once you have that, there are metal working craftsmen in most parts of the world who can figure out how to build a weapon that will fire the bullets.
For over a century now, factory made rifles have been getting into these remote areas. This hurt the market for the high-end handmade weapons, but the cheaper stuff still sold. This is still the case, even with the flood of cheap AK-47s that poured into Afghanistan (starting the 1980s) and Africa (after the Cold War ended in 1991). Again, the cheap pistols and small shotguns were still popular with criminals, especially young guys just starting out. In rural India, communist rebels and political thugs often use these weapons, in addition to factory made pistols and rifles. Again, these two groups prefer concealable weapons, and the cheap homemade stuff gets the job done inexpensively.