dlink-decrypt
dlink-decrypt copied to clipboard
decrypt not working for dir-1950
hi, thank you for the de-crypting tool, it made me hopeful that I can straighten my mistake and unbrick my router, however it fails, maybe they've changed the key.
python3 ./dlink-dec.py -i ./DIR-1950A1_FW1.00B17.bin -o ./decrypt2.bin [] Calculating key... [+] OK! [] Checking magic bytes... [!] Failed! [!] Failed!
not allowed to upload the file, ping me if you want to look into this
Based on a quick look on the recent firmware version 1.07 from their website its a different encryption scheme alltogether so my script won't work. As I don't own this device statically reversing this scheme solely based on the encrypted firmware download will be difficult.
@0xricksanchez This doesn't work with my X1860. If I hook it up with a Serial, is there anything I can extract that could be helpful to decode the new encryption?
@Vortelf Based on this firmware below, I can already see it's a different encryption scheme on this device as well. If you're able to hook up a serial connection and get access to a shell on the device, finding out how firmware updates are handled should be pretty straightforward forward
❯ binwalk DIRX1860A1_FW103B07.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
6858708 0x68A7D4 PGP RSA encrypted session key - keyid: AB9F11F0 FBD6A71E RSA (Encrypt or Sign) 1024b
❯ binwalk -E DIRX1860A1_FW103B07.bin
WARNING: Failed to import matplotlib module, visual entropy graphing will be disabled
DECIMAL HEXADECIMAL ENTROPY
--------------------------------------------------------------------------------
0 0x0 Rising entropy edge (0.997019)
I assume there will be some kind of config/script file somewhere. Grepping around the file system for known options like "FWUpd" or "Decrypt" and similar would help a lot... Based on what binwalk spits out already, it could be a call to gpg doing the work here.
DIRX1860A1_FW103B07.bin So the same with me. binwalk nothing, uart shell can not work with login promotion.
This could be helpful: https://openwrt.org/inbox/toh/d-link/dap-x1860#factory_image_encryptiondecryption
https://openwrt.org/inbox/toh/d-link/dap-x1860#factory_image_encryptiondecryption
ok, I will have a try.