mvt/mvt/ios/modules/fs/webkit_indexeddb.py

40 lines
1.4 KiB
Python
Raw Normal View History

2021-07-16 06:05:01 +00:00
# Mobile Verification Toolkit (MVT)
# Copyright (c) 2021-2022 Claudio Guarnieri.
# Use of this software is governed by the MVT License 1.1 that can be found at
# https://license.mvt.re/1.1/
2021-07-16 06:05:01 +00:00
from .webkit_base import WebkitBase
WEBKIT_INDEXEDDB_ROOT_PATHS = [
"private/var/mobile/Containers/Data/Application/*/Library/WebKit/WebsiteData/IndexedDB",
]
2021-11-19 14:27:51 +00:00
2021-07-16 06:05:01 +00:00
class WebkitIndexedDB(WebkitBase):
"""This module looks extracts records from WebKit IndexedDB folders,
2021-09-10 13:18:13 +00:00
and checks them against any provided list of suspicious domains.
"""
2021-07-16 06:05:01 +00:00
slug = "webkit_indexeddb"
def __init__(self, file_path=None, base_folder=None, output_folder=None,
fast_mode=False, log=None, results=[]):
super().__init__(file_path=file_path, base_folder=base_folder,
output_folder=output_folder, fast_mode=fast_mode,
log=log, results=results)
def serialize(self, record):
return {
"timestamp": record["isodate"],
"module": self.__class__.__name__,
"event": "webkit_indexeddb",
"data": f"IndexedDB folder {record['folder']} containing file for URL {record['url']}",
}
def run(self):
2021-08-15 17:50:55 +00:00
self._process_webkit_folder(WEBKIT_INDEXEDDB_ROOT_PATHS)
2021-07-16 06:05:01 +00:00
self.log.info("Extracted a total of %d WebKit IndexedDB records",
len(self.results))