Reading a different endian SQUASHFS filesystem on C0.squashfs
Found a valid big endian SQUASHFS 3:0 superblock on C0.squashfs.
Creation or last append time Thu Mar 26 03:33:52 2015
Filesystem size 5892.40 Kbytes (5.75 Mbytes)
Block size 65536
Filesystem is not exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always_use_fragments option is not specified
Check data is not present in the filesystem
Duplicates are removed
Number of fragments 101
Number of inodes 1379
Number of uids 1
Number of gids 0
这也确认了固件文件中确实存在一个有效的SquashFS格式的文件系统。然后尝试进行解压,程序报错。
Reading a different endian SQUASHFS filesystem on C0.squashfs
Parallel unsquashfs: Using 8 processors
gzip uncompress failed with error code -3
read_block: failed to read block @0x5c0f6d
read_fragment_table: failed to read fragment table block
FATAL ERROR:failed to read fragment table
通过对这个错误信息进行调查分析,得知可能是使用了非标准的squashfs进行的压缩。我下载了最新版的SquashFS工具,重新进行编译。但是还是解压失败。更进一步的分析发现Firmware Mod Kit这个工具可能可以解压这个固件,虽然FMK这个工具好久不更新了。最后使用FMK的unsquashfs_all脚本,成功解压了固件。程序识别出,固件使用的squashfs版本为"./src/squashfs-3.0/mksquashfs-lzma”。
BusyBox v1.4.2 (2013-12-23 15:48:24 CST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (7.09)
-----------------------------------
- 10 oz Vodka Shake well with ice and strain
- 10 oz Triple sec mixture into 10 shot glasses.
- 10 oz lime juice Salute!
---------------------------------------------------
root@WNR2200:/#