Skip to content

Instantly share code, notes, and snippets.

@thanoskoutr
Last active December 23, 2023 19:06
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanoskoutr/4ea24a443879aa7fc04e075ceba6f689 to your computer and use it in GitHub Desktop.
Save thanoskoutr/4ea24a443879aa7fc04e075ceba6f689 to your computer and use it in GitHub Desktop.
Fix sasquatch installation for binwalk

Fix sasquatch installation for binwalk

For anynone that is running the latest version of binwalk (Binwalk v2.3.3) and when trying to extract squshfs filesystems, gets the following error:

WARNING: Extractor.execute failed to run external extractor 'sasquatch -p 1 -le -d 'squashfs-root' '%e'': [Errno 2] No such file or directory: 'sasquatch', 'sasquatch -p 1 -le -d 'squashfs-root' '%e'' might not be installed correctly

it might have to do that the sasquatch project is missing or not working correctly.

Install sasquatch

From the binwalk installation guide run the following to download, build and install sasquatch into your system:

# Install sasquatch to extract non-standard SquashFS images
$ sudo apt-get install zlib1g-dev liblzma-dev liblzo2-dev
$ git clone https://github.com/devttys0/sasquatch
$ (cd sasquatch && ./build.sh)

Fix compile errors

If a compile error occurs, you have to download and apply an unmerged patch, until the problem is fixed upstream:

# From inside the sasquatch directory
$ wget https://raw.githubusercontent.com/devttys0/sasquatch/82da12efe97a37ddcd33dba53933bc96db4d7c69/patches/patch0.txt
$ mv patch0.txt patches
$ ./build.sh

The following has been tested on Kali 2022.2 (Debian 5.17.11-1kali1) with Binwalk v2.3.3 and squashfs-tools v4.3

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment