lclevy / firepwd Goto Github PK
View Code? Open in Web Editor NEWfirepwd.py, an open source tool to decrypt Mozilla protected passwords
License: GNU General Public License v2.0
firepwd.py, an open source tool to decrypt Mozilla protected passwords
License: GNU General Public License v2.0
Hi,
I receive this error if use following command with firefox password store files in mozill_db/ folder.
C:\Users\Ashwini\Downloads\firepwd-master>python firepwd.py -p 'MISC*' -d mozilla_db/
SEQUENCE {
SEQUENCE {
OBJECTIDENTIFIER 1.2.840.113549.1.12.5.1.3
SEQUENCE {
OCTETSTRING 1df64af83c0f3b9f518236de7486cea09f0bee1c
INTEGER 01
}
}
OCTETSTRING abab8fbfac3205b93f1a7e306e414aa7
}
password check? False
Traceback (most recent call last):
File "firepwd.py", line 297, in
key = getKey()
File "firepwd.py", line 289, in getKey
return key[:24]
UnboundLocalError: local variable 'key' referenced before assignment
Why do I get this error?
Please add
#!/usr/bin/python2
as the first line.
Hello:
With respect and with my little knowledge,I think the problem when using a profile full path, is here:
def getLoginData(self, profile):
logins = []
sqlite_file = options.directory+'signons.sqlite' #firefox < 32
if path.exists(sqlite_file):
conn = sqlite3.connect(sqlite_file)
c = conn.cursor()
c.execute('SELECT * FROM moz_logins;')
signons.sqlite file exists in FF 75 , so at first will seek this file and will run this module that should be for FF 32 or less not giving opportunity to seek and find for logins.json.
When copying json.logins and key4.db to another place, of course , will not have to decide because there's no signons.sqlite file.
So ,script can continue to run the module;
else: #since Firefox 32, json is used instead of sqlite3
, that is pertinent to FF75.
** I changed signons.sqlite to signons.sqlite.bak, and firepwd.exe runs well. **
I'm not,coder/dev/IT.
That's my honest appreciation.
Thanks.
Trying to decrypt my firefox-66.0 passwords, and it fails with this exception:
$ python firepwd.py -d /home/netllama/.mozilla/firefox/3ceo1ujt.default/
SEQUENCE {
SEQUENCE {
OBJECTIDENTIFIER 1.2.840.113549.1.12.5.1.3
SEQUENCE {
OCTETSTRING 431d93f0b321bc4b959671313316e1f3
INTEGER 01
}
}
OCTETSTRING 84f75cb183843b68f47312bf40574ee1
}
password check? True
SEQUENCE {
SEQUENCE {
OBJECTIDENTIFIER 1.2.840.113549.1.12.5.1.3
SEQUENCE {
OCTETSTRING ea7369ad0ec0f6d217984c8eb5944138c0258597
INTEGER 01
}
}
OCTETSTRING e29ec8b9a5ec21d2e1bd7e53caa179b10e6d693c02853ec75388177a73ef4d7b
}
3deskey 1c265ef2ae23df4cc7fde5dc9e3bbad0024c1a8c1613e3e50808080808080808
Traceback (most recent call last):
File "firepwd.py", line 300, in <module>
logins = getLoginData()
File "firepwd.py", line 180, in getLoginData
logins.append( (decodeLoginData(encUsername), decodeLoginData(encPassword), row[1]) )
File "firepwd.py", line 154, in decodeLoginData
asn1data = decoder.decode(b64decode(data)) #first base64 decoding, then ASN1DERdecode
File "/usr/lib/python2.7/site-packages/pyasn1/codec/ber/decoder.py", line 1049, in __call__
raise error.SubstrateUnderrunError('%d-octet short' % (length - len(substrate)))
pyasn1.error.SubstrateUnderrunError: 94-octet short
Hi @lclevy,
Hope you're doing well.
They point me out that firefox implementation has change its way to store passwords:
If you have some time to take a look on it, it will be great (no rush). Thanks again for all your help.
Have a nice day.
The pip command should be the at the top of the read me. This will not access logins.json and only clamors for the key*.db files.
I'm not sure I've gotten this to work since it became part of lazagnia. I've never gotten lazagnia to work.
I think I keep coming back because it worked well that one time and has a cool name.
Hello I forgot my master pasword and Im trying to find my master password from my profile folder.
Im trying this code: python firepwd.py -p 'MISC*' -d [MY_PROFILE_PATH]
on windows 10.
I have key4.db and logins.json
This gives me this result:
clearText b'---SOMETHING HERE ---'
password check? False
Why I getting this result how can I handle the my master password with your code.
Traceback (most recent call last):
File "firepwd.py", line 299, in
key = getKey()
File "firepwd.py", line 291, in getKey
return key[:24]
UnboundLocalError: local variable 'key' referenced before assignment
I have an error with key3/signon files in the current folder:
$ python firepwd.py
Traceback (most recent call last):
File "/home/js/projects/firepwd/firepwd.py", line 421, in <module>
key, algo = getKey( options.masterPassword.encode(), options.directory )
File "/home/js/projects/firepwd/firepwd.py", line 406, in getKey
keyData = readBsddb(directory+'key3.db')
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
Python is 3.9.1
it goes away if I write "keyData = readBsddb('key3.db')"
While I'm happy that it kind of works, I would like to remove the extraneous garbage output e.g:
https://accounts.google.com: '[email protected]\x02\x02' , 'mysecretphrase\x07\x07\x07\x07\x07\x07\x07'
How can I remove this
\x02\x02
\x07\x07\x07\x07\x07\x07\x07
Thankyou for the software.
Regards
When I run python firepwd.py
Returns
**File "firepwd.py", line 64
print (' '*rl, asn1Types[ type ],end=' ')
^
SyntaxError: invalid syntax**
Any idea?
Hi,
Since my last Firefox update, it fails to decrypt Firefox passwords (version 58.0.2 (64-bit))
Here is the error:
test:/tmp/firepwd$ python firepwd.py -d /home/test/.mozilla/firefox/qutmp8yy.default/
decrypting login/password pairs
https://wordpress.com:
Traceback (most recent call last):
File "firepwd.py", line 252, in <module>
print repr( DES3.new( key, DES3.MODE_CBC, iv).decrypt(ciphertext) ), ',',
File "/home/test/.local/lib/python2.7/site-packages/Crypto/Cipher/DES3.py", line 174, in new
return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
File "/home/test/.local/lib/python2.7/site-packages/Crypto/Cipher/__init__.py", line 55, in _create_cipher
return modes[mode](factory, **kwargs)
File "/home/test/.local/lib/python2.7/site-packages/Crypto/Cipher/_mode_cbc.py", line 232, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "/home/test/.local/lib/python2.7/site-packages/Crypto/Cipher/DES3.py", line 99, in _create_base_cipher
key = adjust_key_parity(key_in)
File "/home/test/.local/lib/python2.7/site-packages/Crypto/Cipher/DES3.py", line 79, in adjust_key_parity
if len(key_in) not in key_size:
TypeError: object of type 'NoneType' has no len()
I think the pattern has changed because it fails here.
If you could take a look it could be great. Thanks a lot.
Hello;
Win 10 1809 x64.
Pyhton 3.7.16 x64.
Firefox 75 updated with 1 old saved password.
After some trial and error I got error but more pertinent than the fist ones I encountered.
There's no key3.db file in none of both Firefox profiles folders:
azatv8ct.default-release <== these has up-to-date- files
ylho7ovy.default <== here key4.db and signons.sqlite are zero kb
So I have to use this format to get it run"
C:\firepwd-master>python ".\firepwd.py" -d "C:\Users\TESTACCOUNT\AppData\Roaming\Mozilla\Firefox\Profiles\azatv8ct.default-release\"
globalSalt: b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
SEQUENCE {
SEQUENCE {
OBJECTIDENTIFIER 1.2.840.113549.1.12.5.1.3 pbeWithSha1AndTripleDES-CBC
SEQUENCE {
OCTETSTRING b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
INTEGER b'01'
}
}
OCTETSTRING b'axxxxxxxxxxxxxxxxxxxxxxxx'
}
entrySalt: b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
password check? True
SEQUENCE {
SEQUENCE {
OBJECTIDENTIFIER 1.2.840.113549.1.12.5.1.3 pbeWithSha1AndTripleDES-CBC
SEQUENCE {
OCTETSTRING b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
INTEGER b'01'
}
}
OCTETSTRING b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}
entrySalt: b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
File ".\firepwd.py", line 403, in
logins = getLoginData()
File ".\firepwd.py", line 195, in getLoginData
c.execute("SELECT * FROM moz_logins;")
sqlite3.OperationalError: no such table: moz_logins
Gives error for : pyasn>=0.4.8
I changed to : pyasn1>=0.4.8 , and run requirements.txt well.
Any info much appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.