Aux2bib
aux2bib is part of the bibtools package, which you can obtain here. As you might be able to guess from the name, it takes a .aux file from a latex compilation and creates a new bib file called references.bib which contains only the entries required by the corresponding .tex file.
Once you extract the perl scripts - you're pretty much good to go. All you need to do is make them executable using
chmod +x aux2bib
There is one possible issue that you could run into when your document uses multiple bib files. If you have the same reference in more than one of those bib files, bibtex will throw a warning. This isn't a problem for the latex compilation as it just continues, but the aux2bib script requires bibtex to exit flawlessly. A good way to check this is just to run bibtex yourself before aux2bib, i.e. for FILE.tex
bibtex FILE
should exit without ANY problems. If you do have multiple references, you can just delete one of the duplicates and all will be well.
After you've made references.bib, make sure you change its name to something more suitable and also change the bibliography environment in your .tex file to point at it!