Binwalk is a great tool for finding potential files within a given binary stream: https://github.com/devttys0/binwalk
It has an incredible list of supported file types.
https://en.wikipedia.org/wiki/Foremost_%28software%29
A `sudo apt-get install foremost` works on Ubuntu to install it, IIRC