Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decrypt not working for dir-1950 #2

Open
dm-holm opened this issue Oct 30, 2021 · 6 comments
Open

decrypt not working for dir-1950 #2

dm-holm opened this issue Oct 30, 2021 · 6 comments

Comments

@dm-holm
Copy link

dm-holm commented Oct 30, 2021

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

@0xricksanchez
Copy link
Owner

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.

@Vortelf
Copy link

Vortelf commented Nov 12, 2021

@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?

@0xricksanchez
Copy link
Owner

@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.

@zhjygit
Copy link

zhjygit commented Nov 20, 2022

DIRX1860A1_FW103B07.bin
So the same with me.
binwalk nothing, uart shell can not work with login promotion.

@Djfe
Copy link

Djfe commented Jun 28, 2023

@zhjygit
Copy link

zhjygit commented Jun 29, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants