helios-ventures / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

Unknown Squashfs compression #105

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I can't unpack this router firmware - FREEPORT17.01.bin You can find it here - 
https://docs.google.com/file/d/0By6Bi79J6LLVSVNGM3p2WS1kaWs/edit?usp=sharing

What steps will reproduce the problem?

1.[rzrusink@localhost FMK_060613]$ sudo ./extract-firmware.sh FREEPORT17.01.bin 
FREEPORT17.01/

Firmware Mod Kit (extract) 0.88, (c)2011-2013 Craig Heffner, Jeremy Collake

Preparing tools ...
Scanning firmware...

Scan Time:     2013-06-15 22:26:23
Signatures:    193
Target File:   /home/rusink/FMK_060613/FREEPORT17.01.bin
MD5 Checksum:  90ca7600b4e5462eebd244662f271769

DECIMAL     HEX         DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
0           0x0         uImage header, header size: 64 bytes, header CRC: 
0x443704BE, created: Tue Jan 17 12:07:57 2012, image size: 788187 bytes, Data 
Address: 0x80000000, Entry Point: 0x80228000, data CRC: 0x4ACB9008, OS: Linux, 
CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: 
"DOMOLINK CPE Series"
64          0x40        LZMA compressed data, properties: 0x5D, dictionary size: 
8388608 bytes, uncompressed size: 2373284 bytes
983040      0xF0000     Squashfs filesystem, little endian, version 3.0, size: 
2125487 bytes,  428 inodes, blocksize: 65536 bytes, created: Tue Jan 17 
12:08:03 2012 

Extracting 983040 bytes of uimage header image at offset 0
Extracting squashfs file system at offset 983040
Extracting 1104 byte footer from offset 3144684
Extracting squashfs files...

-And then program hangs. :(

What version of the product are you using? On what operating system?
Firmware Mod Kit (extract) 0.88,
OS Fedora 18 

Please provide any additional information below.

I've faced to the same problem for several times with variouse firmwares like 
this.

Original issue reported on code.google.com by rzrusink on 15 Jun 2013 at 6:39

GoogleCodeExporter commented 8 years ago
Are you running this on a 32 or 64 bit system?

Original comment by heffne...@gmail.com on 17 Jun 2013 at 1:30

GoogleCodeExporter commented 8 years ago
[rzrusink@localhost ~]$ uname -a
Linux localhost.localdomain 3.9.4-200.fc18.i686.PAE #1 SMP Fri May 24 20:24:58 
UTC 2013 i686 i686 i386 GNU/Linux

I've used OS Fedora 18 32-bit

Original comment by rzrusink on 17 Jun 2013 at 3:47

GoogleCodeExporter commented 8 years ago
This squashfs image appears to be compressed using LZMA. Since LZMA was not 
officially supported until squashfs 4.0, the failure to extract is likely due 
to yet another vendor-specific LZMA hack.

If the vendor has a GPL download available for the device, it may include 
unsquashfs that will unpack this. Since you didn't mention exactly what product 
this is, I'm investigating some D-Link GPL code that appears to have been made 
by the same people.

Original comment by heffne...@gmail.com on 18 Jun 2013 at 5:21

GoogleCodeExporter commented 8 years ago
This firmware is for ZyXEL ODM router "Freeport"(for Russian internet provider 
Rostelecom - review (in Russian) - http://ivbox.ru/viewtopic.php?t=97534 Chip - 
Ralink rt3050/52. There is no GPL code in public for it. 
But the same (I think) squashfs compression was used - in ZyXEL Keenetic router 
( http://zyxel.ru/keenetic?t=3427) firmware -BFW.5b Edition. Here is GPL code 
for previous edition - BFW.4 - 
http://dl1.web.zyxel.ru/001/Keenetic/firmware/zyxel_keenetics_gpl_v.1.00_4_D0.ta
r.bz2 , but developers didn't use this "sly" LZMA compression in previous 
edition - I think it's their "know-how". I can copy FS from router if it'll 
help to find solution. 

Original comment by rzrusink on 18 Jun 2013 at 6:03

GoogleCodeExporter commented 8 years ago
Here is Zyxel Keenetic firmware with the same compression - 
https://docs.google.com/file/d/0By6Bi79J6LLVeThldFc2cWFJWm8/edit?usp=sharing . 
You (heff..j@gmail.com) have access to this file. 

Original comment by rzrusink on 18 Jun 2013 at 6:38

GoogleCodeExporter commented 8 years ago
Here is my solution for EA6500v2(squashfs with LZMAv2)

I meet the same problem. Extract the original firmware and build it without any 
modification. But the script said that the file size is greater than the 
original one.

I change build-fireware.sh line 58 from "-comp lzma" to "-comp xz" and 
successfully build a run-able fireware.

I seems that Linksys EA6500v2 fireware is build with xz(AKA LZMAv2). 

Original comment by wsyc...@gmail.com on 29 Oct 2013 at 12:16