Busindre / dumpzilla

Extract all forensic interesting information of Firefox, Iceweasel and Seamonkey browsers
http://www.dumpzilla.org
130 stars 25 forks source link

sqlite3.OperationalError #4

Closed Trippy-Tux closed 3 years ago

Trippy-Tux commented 6 years ago

Hi! First time using dumpzilla/reporting issue, so it may be on my side, but I can't find anything anywhere about my issue.

Issuing a --All options give this message:


 python3.6 /usr/bin/dumpzilla . --All

Execution time: 2018-03-01 19:01:03.980589
Mozilla Profile: .

====================================================================================================
Cookies              [SHA256 hash: *HASH*]
====================================================================================================

Traceback (most recent call last):
  File "/usr/bin/dumpzilla", line 1145, in <module>
    All_execute(varDir)
  File "/usr/bin/dumpzilla", line 204, in All_execute
    show_cookies_firefox(varDir,varDom = 0)
  File "/usr/bin/dumpzilla", line 238, in show_cookies_firefox
    cursor.execute("select baseDomain, name, value, host, path, datetime(expiry, 'unixepoch', 'localtime'), datetime(lastAccessed/1000000,'unixepoch','localtime') as last ,datetime(creationTime/1000000,'unixepoch','localtime') as creat, isSecure, isHttpOnly FROM moz_cookies where baseDomain like ? escape '\\' and name like ? escape '\\' and host like ? escape '\\' and last like ? and creat like ? and isSecure like ? and isHttpOnly like ? and last between ? and ? and creat between ? and ?",[varDomain,varName,varHost,('%'+varLastacess+'%'),('%'+varCreate+'%'),varSecure,varHttp, varRangeLast1, varRangeLast2, varRangeCreate1,varRangeCreate2])
sqlite3.OperationalError: no such column: baseDomain

--Cookies gives back:

Traceback (most recent call last):
  File "/usr/bin/dumpzilla", line 1147, in <module>
    show_cookies_firefox(varDir,varDom,varDomain,varName,varHost,varLastacess,varCreate,varSecure,varHttp,varRangeLast1,varRangeLast2,varRangeCreate1,varRangeCreate2)
  File "/usr/bin/dumpzilla", line 238, in show_cookies_firefox
    cursor.execute("select baseDomain, name, value, host, path, datetime(expiry, 'unixepoch', 'localtime'), datetime(lastAccessed/1000000,'unixepoch','localtime') as last ,datetime(creationTime/1000000,'unixepoch','localtime') as creat, isSecure, isHttpOnly FROM moz_cookies where baseDomain like ? escape '\\' and name like ? escape '\\' and host like ? escape '\\' and last like ? and creat like ? and isSecure like ? and isHttpOnly like ? and last between ? and ? and creat between ? and ?",[varDomain,varName,varHost,('%'+varLastacess+'%'),('%'+varCreate+'%'),varSecure,varHttp, varRangeLast1, varRangeLast2, varRangeCreate1,varRangeCreate2])
sqlite3.OperationalError: no such column: baseDomain

--Permissions:

Traceback (most recent call last):
  File "/usr/bin/dumpzilla", line 1149, in <module>
    show_permissions_firefox(varDir,varHostPreferences)
  File "/usr/bin/dumpzilla", line 305, in show_permissions_firefox
    cursor.execute("select host,type,permission,expireType,datetime(expireTime/1000,'unixepoch','localtime') from moz_hosts where host like ? escape '\\'",[varHostPreferences])
sqlite3.OperationalError: no such column: expireType

...etc.

The only options that work without errors are addons, bookmarks, downloads, cacheoffline, forms, history, certoverride, thumbnails and sessions. I'm using Kali 4.14.0, dumpzilla 15/03/2013, python 3.6 (that I specified the path in dumpzilla's file). I'm scanning an old firefox profile (2010), so that might be the problem, but maybe there is a way around (like renaming/repathing some files?)

Here is the list of files I'm trying to audit:

