mildsunrise / firmware-mod-kit

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

Does FMK work on dd-wrt firmware for buffalo wzr-600dhp #146

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./extract-firmware.sh wzr-600dhp-dd-wrt-webupgrade-MULTI.bin ../firmware
2. ./build-firmware.sh ../firmware/ -mini
3.

What is the expected output? What do you see instead?
The md5sum is not the same

What version of the product are you using? On what operating system?
0.99 on Linux Mint 17

Please provide any additional information below.

I have a buffalo wzr-600dhp router with dd-wrt installed from dd-wrt downloads. 
I am trying to modify the firmware to update the SSL certificates. 

I am running Linux Mint 17 and was able to extract the firmware correctly after 
installing all the pre-requisites. The extraction work correctly and I see all 
the firmware files. Being careful I decided to rebuild the same firmware to see 
if I get same firmware back to make sure that I don't brick my router. I tried 
./build-firmware.sh [-nopad] [-min] with different option and every time I get 
a md5sum that don't match the original firmware. Is this expected or I can't 
use FMK for this firmware.

I have not tried the resultant firmware 

These are the binwalk.log for each trying to extract the firmware generated by 
build-firmware.

I checked and noticed some mention of extract-ng that might be a fix for the 
buffalo routers but I don't see that file.

Thanks 

This is the binwalk.log for the original firmware 
Quote
Scan Time:     2015-07-11 18:10:08
Signatures:    193
Target File:   ~/firmware_mod_kit/wzr-600dhp-dd-wrt-webupgrade-MULTI.bin
MD5 Checksum:  3afa7532dc6b19ddc4be760d7bf9f67b

DECIMAL      HEX          DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
0            0x0          TRX firmware header, little endian, header size: 28 
bytes,  image size: 27070492 bytes, CRC32: 0xA74E35CE flags/version: 0x10001
28           0x1C         uImage header, header size: 64 bytes, header CRC: 
0x1E59F470, created: Wed May  6 17:53:19 2015, image size: 1096812 bytes, Data 
Address: 0x80060000, Entry Point: 0x800646D0, data CRC: 0xB942843E, OS: Linux, 
CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: 
"MIPS Linux Kernel Image"
92           0x5C         LZMA compressed data, properties: 0x6D, dictionary 
size: 33554432 bytes, uncompressed size: 3111316 bytes
1097756      0x10C01C     Squashfs filesystem, big endian, DD-WRT signature, 
version 3.0, size: 25970749 bytes,  2429 inodes, blocksize: 131072 bytes, 
created: Wed May  6 17:54:50 2015 

This is the binwalk.log for the ./build-firmware.sh ../firmware/ -mini
Quote
Scan Time:     2015-07-12 09:42:20
Signatures:    193
Target File:  ~/firmware_mod_kit/firmware/new-firmware-mini.bin
MD5 Checksum:  32b20d3a5b6a14113fbd118a5e72a6c4

DECIMAL      HEX          DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
0            0x0          TRX firmware header, little endian, header size: 28 
bytes,  image size: 27070492 bytes, CRC32: 0x4418D8E0 flags/version: 0x10001
28           0x1C         uImage header, header size: 64 bytes, header CRC: 
0x1E59F470, created: Wed May  6 17:53:19 2015, image size: 1096812 bytes, Data 
Address: 0x80060000, Entry Point: 0x800646D0, data CRC: 0xB942843E, OS: Linux, 
CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: 
"MIPS Linux Kernel Image"
92           0x5C         LZMA compressed data, properties: 0x6D, dictionary 
size: 33554432 bytes, uncompressed size: 3111316 bytes
1097756      0x10C01C     Squashfs filesystem, big endian, DD-WRT signature, 
version 3.0, size: 25958241 bytes,  2429 inodes, blocksize: 131072 bytes, 
created: Sun Jul 12 09:18:25 2015 

This is the binwalk.log for the ./build-firmware.sh ../firmware/ -nopad
Quote
Scan Time:     2015-07-12 09:49:13
Signatures:    193
Target File:   /home/johnny/firmware_mod_kit/new-firmware-nopad.bin
MD5 Checksum:  4ebcac0815b7fd62d5e5c0ef82d4071c

DECIMAL      HEX          DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
0            0x0          TRX firmware header, little endian, header size: 28 
bytes,  image size: 27070492 bytes, CRC32: 0x0 flags/version: 0x10001
28           0x1C         uImage header, header size: 64 bytes, header CRC: 
0x1E59F470, created: Wed May  6 17:53:19 2015, image size: 1096812 bytes, Data 
Address: 0x80060000, Entry Point: 0x800646D0, data CRC: 0xB942843E, OS: Linux, 
CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: 
"MIPS Linux Kernel Image"
92           0x5C         LZMA compressed data, properties: 0x6D, dictionary 
size: 33554432 bytes, uncompressed size: 3111316 bytes
1097756      0x10C01C     Squashfs filesystem, big endian, DD-WRT signature, 
version 3.0, size: 25958241 bytes,  2429 inodes, blocksize: 131072 bytes, 
created: Sun Jul 12 09:48:15 2015

This is the binwalk.log for the ./build-firmware.sh ../firmware/
Quote
Scan Time:     2015-07-12 09:53:35
Signatures:    193
Target File:   /home/johnny/firmware_mod_kit/new-firmware.bin
MD5 Checksum:  53a4a5083ceab5a273330af9e13aeed5

DECIMAL      HEX          DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
0            0x0          TRX firmware header, little endian, header size: 28 
bytes,  image size: 27070492 bytes, CRC32: 0x161D829F flags/version: 0x10001
28           0x1C         uImage header, header size: 64 bytes, header CRC: 
0x1E59F470, created: Wed May  6 17:53:19 2015, image size: 1096812 bytes, Data 
Address: 0x80060000, Entry Point: 0x800646D0, data CRC: 0xB942843E, OS: Linux, 
CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: 
"MIPS Linux Kernel Image"
92           0x5C         LZMA compressed data, properties: 0x6D, dictionary 
size: 33554432 bytes, uncompressed size: 3111316 bytes
1097756      0x10C01C     Squashfs filesystem, big endian, DD-WRT signature, 
version 3.0, size: 25958241 bytes,  2429 inodes, blocksize: 131072 bytes, 
created: Sun Jul 12 09:51:59 2015 

Original issue reported on code.google.com by johnny.i...@gmail.com on 15 Jul 2015 at 5:41