ReFirmLabs / binwalk

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

binwalk firmware extract issue in Ubuntu 22.04 LTS #618

Open iAmG-r00t opened 1 year ago

iAmG-r00t commented 1 year ago

So apt install of binwalk has an issue of missing sasquatch install. I went ahead and purged it, installed binwalk from this repo followed the guide faced this issue fixed it as suggested here but now when I try to extract this binary the files in 'extract_dir/squashfs-root/www/' are empty.

But when I install binwalk in Ubuntu 20.04.5, first I don't face any errors, two the files are extracted properly and are not empty. Ohhh and there aren't two squashfs-root directories.

Can someone try and see what the issue can be?

My Issue

image

image

Expectations

image

image

iAmG-r00t commented 1 year ago

I hope I have explained it properly.

jacopotediosi commented 1 year ago

To correctly compile sasquatch on Ubuntu 22 apply https://github.com/devttys0/sasquatch/pull/51 instead of https://github.com/devttys0/sasquatch/pull/47:

cd /tmp
git clone --quiet --depth 1 --branch "master" https://github.com/devttys0/sasquatch
cd sasquatch
wget https://github.com/devttys0/sasquatch/pull/51.patch && patch -p1 <51.patch
sudo ./build.sh

Doing so, I see files extracted from your firmware aren't empty anymore.

nrathaus commented 9 months ago

Thank you for the help @jacopotediosi - this should be made part of the INSTALL process for binwalk.. not sure why its not

Cossack9989 commented 1 week ago

lol https://github.com/devttys0/sasquatch/pull/51.patch, the patch also works on Debian12