Really good data on this is hard to find.  The best data I've seen would indicate:1.  They receive guns from friends or family.  Keep in mind that those friends may be fellow gang members, etc.  Sometimes these are sales, sometimes gifts. Often they are to pay back some debt. Relatively few of these transactions are likely to use legal means, as the parties already know that they are breaking the law.  This also includes straw purchases where someone buys a firearms for someone who is prohibited.2.  They are stolen.  Or, reported stolen when what really happened was the above.3.  The grey market.  One survey found that a surprisingly large number of criminals obtained their guns at swap meets.  4.  Corrupt gun dealers.  Some small number of gun dealers are corrupt and will illegally sell firearms to convicted criminals and other prohibited persons. Gun shows and face to face sales between strangers are fairly rare routes for guns end up in the hands of criminals.It's been well reported that the most recent fairly complete data for this goes back to 1994, and includes substantial time before current background check requirements were law.  Various misuses of some data caused congress, at the behest of gun owners, to restrict collection and distribution of some amount of this data, and no one has taken a serious effort to do a major study in it's absence.