The Idea Factory - The Gift from the Heavens
An alien ship crash lands in a public space. The aliens onboard all die on impact. Before the military can show up to cordon off the area and classify everything, an engineer goes onboard. They find the replicator, which is the only thing still functioning on the wreck. The technology isn't too far off something he was already working on, and is able to reverse engineer and mass produce it. This is early on in the book, and the rest is about the distribution of the device and how it impacts the world, leading up to the extinction level event that it eventually causes.