4

I have a bin file of DVB (DTH) box firmware. I want to change one image inside that bin file, how I can do this? Please guide me in right direction.

I tried bin walk, but the file that it extracted looks like unuseful.

Below is the command I tried:

$ binwalk -B /Users/Me/Documents/Reverse/dump_all.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
52150         0xCBB6          LZMA compressed data, properties: 0xC8, dictionary size: 16777216 bytes, uncompressed size: 65536 bytes
55216         0xD7B0          eCos RTOS string reference: "ecos.bin.lzma"
55232         0xD7C0          eCos RTOS string reference: "ecos.bin.gz"
66048         0x10200         JPEG image data, JFIF standard 1.02
66078         0x1021E         TIFF image data, big-endian, offset of first image directory: 8
68069         0x109E5         Unix path: /www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
68238         0x10A8E         Unix path: /ns.adobe.com/xap/1.0/mm/'>
131072        0x20000         romfs filesystem, version 1 size: 2439392 bytes, named "rom 5c67f699"
2621440       0x280000        CramFS filesystem, little endian, size: 12288 version 2 sorted_dirs CRC 0xA76D500A, edition 0, 5 blocks, 20 files
2883584       0x2C0000        CramFS filesystem, little endian, size: 819200 version 2 sorted_dirs CRC 0xB7F50F6A, edition 0, 976 blocks, 362 files
3739148       0x390E0C        Zlib compressed data, compressed
3741196       0x39160C        Zlib compressed data, compressed
3743756       0x39200C        Zlib compressed data, compressed
3744780       0x39240C        Zlib compressed data, compressed
3746316       0x392A0C        Zlib compressed data, compressed
3750924       0x393C0C        Zlib compressed data, compressed
3752460       0x39420C        Zlib compressed data, compressed
3753996       0x39480C        Zlib compressed data, compressed
3755532       0x394E0C        Zlib compressed data, compressed
3757068       0x39540C        Zlib compressed data, compressed
3758604       0x395A0C        Zlib compressed data, compressed
3867148       0x3B020C        Zlib compressed data, compressed
3901964       0x3B8A0C        Zlib compressed data, compressed
3903500       0x3B900C        Zlib compressed data, compressed
3905036       0x3B960C        Zlib compressed data, compressed
3906572       0x3B9C0C        Zlib compressed data, compressed
3908108       0x3BA20C        Zlib compressed data, compressed
3909644       0x3BA80C        Zlib compressed data, compressed
3911180       0x3BAE0C        Zlib compressed data, compressed
3912716       0x3BB40C        Zlib compressed data, compressed
3914252       0x3BBA0C        Zlib compressed data, compressed
4020748       0x3D5A0C        Zlib compressed data, compressed
4022284       0x3D600C        Zlib compressed data, compressed
4023820       0x3D660C        Zlib compressed data, compressed
4041740       0x3DAC0C        Zlib compressed data, compressed
4045836       0x3DBC0C        Zlib compressed data, compressed
4047372       0x3DC20C        Zlib compressed data, compressed
4064780       0x3E060C        Zlib compressed data, compressed
4065804       0x3E0A0C        Zlib compressed data, compressed
4133900       0x3F140C        Zlib compressed data, compressed
4135436       0x3F1A0C        Zlib compressed data, compressed
4140556       0x3F2E0C        Zlib compressed data, compressed
4142092       0x3F340C        Zlib compressed data, compressed
4147212       0x3F480C        Zlib compressed data, compressed
4148748       0x3F4E0C        Zlib compressed data, compressed

And the second command to extract file:

$ binwalk -e /Users/Me/Documents/Reverse/dump_all.bin -C /Users/me/Documents/Reverse/dump_all 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------

WARNING: Extractor.execute failed to run external extractor '7z e -y '%e'': [Errno 2] No such file or directory
52150         0xCBB6          LZMA compressed data, properties: 0xC8, dictionary size: 16777216 bytes, uncompressed size: 65536 bytes
55216         0xD7B0          eCos RTOS string reference: "ecos.bin.lzma"
55232         0xD7C0          eCos RTOS string reference: "ecos.bin.gz"
66048         0x10200         JPEG image data, JFIF standard 1.02
66078         0x1021E         TIFF image data, big-endian, offset of first image directory: 8
68069         0x109E5         Unix path: /www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
68238         0x10A8E         Unix path: /ns.adobe.com/xap/1.0/mm/'>
131072        0x20000         romfs filesystem, version 1 size: 2439392 bytes, named "rom 5c67f699"

WARNING: Extractor.execute failed to run external extractor 'cramfsck -x '%%cramfs-root%%' '%e'': [Errno 2] No such file or directory

WARNING: Extractor.execute failed to run external extractor 'cramfsswap '%e' '%e.swap' && cramfsck -x '%%cramfs-root%%' '%e.swap'': [Errno 2] No such file or directory
2621440       0x280000        CramFS filesystem, little endian, size: 12288 version 2 sorted_dirs CRC 0xA76D500A, edition 0, 5 blocks, 20 files

