2021-07-16 06:05:01 +00:00
|
|
|
# Mobile Verification Toolkit (MVT)
|
2022-05-08 12:53:50 +00:00
|
|
|
# Copyright (c) 2021-2022 Claudio Guarnieri.
|
2021-08-01 19:11:08 +00:00
|
|
|
# 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
|
|
|
|
2022-06-17 20:30:46 +00:00
|
|
|
import logging
|
|
|
|
|
2021-07-16 06:05:01 +00:00
|
|
|
from .webkit_base import WebkitBase
|
|
|
|
|
|
|
|
WEBKIT_SAFARIVIEWSERVICE_ROOT_PATHS = [
|
|
|
|
"private/var/mobile/Containers/Data/Application/*/SystemData/com.apple.SafariViewService/Library/WebKit/WebsiteData/",
|
|
|
|
]
|
|
|
|
|
2021-11-19 14:27:51 +00:00
|
|
|
|
2021-07-16 06:05:01 +00:00
|
|
|
class WebkitSafariViewService(WebkitBase):
|
|
|
|
"""This module looks extracts records from WebKit LocalStorage 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
|
|
|
|
2022-06-17 20:30:46 +00:00
|
|
|
def __init__(self, file_path: str = None, target_path: str = None,
|
|
|
|
results_path: str = None, fast_mode: bool = False,
|
|
|
|
log: logging.Logger = None, results: list = []) -> None:
|
2022-06-16 13:18:50 +00:00
|
|
|
super().__init__(file_path=file_path, target_path=target_path,
|
|
|
|
results_path=results_path, fast_mode=fast_mode,
|
2021-07-16 06:05:01 +00:00
|
|
|
log=log, results=results)
|
|
|
|
|
2022-06-17 20:30:46 +00:00
|
|
|
def run(self) -> None:
|
2021-08-15 17:50:55 +00:00
|
|
|
self._process_webkit_folder(WEBKIT_SAFARIVIEWSERVICE_ROOT_PATHS)
|
|
|
|
self.log.info("Extracted a total of %d records from WebKit SafariViewService WebsiteData",
|
|
|
|
len(self.results))
|