4.0K Jun 30 2010 adblockplus/
3.5K Jun 29 2010 blocklist.xml
4.0K Jun 30 2010 bookmarkbackups/
6.2K Aug 24 2009 bookmarks.html
192K Jun 30 2010 cert8.db
780  Jan 18 2010 cert_override.txt
4.0K Dec 2  2009 chatzilla/
4.0K Oct 22 2009 chrome/
199  Apr 5  2010 compatibility.ini
165K Jun 23 2010 compreg.dat
7.0K Jun 14 2010 content-prefs.sqlite
5.0K Jun 30 2010 cookies.sqlite
152  Nov 26 2009 dh-conv-rules.rdf
520  Jun 30 2010 dh-media-lists.rdf
60K  Jun 30 2010 dh-smart-names.rdf
2.0K Jun 29 2010 downloads.sqlite
3.0K Jun 17 2010 dta_queue.sqlite
4.0K Jun 29 2010 extensions/
1.3K Jun 23 2010 extensions.cache
1.5K Jun 23 2010 extensions.ini
12K  Jun 18 2010 extensions.log
30K  Jun 29 2010 extensions.rdf
4.0K Nov 26 2009 firebug/
77K  Jun 30 2010 formhistory.sqlite
4.0K Jun 23 2010 iMacros/
16K  Jun 30 2010 key3.db
24K  Jun 30 2010 localstore.rdf
11K  May 3  2010 mimeTypes.rdf
4.0K Jan 15 2010 minidumps/
2.0K Jun 29 2010 permissions.sqlite
248K Jun 30 2010 places.sqlite
0    Jun 30 2010 places.sqlite-journal
8.8K Jun 29 2010 pluginreg.dat
15K  Jun 30 2010 prefs.js
15K  Jun 2  2010 search.json
4.0K Jan 8  2010 searchplugins/
2.0K Jun 24 2010 search.sqlite
16K  Oct 22 2009 secmod.db
1.2K Jun 30 2010 session.rdf
31K  Jun 12 2010 signons.sqlite
154  Jun 29 2010 urlclassifierkey3.txt
3.0K May 3  2010 webappsstore.sqlite
103K Jun 23 2010 xpti.dat

Thank you in advance! :) TT

onehdev commented 6 years ago

Hi, A new version was merged 12 days ago. Please, try to run this latest version to see if working well with your files. Thanks!

Trippy-Tux commented 6 years ago

Hi! Thanks for the reply. Using the new version, I still have some errors. For example, when using --Summary:


python3.6 dumpzilla.py ../Evidences/Exports/Mozilla/Firefox/Profiles/tyg805yw.default/ --Summary
Traceback (most recent call last):
  File "dumpzilla.py", line 2684, in <module>
    app = Dumpzilla(sys.argv)
  File "dumpzilla.py", line 2567, in __init__
    self.All_execute(dir)
  File "dumpzilla.py", line 615, in All_execute
    self.show_cookies(dir)
  File "dumpzilla.py", line 657, in show_cookies
    self.execute_query(cursor,sqlite_query,self.cookie_filters)
  File "dumpzilla.py", line 320, in execute_query
    cursor.execute(sqlite_query,sqlite_param)
sqlite3.OperationalError: no such column: baseDomain

Some options like --Forms or --History work, but others like --Cookies or --Permissions don't work (similar errors). Let me know if you want more error logs. TT

Busindre commented 6 years ago

Hi.

What version of firefox are you trying to analyze? what operating system does it come from? Do you have the same problem with all firefox profiles? Can you try other profiles?

Can you give us the profile to reproduce the problem?

Regards

Douelfakar commented 4 years ago

Hi, I'm facing the same problem, i don't have the column BaseDomain in my Firefox cookies database :

sqlite> .schema CREATE TABLE moz_cookies(id INTEGER PRIMARY KEY, originAttributes TEXT NOT NULL DEFAULT '', name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, inBrowserElement INTEGER DEFAULT 0, sameSite INTEGER DEFAULT 0, rawSameSite INTEGER DEFAULT 0, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes)); sqlite> select baseDomain from moz_cookies ...> ; Error: no such column: baseDomain

i'm using firefox version : 76.0.1

Can someone help me ?

facug91 commented 4 years ago

I'm having the same problem. Ubuntu 18.04.5
Python 3.6.9
I'm using the Dumpzilla script version in master.
My console output is:

Traceback (most recent call last):
  File "dumpzilla.py", line 2685, in <module>
    app = Dumpzilla(sys.argv)
  File "dumpzilla.py", line 2510, in __init__
    self.show_cookies(dir)
  File "dumpzilla.py", line 658, in show_cookies
    self.execute_query(cursor,sqlite_query,self.cookie_filters)
  File "dumpzilla.py", line 321, in execute_query
    cursor.execute(sqlite_query,sqlite_param)
sqlite3.OperationalError: no such column: baseDomain
6d6a6c commented 4 years ago

I am having the same issue as @facug91 using dumpzilla with python 3.8.5 in windows 7, apart from the line number 2510 is 2568 in mine.

File "dumpzilla.py", line 2568, in __init__ self.All_execute(dir)

Looks like the baseDomain field is not used any more.. https://bugzilla.mozilla.org/show_bug.cgi?id=1609176