WARNING: Extractor.execute failed to run external extractor 'cramfsck -x '%%cramfs-root%%' '%e'': [Errno 2] No such file or directory

WARNING: Extractor.execute failed to run external extractor 'cramfsswap '%e' '%e.swap' && cramfsck -x '%%cramfs-root%%' '%e.swap'': [Errno 2] No such file or directory
2883584       0x2C0000        CramFS filesystem, little endian, size: 819200 version 2 sorted_dirs CRC 0xB7F50F6A, edition 0, 976 blocks, 362 files
3739148       0x390E0C        Zlib compressed data, compressed
3741196       0x39160C        Zlib compressed data, compressed
3743756       0x39200C        Zlib compressed data, compressed
3744780       0x39240C        Zlib compressed data, compressed
3746316       0x392A0C        Zlib compressed data, compressed
3750924       0x393C0C        Zlib compressed data, compressed
3752460       0x39420C        Zlib compressed data, compressed
3753996       0x39480C        Zlib compressed data, compressed
3755532       0x394E0C        Zlib compressed data, compressed
3757068       0x39540C        Zlib compressed data, compressed
3758604       0x395A0C        Zlib compressed data, compressed
3867148       0x3B020C        Zlib compressed data, compressed
3901964       0x3B8A0C        Zlib compressed data, compressed
3903500       0x3B900C        Zlib compressed data, compressed
3905036       0x3B960C        Zlib compressed data, compressed
3906572       0x3B9C0C        Zlib compressed data, compressed
3908108       0x3BA20C        Zlib compressed data, compressed
3909644       0x3BA80C        Zlib compressed data, compressed
3911180       0x3BAE0C        Zlib compressed data, compressed
3912716       0x3BB40C        Zlib compressed data, compressed
3914252       0x3BBA0C        Zlib compressed data, compressed
4020748       0x3D5A0C        Zlib compressed data, compressed
4022284       0x3D600C        Zlib compressed data, compressed
4023820       0x3D660C        Zlib compressed data, compressed
4041740       0x3DAC0C        Zlib compressed data, compressed
4045836       0x3DBC0C        Zlib compressed data, compressed
4047372       0x3DC20C        Zlib compressed data, compressed
4064780       0x3E060C        Zlib compressed data, compressed
4065804       0x3E0A0C        Zlib compressed data, compressed
4133900       0x3F140C        Zlib compressed data, compressed
4135436       0x3F1A0C        Zlib compressed data, compressed
4140556       0x3F2E0C        Zlib compressed data, compressed
4142092       0x3F340C        Zlib compressed data, compressed
4147212       0x3F480C        Zlib compressed data, compressed
4148748       0x3F4E0C        Zlib compressed data, compressed

And the output folder looks like this: Extracted file using binwalk

I also tried 7zip to extract files, and below is the screenshot of extracted files:

Files extracted using 7zip

It looks like 7zip extracted the file structure I am looking for but problem is that it didn't extract files there are only folders only and there was an error message, too: Error in 7zip extraction

Here is the link to firmware.

9
  • 1
    What have you tried so far? Which image do you want to change? In what way do you want to change it? What specific technical problem or difficulty are you facing?
    – julian
    Commented May 9, 2019 at 10:03
  • Please check my updated question, 66078 0x1021E TIFF image I think this is the image that I want to remove actually DVB box has large logo on bottom right corner that I don't want it is very big and annoying. Commented May 9, 2019 at 10:15
  • I got the solution if any one want to know how let me know Commented May 15, 2019 at 5:32
  • 1
    it would be great if you posted a solution here. It may be useful to others later
    – julian
    Commented May 15, 2019 at 5:36
  • 1
    Understandable. This community is generally much more professional and less rude than the one at stackoverflow. It’s up to you
    – julian
    Commented May 15, 2019 at 5:49

1 Answer 1

1

I am trying to do the same.

It's a gx6605 firmware used in national chipset dvbs2 boxes. I used tuxbox tool to extract the cramfs files, but it only extracts the themes and xml files. Nothing useful.

I used gx6605 unpack repack tool and unpacked the sections as

boot.bin
data.bin
kernel.bin
logo.bin
root.bin
table.bin
theme.bin

The Kernel is packed in lzma, but first you need to remove the first 8 lines of the kernel file and save it.

enter image description here

Once you remove this header and save the file, you can decode the file using lzma.exe in Windows.

Decode syntax: lzma d kernel.bin kernel_unpacked.bin

Now you can modify the kernel_unpacked.bin file and view the codes using a hex editor or some other viewer.

However, I was unable to extract any content out of this file (as I don't know much about binary files). Let me know if you can find where the actual code resides.

I found some references in the BOOT.bin file for ecos.bin.gz which you can check.

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.