banksy-git / lidl-gateway-freedom

Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud.
https://paulbanks.org/projects/lidl-zigbee/
GNU General Public License v3.0
211 stars 66 forks source link

Issue decoding password via script #21

Open myhobby2 opened 2 years ago

myhobby2 commented 2 years ago

Thanks for your time and effort in this project! I've 2 MOES branded Zigbee bridges that are internally the same as you use.

Let's start that I was able to obtain the root password from bridge nummer 1 (in another post I will come back to that one). Following thw same procedure I'm able to get both KEK/AUSKEY, but when re-using the script to decrypt the root password, I run into a problem:

root# python3 lidl_auskey_decode.py Enter KEK hex string line>5A5AA5A5 401A4000 8F7B238C 001AD582 Encoded aus-key as hex string line 1>13F436F6 E44A50B4 5AF2F409 7AE9D394 Encoded aus-key as hex string line 2>8E335DD1 C67C31D9 63B3EBD5 2C7C790A Traceback (most recent call last): File "lidl_auskey_decode.py", line 64, in print("Auskey:", auskey.decode("ascii")) UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 2: ordinal not in range(128)

Any ideas ?

Ninic0c0 commented 2 years ago

@myhobby2

You have copy all the line (with 80000000: and spaces) as follow:

python3 lidl_auskey_decode.py Enter KEK hex string line>80000000: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Encoded aus-key as hex string line 1>80000000: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Encoded aus-key as hex string line 2>80000010: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Auskey: Root password:

myhobby2 commented 2 years ago

Thanks for your support. Just succeeded in retrieving the password after some attempts. I had to take out all spaces from the aus-key, although the other box password was done simply by copy/paste (including the spaces)... BTW: I never included the 80000000: or 80000010: part of the lines.

I'm at least happy that I was able to login and change the passw. Thanks for your efforts in this matter BTW

fjritaine commented 2 years ago

Hi, I'm encountering the exact same issue : Traceback (most recent call last): File "/Users/fritaine/PERSO/lidl_auskey_decode.py", line 64, in print("Auskey:", auskey.decode("ascii")) UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 1: ordinal not in range(128)

I've noticed that my KEK and the first line of my aus-key are indentical, is this normal ? or maybe they did a few software changes since this decoding script has been released ?

Would be glad to contribute and help. Thanks :)

fjritaine commented 2 years ago

Hey, I solved my problem and want to share :

Hope that helps!

muekno commented 8 months ago

Same problem, new gateway never announced in the cloud. Did copy all with 80000: ..... including spaces same as at fjritaine I've noticed that my KEK and the first line of my aus-key are indentical, is this normal tried x times I am in IT since 40+ years, have good knowledge in Linux, do not think I make it wrong but will try an other terminal too

muekno commented 8 months ago

Success tried another terminal everything is fine no duplicate lines