
Zitat von
scolopender
Jetzt geht die Phantasie durch - dabei wollen die Entwickler doch nur kundtun, dass sie sogar bis (modulo) 16 zählen können
Ja, da hast du Recht. Wenn man halt stundenlang nur noch Bytes sieht...
So, es gibt gute Nachrichten:
Mein Tool kann jetzt auch den Part 1 (Operating System) der FW entschlüsseln (sowohl beim W303 als auch beim W722).
Danke an scolopender für viele nützliche Hinweise. 
Man muss (nachdem man das FW-File an sich entschlüsselt und in seine 6 (oder 5 beim W303V) Teile aufgespalten hat ):
So muss man vorgehen:
* Die ersten 4 Bytes des 1. Teils wegwerfen (0x1324DEAD).
* 32 Bytes ab Offset 0x64 mit den ersten 32 Bytes des 1. Teils vertauschen und die Nibbles von jedem Byte vertauschen und die Bytes von jedem WORD vertauschen.
* Von dem hierbei Entstandenen noch mal die ersten 4 Bytes wegwerfen.
* Für die ersten 0x112C80 (1.125.504) Bytes: Alle Bytes mit 0xAA XOR'en und jedes WORD mit dem folgenden WORD vertauschen.
ABER: Wenn (CurrentByte - 16) % 32 == 0 -> Dann nur mit 0xAA XOR'en und nichts vertauschen
* Für die restlichen Bytes: Unverändert lassen.
Der Wert 0x112C80 scheint nicht im FW-File stehen, sondern wohl als Konstante irgendwo im Bootloader. Funktioniert jedenfalls für W722 und W303. 
Part 2 kann das Tool noch nicht entschlüsseln. Da arbeite ich noch dran.
Weiterhin wird bei lzma und komprimierten bin-Parts jetzt auch die Größe der dekomprimierten Datei (aus dem lzma-Header) ausgegeben.
Alle lzma und bin-Parts, die entschlüsselt werden konnten, werden - sofern lzma.exe im gleichen Verzeichnis vorhanden ist - auch gleich mit lzma.exe entpackt.
Entschlüsseln einer W303V Typ A Firmware:
Code:
E:\DSL_Debug\Arcadyan_FW>arcadyan_dec fw_speedportW303_TypA_v_1.09.000.bin
-------------------------------------------------------------------------------
Arcadyan firmware decrpytion utility v0.18 ** For personal use only **
® 2010 by Andi_84 ++ Special thanks to scolopender ++
** This tool comes with absolutely no warranty! **
-------------------------------------------------------------------------------
Opened firmware file fw_speedportW303_TypA_v_1.09.000.bin, size: 2129940 Bytes.
Reading firmware file ... Finished, 2129940 Bytes read.
Decrypting firmware file ... Finished, got 2129930 Bytes.
Writing decrypted firmware to output file fw_speedportW303_TypA_v_1.09.000_decrypted.bin ... Finished, 2129930 Bytes written.
Extracting parts ...
Part 1: 0x00000000 ... 0x0013AFFF
Size: 1290240 Bytes (0x0013B000)
Format: bin (compressed)
File size: 1290220 Bytes (0x0013AFEC) -> OK.
CRC: 9674892A -> OK.
Decrypting bin part ... Finished, got 1290212 Bytes.
Uncompressed size: 5906144 Bytes
Writing firmware part to output file fw_speedportW303_TypA_v_1.09.000-1.lzma ... Finished, 1290212 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_speedportW303_TypA_v_1.09.000-1.lzma fw_speedportW303_TypA_v_1.09.000-1.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 2: 0x0013B000 ... 0x0017D3FF
Size: 271360 Bytes (0x00042400)
Format: bin (compressed)
File size: 271340 Bytes (0x000423EC) -> OK.
CRC: FFB98A51 -> OK.
Writing firmware part to output file fw_speedportW303_TypA_v_1.09.000-2.lzma ... Finished, 271340 Bytes written.
Part 3: 0x0017D400 ... 0x001A1FFF
Size: 150528 Bytes (0x00024C00)
Format: lzma
File size: 150508 Bytes (0x00024BEC) -> OK.
CRC: D71DA665 -> OK.
Uncompressed size: 303432 Bytes
Writing firmware part to output file fw_speedportW303_TypA_v_1.09.000-3.lzma ... Finished, 150508 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_speedportW303_TypA_v_1.09.000-3.lzma fw_speedportW303_TypA_v_1.09.000-3.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 4: 0x001A2000 ... 0x00207FFF
Size: 417792 Bytes (0x00066000)
Format: lzma
File size: 417772 Bytes (0x00065FEC) -> OK.
CRC: 9EA58D71 -> OK.
Uncompressed size: 642816 Bytes
Writing firmware part to output file fw_speedportW303_TypA_v_1.09.000-4.lzma ... Finished, 417772 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_speedportW303_TypA_v_1.09.000-4.lzma fw_speedportW303_TypA_v_1.09.000-4.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 5: 0x00208000 ... 0x00208009
Size: 10 Bytes (0x0000000A)
Format: bin
Writing firmware part to output file fw_speedportW303_TypA_v_1.09.000-5.bin ... Finished, 10 Bytes written.
Finished extracting, found 5 parts
Entschlüsseln einer W722V Typ B Firmware:
Code:
E:\DSL_Debug\Arcadyan_FW>arcadyan_dec fw_Speedport_W722V_TypB_v.1.10.000.bin
-------------------------------------------------------------------------------
Arcadyan firmware decrpytion utility v0.18 ** For personal use only **
® 2010 by Andi_84 ++ Special thanks to scolopender ++
** This tool comes with absolutely no warranty! **
-------------------------------------------------------------------------------
Opened firmware file fw_Speedport_W722V_TypB_v.1.10.000.bin, size: 2983956 Bytes.
Reading firmware file ... Finished, 2983956 Bytes read.
Decrypting firmware file ... Finished, got 2983946 Bytes.
Writing decrypted firmware to output file fw_Speedport_W722V_TypB_v.1.10.000_decrypted.bin ... Finished, 2983946 Bytes written.
Extracting parts ...
Part 1: 0x00000000 ... 0x001D3FFF
Size: 1916928 Bytes (0x001D4000)
Format: bin (compressed)
File size: 1915884 Bytes (0x001D3BEC) -> OK.
CRC: 23C10E04 -> OK.
Type: 00000000 -> Operating system
Decrypting bin part ... Finished, got 1915876 Bytes.
Uncompressed size: 8694156 Bytes
Writing firmware part to output file fw_Speedport_W722V_TypB_v.1.10.000-1.lzma ... Finished, 1915876 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_Speedport_W722V_TypB_v.1.10.000-1.lzma fw_Speedport_W722V_TypB_v.1.10.000-1.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 2: 0x001D4000 ... 0x0021C7FF
Size: 296960 Bytes (0x00048800)
Format: bin (compressed)
File size: 295916 Bytes (0x000483EC) -> OK.
CRC: 7C17CBB1 -> OK.
Type: 0000000A -> Pseudo-Filesystem for Web interface
Writing firmware part to output file fw_Speedport_W722V_TypB_v.1.10.000-2.lzma ... Finished, 295916 Bytes written.
Part 3: 0x0021C800 ... 0x00246FFF
Size: 174080 Bytes (0x0002A800)
Format: lzma
File size: 173740 Bytes (0x0002A6AC) -> OK.
CRC: 87E1CE8C -> OK.
Type: 00000046 -> VDSL firmware
Uncompressed size: 648540 Bytes
Writing firmware part to output file fw_Speedport_W722V_TypB_v.1.10.000-3.lzma ... Finished, 173740 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_Speedport_W722V_TypB_v.1.10.000-3.lzma fw_Speedport_W722V_TypB_v.1.10.000-3.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 4: 0x00247000 ... 0x002723FF
Size: 177152 Bytes (0x0002B400)
Format: lzma
File size: 176364 Bytes (0x0002B0EC) -> OK.
CRC: A8302975 -> OK.
Type: 0000003C -> ADSL Annex B firmware
Uncompressed size: 542476 Bytes
Writing firmware part to output file fw_Speedport_W722V_TypB_v.1.10.000-4.lzma ... Finished, 176364 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_Speedport_W722V_TypB_v.1.10.000-4.lzma fw_Speedport_W722V_TypB_v.1.10.000-4.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 5: 0x00272400 ... 0x002D87FF
Size: 418816 Bytes (0x00066400)
Format: lzma
File size: 417772 Bytes (0x00065FEC) -> OK.
CRC: 9EA58D71 -> OK.
Type: 0000005A -> Probably ISDN firmware
Uncompressed size: 642816 Bytes
Writing firmware part to output file fw_Speedport_W722V_TypB_v.1.10.000-5.lzma ... Finished, 417772 Bytes written.
Uncompressing file using lzma.exe ...
lzma.exe d fw_Speedport_W722V_TypB_v.1.10.000-5.lzma fw_Speedport_W722V_TypB_v.1.10.000-5.bin
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
Finished.
Part 6: 0x002D8800 ... 0x002D8809
Size: 10 Bytes (0x0000000A)
Format: bin
Writing firmware part to output file fw_Speedport_W722V_TypB_v.1.10.000-6.bin ... Finished, 10 Bytes written.
Finished extracting, found 6 parts
Anhang: arcadyan_dec.zip (7.225 Bytes)
-> Enthält arcadyan_dec.exe (15.872 Bytes)
Nicht vergessen: Das Tool benötigt die Visual C++ 2010 Redistributables, Download-Links dazu habe ich hier gepostet.
EDIT:
Neue Version, Download hier.
/EDIT
VG,
Andi