AlessandroZ / LaZagne

Credentials recovery project
GNU Lesser General Public License v3.0
9.52k stars 2.04k forks source link

lazagne.py 2.4.4 Firefox #497

Closed Papotito123 closed 4 years ago

Papotito123 commented 4 years ago

Hello: Testing 2.4.4 git I got error in Firefox:

[!] Traceback (most recent call last): File "C:\lazaa\Windows\lazagne\softwares\browsers\mozilla.py", line 453, in is_master_password_correct cleartext_data = self.decrypt_3des(decoded_item2, master_password, global_salt) File "C:\lazaa\Windows\lazagne\softwares\browsers\mozilla.py", line 303, in decrypt_3des hp = sha1(global_salt + convert_to_byte(master_password)).digest() File "C:\lazaa\Windows\lazagne\config\winstructure.py", line 715, in convert_to_byte return string.encode() # Python 3 AttributeError: 'bytes' object has no attribute 'encode'

Thanks

AlessandroZ commented 4 years ago

Hi @Papotito123,

I didn't test older version because it should have not changed. But I just remembered that the master_password is managed as byte now. Could you please, try it, removing the convert_to_byte function: https://github.com/AlessandroZ/LaZagne/blob/master/Windows/lazagne/softwares/browsers/mozilla.py#L303

This line: hp = sha1(global_salt + convert_to_byte(master_password)).digest()

To: hp = sha1(global_salt + master_password).digest()

Hope it will fix the issue.

Papotito123 commented 4 years ago

Hello: I did with hp = sha1(global_salt + master_password).digest() ,and works:

------------------- Firefox passwords -----------------

[!] Profile path found: C:\Users\TESTACCOUNT\AppData\Roaming\Mozilla\Firefox\Profiles\ylho7ovy.default [!] Database empty [!] Profile path found: C:\Users\TESTACCOUNT\AppData\Roaming\Mozilla\Firefox\Profiles\azatv8ct.default-release [!] key: b'------------------------------------------------------\x08' [+] Password found !!! URL: https://login.live.com Login: email@hotmail.com Password:mypassord

Thanks.

AlessandroZ commented 4 years ago

Thanks for your help @Papotito123