0

I'm looking for an application which can extract any known files types (text, audio, images, videos, etc.) from a binary file given that it's not compressed. The binary file in question has an unknown structure (i.e. it's not an archive or anything like that).

5
  • audio, images, videos, Are usually stored in some compressed format.
    – drescherjm
    Commented Oct 12, 2023 at 14:18
  • I don't understand what you're talking about. Most these formats are indeed compressed, this doesn't change anything. Yes, I'm looking for an application which can extract compressed PNGs, JPEGs, GIFs, MP3s, AAC's, VORBIS'es, H.264/H.265, VP8/VP9/AV1 files, etc. But there's BMP/XPM/etc. which are not compressed. There's uncompressed raw YUV video (if you ever heard about that). There's uncompressed audio, e.g. WAV or even raw PCM. Why does it matter?? Commented Oct 12, 2023 at 15:08
  • I assume here you are talking about resource files compiled into binaries, such as an application that has embedded images, and other media? If so that will not be as straight forward as you may think, as the data you extract there may be in yet another binary format that is intrinsic or proprietary to the application consuming it. Likewise such resources are not limited to be defined as a typical resource file, they can be perfectly valid as byte arrays compiled into code or other formats, and will vary by language as well... If you want to give it a stab though, look at resource hacker. Commented Oct 12, 2023 at 16:07
  • I'm not talking about just binaries (i.e. executable format, and we have many, MZ for Windows, Linux/Android ELF, etc.). A lot of applications use bespoke proprietary storage formats and I just want to be able to extract all the known embedded files. Speaking of "If so that will not be as straight forward as you may think" - the application I'm interested in, and I know it for a fact, stores files as is, i.e. if you find them by their signatures, you can simply dump and examine them. "resource hacker" - AFAIK that's only for Win executables. Doesn't work for me. Commented Oct 13, 2023 at 20:05
  • 1
    See superuser.com/a/1812452/363732 Commented Jun 13 at 8:52

1 Answer 1

2

PhotoRec is able to detect a hundred different types of files, even when mixed in random binary containing files.

It is initially meant to work on hard disk partitions, but it works on files too (just pretend it is a disk image).

Free & Open source.

3
  • I'll try it, thanks a ton! I remember this application, but I didn't know it was able to find files in files. I thought it was only for partitions. Actually it makes perfect sense that you can give it a binary file (not a partition) to work on. It just didn't occur to me. I wonder if it can find files by random offsets. Files on a real partition have certain fixed offsets. And it knows a ton of file formats, great! cgsecurity.org/wiki/File_Formats_Recovered_By_PhotoRec Commented Oct 13, 2023 at 20:10
  • @ArtemS.Tashkinov did it work for you? I have tried it on a binary file that I am sure of containing a known file(.mid) but it does not find anything in it. Commented Apr 7 at 1:55
  • Nope, didn't work for me. Commented Apr 7 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.