Giter Club home page Giter Club logo

Comments (2)

qkaiser avatar qkaiser commented on September 27, 2024

There is a discrepancy between squashfs-tools v4.3 used by the original sasquatch project and our fork of sasquatch that we rebased onto squashfs-tools v4.5.1.

Specifically in handling lzma-adaptive compression.

Output with 4.3:

./sasquatch -f -d /tmp/out/squashfs-root /tmp/sample.sqsh4
SquashFS version [4.0] / inode count [1218] suggests a SquashFS image of the same endianess
Parallel unsquashfs: Using 1 processor
Trying to decompress using default lzma decompressor...
Successfully decompressed with default lzma decompressor
1121 inodes (1470 blocks) to write
--snip--
Trying to decompress with lzma-adaptive...    <--- here LZMA adaptive detection works
Detected lzma-adaptive compression [65536]
created 815 files
created 97 directories
created 248 symlinks
created 0 devices
created 0 fifos

Output with our fork on 4.5.1:

SquashFS version [4.0] / inode count [1218] suggests a SquashFS image of the same endianess
Trying to decompress using default lzma decompressor...
Successfully decompressed with default lzma decompressor
Parallel unsquashfs: Using 1 processor
1121 inodes (1164 blocks) to write
--snip--
Trying to decompress with lzma-adaptive... <--- here LZMA adaptive detection fails
Trying to decompress with lzma-alt...
Trying to decompress with lzma-ddwrt...

It looks like we introduced a regression when applying the sasquatch patches back to v4.5.1. Probably a mismatch between LZMA patches and the updated squashfs-tools API.

If anyone wants to dig into this, that's where I would start: https://github.com/onekey-sec/sasquatch/pull/12/commits

Sadly a git bisect won't help us here because the entire sasquatch history is rebased on squashfs-tools v4.5.1 so we can't go back to a commit that relied on a previous version of squashfs-tools.

from sasquatch.

qkaiser avatar qkaiser commented on September 27, 2024

The sample is properly extracted in branch 4.3-sasquatch so it's definitely our move to 4.5.1 that broke it.

from sasquatch.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.