Livebox (Inventel DV4210) DWB Decryption


The Livebox firmware file contained on the Recovery CD is encrypted (why encrypt something containing GPL code?, is there something to hide?) and requires the use of the following program dwbdecrypt to do the decryption. This program will decrypt and extract all the different parts of the DWB file. Depending on the version of firmware will depend on whether CRAMFS (firmware lower than 5.08 and using Linux kernel version 2.4.17) or SQSHFS (firmware greater than 5.08 and using Linux kernel version 2.6.12.6) images are generated.

A DWB file using CRAMFS has only a single (usr_fs) image. Sample output for firmware V5.06.2-fr is,

./decrypt, Program to decode Inventel Livebox (DV-4210) Recovery DWB Files. (c) 2008 Andy Potter
File to Decode => Firmware_v5.06.2-fr.dwb
Encrypted Script File => Firmware_v5.06.2-fr.dwb.script.encrypted
Decrypted Script File => Firmware_v5.06.2-fr.dwb.script.decrypted
Decrypted ASCII Script => Firmware_v5.06.2-fr.dwb.script.ascii
Encrypted CRAMFS File(s) => Firmware_v5.06.2-fr.dwb.cramfs.encrypted
Decrypted CRAMFS File(s) => Firmware_v5.06.2-fr.dwb.cramfs.decrypted
Encrypted SQSHFS File(s) => Firmware_v5.06.2-fr.dwb.sqshfs.encrypted
Decrypted SQSHFS File(s) => Firmware_v5.06.2-fr.dwb.sqshfs.decrypted
Encrypted Tail File => Firmware_v5.06.2-fr.dwb.tail.encrypted
Decrypted Tail File => Firmware_v5.06.2-fr.dwb.tail.decrypted
Decrypted Tail Code File => Firmware_v5.06.2-fr.dwb.tail.code
Crypt Key File to Write => Firmware_v5.06.2-fr.dwb.cryptkey
CSUM file to Write => Firmware_v5.06.2-fr.dwb.csum
Crypt Key Length File => Firmware_v5.06.2-fr.dwb.cryptkey.length

Source File Size => 0x00519038 5345336 bytes
Script File Data Offset => 0x00000000 0
CRAMFS/SQSHFS Data Offset => 0x00001000 4096
Tail Data Starts at => 0x00518000 5341184
CryptKey Data Starts at => 0x00519000 5345280
CryptKey Length => 0x00000030 48 bytes
CryptKey => 940003020014D4E6DCF9BC130CCBC92FA3B3DDAB7EC0877D177400145411F57526DEA41EF7C3E234CBF11E30B55056A0
CSUM ?? => 1885DAAB
Writing Firmware_v5.06.2-fr.dwb.script.encrypted, Please wait.
Writing Firmware_v5.06.2-fr.dwb.script.decrypted, Please wait.
Writing Firmware_v5.06.2-fr.dwb.cramfs.encrypted, Please wait.
Writing Firmware_v5.06.2-fr.dwb.cramfs.decrypted, Please wait.
Writing Firmware_v5.06.2-fr.dwb.tail.encrypted, Please wait
Writing Firmware_v5.06.2-fr.dwb.tail.decrypted. Please wait.

A DWB file using SQSHFS can have 2 images, one for the root file system (usr_fs) and another (usr_2_fs) that is mounted on /usr within the root filesystem. Sample output from firmware v5.08.15-2-fr is,

./decrypt, Program to decode Inventel Livebox (DV-4210) Recovery DWB Files. (c) 2008 Andy Potter
File to Decode => Firmware_v5.08.15-2-fr.dwb
Encrypted Script File => Firmware_v5.08.15-2-fr.dwb.script.encrypted
Decrypted Script File => Firmware_v5.08.15-2-fr.dwb.script.decrypted
Decrypted ASCII Script => Firmware_v5.08.15-2-fr.dwb.script.ascii
Encrypted CRAMFS File(s) => Firmware_v5.08.15-2-fr.dwb.cramfs.encrypted
Decrypted CRAMFS File(s) => Firmware_v5.08.15-2-fr.dwb.cramfs.decrypted
Encrypted SQSHFS File(s) => Firmware_v5.08.15-2-fr.dwb.sqshfs.encrypted
Decrypted SQSHFS File(s) => Firmware_v5.08.15-2-fr.dwb.sqshfs.decrypted
Encrypted Tail File => Firmware_v5.08.15-2-fr.dwb.tail.encrypted
Decrypted Tail File => Firmware_v5.08.15-2-fr.dwb.tail.decrypted
Decrypted Tail Code File => Firmware_v5.08.15-2-fr.dwb.tail.code
Crypt Key File to Write => Firmware_v5.08.15-2-fr.dwb.cryptkey
CSUM file to Write => Firmware_v5.08.15-2-fr.dwb.csum
Crypt Key Length File => Firmware_v5.08.15-2-fr.dwb.cryptkey.length

Source File Size => 0x00621038 6426680 bytes
Script File Data Offset => 0x00000000 0
CRAMFS/SQSHFS Data Offset => 0x00001000 4096
Tail Data Starts at => 0x00620000 6422528
CryptKey Data Starts at => 0x00621000 6426624
CryptKey Length => 0x00000030 48 bytes
CryptKey => 940003020014A69FF660466867F2803FBC14FED12657F77BC3E40014CB249EA24B25A4453AA77295F41E4DA7D7845C83
CSUM ?? => 1885DAAB
Writing Firmware_v5.08.15-2-fr.dwb.script.encrypted, Please wait.
Writing Firmware_v5.08.15-2-fr.dwb.script.decrypted, Please wait.
Writing Firmware_v5.08.15-2-fr.dwb.cramfs.encrypted, Please wait.
Writing Firmware_v5.08.15-2-fr.dwb.cramfs.decrypted, Please wait.
Found sqshfs header, Closing Firmware_v5.08.15-2-fr.dwb.cramfs.decrypted
Writing Firmware_v5.08.15-2-fr.dwb.sqshfs.decrypted.001, Please wait.
Found sqshfs header, Closing Firmware_v5.08.15-2-fr.dwb.sqshfs.decrypted.001
Writing Firmware_v5.08.15-2-fr.dwb.sqshfs.decrypted.002, Please wait.
Writing Firmware_v5.08.15-2-fr.dwb.tail.encrypted, Please wait
Writing Firmware_v5.08.15-2-fr.dwb.tail.decrypted. Please wait.


AndyP