ReFirmLabs / binwalk

Firmware Analysis Tool
MIT License
10.38k stars 1.49k forks source link

Incorrect output on the latest openwrt x86_64 firmware #597

Open wootar opened 2 years ago

wootar commented 2 years ago

File: https://downloads.openwrt.org/releases/21.02.2/targets/x86/64/openwrt-21.02.2-x86-64-generic-squashfs-combined.img.gz

When running binwalk on the decompressed one What I should expect:

262144        0x40000         Linux EXT filesystem, blocks count: 4096, image size: 4194304, rev 2.0, ext2 filesystem data, UUID=84173db5-fa99-e35a-95c6-28613cc73cc7, volume name "kernel"
17301504      0x1080000       Squashfs filesystem, little endian, version 4.0, compression:xz, size: 4156562 bytes, 1348 inodes, blocksize: 262144 bytes, created: 2022-02-16 20:29:10

What I get:

262144        0x40000         Linux EXT filesystem, blocks count: 4096, image size: 4194304, rev 2.0, ext2 filesystem data, UUID=84173db5-fa99-e35a-95c6-28613cc73cc7, volume name "kernel"
5374788       0x520344        bix header, header size: 64 bytes, header CRC: 0xE8C2F9, created: 2106-02-07 01:21:09, image size: 186 bytes, Data Address: 0x1000000, Entry Point: 0x83BB9000, data CRC: 0x50F, compression type: none, image name: ""
5405372       0x527ABC        xz compressed data
17301504      0x1080000       Squashfs filesystem, little endian, version 4.0, compression:xz, size: 4156562 bytes, 1348 inodes, blocksize: 262144 bytes, created: 2022-02-16 20:29:10

The bix header and xz one are a false positive.

mzpqnxow commented 5 months ago

There are a lot of options for handling this depending on what exactly you want. Might want to start with: