reverse engineering - Binwalk - Compressed data is corrupt / Compressed data is corrupt -
root@kali:~/router# binwalk new-firmware.bin decimal hexadecimal description -------------------------------------------------------------------------------- 84 0x54 uimage header, header size: 64 bytes, header crc: 0xe52a7f50, created: 2012-02-10 07:27:12, image size: 819799 bytes, data address: 0x80002000, entry point: 0x801ac9f0, data crc: 0x6a10d412, os: linux, cpu: mips, image type: os kernel image, compression type: lzma, image name: "linux kernel image" 148 0x94 lzma compressed data, properties: 0x5d, dictionary size: 8388608 bytes, uncompressed size: 2386252 bytes 917588 0xe0054 squashfs filesystem, little endian, version 4.0, compression:lzma, size: 2588426 bytes, 375 inodes, blocksize: 16384 bytes, created: 2016-02-05 02:05:56 root@kali:~/router# dd if=new-firmware.bin of=uboot.lzma skip=148 bs=1 3735488+0 records in 3735488+0 records out 3735488 bytes (3.7 mb, 3.6 mib) copied, 4.16712 s, 896 kb/s root@kali:~/router# dd if=new-firmware.bin of=kernel.squash skip=917588 bs=1 2818048+0 records in 2818048+0 records out 2818048 bytes (2.8 mb, 2.7 mib) copied, 3.46517 s, 813 kb/s
all looks have worked far try following:
root@kali:~/router# lzma -d uboot.lzma lzma: uboot.lzma: compressed data corrupt root@kali:~/router# unsquashfs kernel.squash parallel unsquashfs: using 4 processors lzma uncompress failed error code 0 read_block: failed read block @0x277af0 read_fragment_table: failed read fragment table index fatal error:failed read fragment table
any idea why may happening? prompt says, on kali linux. this
jj@ubuntu:~/firmware$ binwalk -e new-firmware.bin decimal hexadecimal description -------------------------------------------------------------------------------- 84 0x54 uimage header, header size: 64 bytes, header crc: 0xe52a7f50, created: 2012-02-10 07:27:12, image size: 819799 bytes, data address: 0x80002000, entry point: 0x801ac9f0, data crc: 0x6a10d412, os: linux, cpu: mips, image type: os kernel image, compression type: lzma, image name: "linux kernel image" 148 0x94 lzma compressed data, properties: 0x5d, dictionary size: 8388608 bytes, uncompressed size: 2386252 bytes warning: extractor.execute failed run external extractor 'sasquatch -p 1 -le -d '%%squashfs-root%%' '%e'': [errno 2] no such file or directory warning: extractor.execute failed run external extractor 'sasquatch -p 1 -be -d '%%squashfs-root%%' '%e'': [errno 2] no such file or directory 917588 0xe0054 squashfs filesystem, little endian, version 4.0, compression:lzma, size: 2588426 bytes, 375 inodes, blocksize: 16384 bytes, created: 2016-02-05 02:05:56
try
lzma -d < uboot.lzma > uboot
the error found due lzma utils having been superseded xv utils, don't ignore trailing garbage. if use stream (like gave you), you'll still have corruption error message in end, you'll file alright.
source (search "corrupt" , you'll find other related comments)
Comments
Post a Comment