从bin文件中提取

Extracting from bin file

所以我尝试了这个:

root@kali:~/Desktop/fmk# binwalk upgrade-2.4.0.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
512           0x200           LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 2805816 bytes
927576        0xE2758         Squashfs filesystem, little endian, version 4.0, compression:xz, size: 12316692 bytes, 2963 inodes, blocksize: 262144 bytes, created: 2015-08-04 02:40:49

然后我用了下面的dd:

sudo dd if=upgrade-2.4.0.bin of=pineapple.squashfs bs=1 count=12316692

而且我无法取消压缩 pineapple.squashfs。 在 pineapple.squashfs

上找不到 SQUASHFS 超级块

我用的是:

binwalk -Me upgrade-2.4.0.bin

您必须设置 squashfs 所在的偏移量

Usage: dd [OPERAND]...
   or:  dd OPTION
Copy a file, converting and formatting according to the operands.

   bs=BYTES        read and write up to BYTES bytes at a time
   cbs=BYTES       convert BYTES bytes at a time
   conv=CONVS      convert the file as per the comma separated symbol list
   count=N         copy only N input blocks
   ibs=BYTES       read up to BYTES bytes at a time (default: 512)
   if=FILE         read from FILE instead of stdin
   iflag=FLAGS     read as per the comma separated symbol list
   obs=BYTES       write BYTES bytes at a time (default: 512)
   of=FILE         write to FILE instead of stdout
   oflag=FLAGS     write as per the comma separated symbol list
   seek=N          skip N obs-sized blocks at start of output
   skip=N          skip N ibs-sized blocks at start of input
   status=LEVEL    The LEVEL of information to print to stderr;
                   'none' suppresses everything but error messages,
                   'noxfer' suppresses the final transfer statistics,
                   'progress' shows periodic transfer statistics

...

因此,提取文件系统

dd if=upgrade-2.4.0.bin of=pineapple.squashfs bs=1 skip=927576