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

feat: improve handling of IndexedDB databases and restructure code #36

Merged
merged 29 commits into from
Jan 21, 2024

Conversation

KarelZe
Copy link
Collaborator

@KarelZe KarelZe commented Jan 8, 2024

  • fix and analyze error "there could be this many dbs, but I don't support it yet" @lxndrblz
  • analyze which changes to merge into chromedb repo @KarelZe / @lxndrblz
  • perform mapping in dataclass to changed attributes @KarelZe
  • fix TypeError: unsupported operand type(s) for +: 'NoneType' and 'int' @KarelZe
  • Allow parsing of .blob folders @lxndrblz

closes #13
closes #19
closes #20
closes #62

Merge #30 first.

@KarelZe KarelZe added the enhancement New feature or request label Jan 8, 2024
@KarelZe KarelZe marked this pull request as draft January 8, 2024 13:37
@KarelZe KarelZe changed the title feat: add support for MS Teams > 2.0 feat(parser): add support for MS Teams > 2.0 Jan 9, 2024
@lxndrblz lxndrblz changed the title feat(parser): add support for MS Teams > 2.0 feat: improve handling of IndexedDB databases and restructure code Jan 19, 2024
@seychelles111
Copy link

In about a month, I am going to a "vacation without pay", is it possible I can archive my Teams chats?
right now I face

Can't resolve blob if blob dir is not set

image


internal-data Teams:capiv3-contacts-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
system-messages-store Teams:channel-info-pane-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:8:orgid:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
pinnedchannelmessages Teams:channel-info-pane-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:8:orgid:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
team-roster-version-store Teams:channel-info-pane-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:8:orgid:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
recentContributorsStore Teams:channel-info-pane-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:8:orgid:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
channel-roster-version-store Teams:channel-info-pane-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:8:orgid:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
infoPaneInternalDataStore Teams:channel-info-pane-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:8:orgid:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
app-entitlements Teams:channel-installed-apps-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
app-definitions Teams:channel-installed-apps-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
app-entitlements Teams:chat-installed-apps-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
app-definitions Teams:chat-installed-apps-manager:fb37c808-6ca7-40eb-8746-85795efcbd36:246d6ad6-b7ca-477a-a94d-caa5a0b8ab42 (Records: 0)
Traceback (most recent call last):
  File "C:\Users\ori.k\Documents\teams archive\forensicsim\tools\dump_leveldb.py", line 68, in <module>
    process_cmd()
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\Documents\teams archive\forensicsim\tools\dump_leveldb.py", line 64, in process_cmd
    process_db(filepath, outputpath)
  File "C:\Users\ori.k\Documents\teams archive\forensicsim\tools\dump_leveldb.py", line 39, in process_db
    extracted_values = parse_db(input_path, do_not_filter=True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\forensicsim\backend.py", line 75, in parse_db
    extracted_values.append({
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromedb\ccl_chromium_indexeddb.py", line 846, in iterate_records
    yield from self._raw_db.iterate_records(
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromedb\ccl_chromium_indexeddb.py", line 641, in iterate_records
    precursor = self.read_record_precursor(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromedb\ccl_chromium_indexeddb.py", line 600, in read_record_precursor
    blob = self.get_blob(db_id, store_id, key.raw_key, externally_serialized_blob_index).read()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ori.k\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromedb\ccl_chromium_indexeddb.py", line 692, in get_blob
    raise ValueError("Can't resolve blob if blob dir is not set")
ValueError: Can't resolve blob if blob dir is not set
PS C:\Users\ori.k\Documents\teams archive\forensicsim> ```

@lxndrblz lxndrblz linked an issue Jan 20, 2024 that may be closed by this pull request
@seychelles111
Copy link

https://github.com/cclgroupltd/ccl_chrome_indexeddb
exporting to csv works for me tho.... just not the decoding thing

image

@lxndrblz lxndrblz marked this pull request as ready for review January 21, 2024 16:18
@lxndrblz lxndrblz self-requested a review as a code owner January 21, 2024 16:18
@lxndrblz lxndrblz merged commit 9db96bf into main Jan 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants