I'm still interested in flashing some other firmware though. I used binwalk from the firmware-mod-kit to identify the header as the first 192 bytes. It starts with a plain text description of the firmware padded out to 128 bytes, followed by 32 bytes of something, followed by another plain text version number padded out to 32 bytes.
WNDR3800-V1.0.0.40 header:
64 65 76 69 63 65 3A 57 4E 44 52 33 38 30 30 0A 76 65 72 73 69 6F 6E 3A 56 31 2E 30
2E 30 2E 34 30 0A 72 65 67 69 6F 6E 3A 0A 68 64 5F 69 64 3A 32 39 37 36 33 36 35 34
2B 31 36 2B 31 32 38 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 37 30 31 9D E6 3C DA 4F EA C1 75
00 AA 00 00 BF 07 00 00 BF 07 00 00 D1 ED 08 13 05 05 07 00 57 4E 44 52 33 38 30 30
2D 56 31 2E 30 2E 30 2E 34 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00
device:WNDR3800
version:V1.0.0.40
region:
hd_id:29763654+16+128
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00\00\00\00\33\37\30\31\9D\E6\3C\DA\4F\EA\C1\75\00\AA\00\00\BF\07\00\00
\BF\07\00\00\D1\ED\08\13\05\05\07\00WNDR3800-V1.0.0.40\00\00\00\00\00\00\00\00\00\00
\00\00\00\00
WNDR3800SW-V1.0.0.99SW header:
64 65 76 69 63 65 3A 57 4E 44 52 33 38 30 30 53 57 0A 76 65 72 73 69 6F 6E 3A 56 31
2E 30 2E 30 2E 39 39 53 57 0A 72 65 67 69 6F 6E 3A 0A 68 64 5F 69 64 3A 32 39 37 36
33 36 35 34 2B 31 36 2B 31 32 38 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 37 30 31 CE 01 6F CA 4F A2 34 0D
00 98 00 00 BF 07 00 00 BF 07 00 00 55 39 C7 EB 05 05 07 00 57 4E 44 52 33 38 30 30
53 57 2D 56 31 2E 30 2E 30 2E 39 39 53 57 00 00 00 00 00 00 00 00 00 00
device:WNDR3800SW
version:V1.0.0.99SW
region:
hd_id:29763654+16+128
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\33\37\30\31\CE\01\6F\CA\4F\A2\34\0D\00\98\00\00\BF\07\00\00\BF\07\00\00
\55\39\C7\EB\05\05\07\00WNDR3800SW-V1.0.0.99SW\00\00\00\00\00\00\00\00\00\00
Breaking down the WNDR3800-V1.0.0.40 header further:
33 37 30 31 Same in every firmware
9D E6 3C DA Vary between firmwares
4F EA C1 75 The last three bytes vary between firmwares; the 4F doesn't change
00 AA 00 00 This is the size of the rootfs: 11,141,120 bytes
BF 07 00 00 Same in every firmware
BF 07 00 00 Same in every firmware
D1 ED 08 13 Vary between firmware
05 05 07 00 Same in every firmware
I've tried CRCing different chunks of the image, but nothing matches. There's also a single byte right at the end of the image, after the padding, that varies. Maybe it's some kind of 8-bit checksum (?). Does anyone else know anything about the Netgear firmware format? When I login with telnet it says OpenWRT in ASCII art, so it must be fairly similar.