Allow me to inform you of the process by which criminals acquire firearms and how you the average Joe can purchase one from multiple sources.
>thievery
Many criminals are just scavengers and opportunists. When you steal a car there's a chance there's a gun underneath the seat. That gun is now yours. This is easily the most common way guns are acquired and thousands (source: my ass its probably millions) of guns end up exchanging hands every year. You can look up the statistics on the amount of guns reported stolen every year to get a little bit of perspective.
>LTL manufacturing
Some people actually manufacture firearms with things as sophisticated as 3d printers and as archaic as files and pit metal. There's many videos on youtube that show you whole families of gunsmiths in the orient that can clone guns. They're often not of the best quality and the people who make them often have some kind of malfunction like a drug addiction that keeps them poor. These people are the best to get weapons of any kind from. So long as you tell them what you want then they'll make it to the exact same standard if you're willing to pay for it.
While it's not common to see ghost guns for sale it's definitely hard to tell as fake serial numbers are easy to stamp or engrave.
>reselling and distribution
Now we get to the part where we answer your question on where they actually get them. When your buddy down the street breaks into houses or steals cars he's got a lot of guns from all of that. He can't just go to a pawn shop and pawn it off either so he has a special guy for offloading his guns to at a fair price. That guy is a fence. That guy then sells those guns to other criminals via word of mouth. Cell phones, facebook and even good old Instagram are great places to find your local burner dealer. Most if not all of his weapons are going to be really hot and the ones that aren't don't have real serial numbers.
Just ask the homie with the gun where you can get one.
Go buy one.