Compare commits

..
Author SHA1 Message Date
Donncha Ó Cearbhaill f75451c01c Propagate the module filter to the AndroidQF nested commands
mvt-android check-androidqf -m MODULE filtered only the top-level
AndroidQF modules: when the archive holds bugreport.zip, backup.ab or
an intrusion_logs folder the nested commands were built without
module_name, so every nested module ran regardless of the filter.
Pass self.module_name to all three nested commands; a filter naming
an AndroidQF module now runs exactly that module, and a filter naming
a nested module selects it from the nested command.
2026-11-22 13:20:13 +01:00
besendorf 6ef66048ac Merge pull request #993 from mvt-project/besendorf-patch-6
Remove breaking changes notice from README
2026-11-18 12:37:27 +01:00
besendorf ed86566bf1 Remove breaking changes notice from README
Removed important notice about breaking changes in v3 branch.
2026-11-18 12:21:27 +01:00
6 changed files with 30 additions and 128 deletions

No files matched your search

+1 -2
View File
@@ -4,8 +4,7 @@
# Mobile Verification Toolkit
> [!IMPORTANT]
> We recently merged the "v3" branch. This introduced breaking changes. If you relied on mvt output in other scripts They might have broken. More details: https://github.com/mvt-project/mvt/issues/757
[![](https://img.shields.io/pypi/v/mvt)](https://pypi.org/project/mvt/)
[![Documentation Status](https://readthedocs.org/projects/mvt/badge/?version=latest)](https://docs.mvt.re/en/latest/?badge=latest)
+3
View File
@@ -259,6 +259,7 @@ class CmdAndroidCheckAndroidQF(Command):
hashes=self.hashes,
sub_command=True,
custom_modules=self.custom_modules,
module_name=self.module_name,
)
cmd.from_zip(bugreport)
cmd.run()
@@ -290,6 +291,7 @@ class CmdAndroidCheckAndroidQF(Command):
hashes=self.hashes,
sub_command=True,
custom_modules=self.custom_modules,
module_name=self.module_name,
)
try:
cmd.from_ab(backup)
@@ -376,6 +378,7 @@ class CmdAndroidCheckAndroidQF(Command):
hashes=self.hashes,
sub_command=True,
custom_modules=self.custom_modules,
module_name=self.module_name,
)
cmd.run()
+24 -39
View File
@@ -57,46 +57,31 @@ class Calls(IOSExtraction):
return
conn = self._open_sqlite_db(self.file_path)
cur = conn.cursor()
try:
cur.execute("PRAGMA table_info(ZCALLRECORD);")
columns = {column[1].upper() for column in cur}
originated_column = "ZORIGINATED" if "ZORIGINATED" in columns else "NULL"
answered_column = "ZANSWERED" if "ZANSWERED" in columns else "NULL"
cur.execute(
f"""
SELECT
ZDATE, ZDURATION, ZLOCATION, ZADDRESS, ZSERVICE_PROVIDER,
{originated_column}, {answered_column}
FROM ZCALLRECORD;
"""
cur.execute(
"""
SELECT
ZDATE, ZDURATION, ZLOCATION, ZADDRESS, ZSERVICE_PROVIDER
FROM ZCALLRECORD;
"""
)
# names = [description[0] for description in cur.description]
for row in cur:
self.results.append(
{
"isodate": convert_mactime_to_iso(row[0]),
"duration": row[1],
"location": row[2],
"number": (
row[3].decode("utf-8")
if isinstance(row[3], bytes)
else row[3]
),
"provider": row[4],
}
)
for (
date,
duration,
location,
address,
provider,
originated,
answered,
) in cur:
self.results.append(
{
"isodate": convert_mactime_to_iso(date),
"duration": duration,
"location": location,
"number": (
address.decode("utf-8")
if isinstance(address, bytes)
else address
),
"provider": provider,
"originated": originated,
"answered": answered,
}
)
finally:
cur.close()
conn.close()
cur.close()
conn.close()
self.log.info("Extracted a total of %d calls", len(self.results))
@@ -107,7 +107,7 @@ class SafariBrowserState(IOSExtraction):
tabs.last_viewed_time,
tab_sessions.session_data
FROM tabs
LEFT JOIN tab_sessions ON tabs.uuid = tab_sessions.tab_uuid
JOIN tab_sessions ON tabs.uuid = tab_sessions.tab_uuid
ORDER BY tabs.last_viewed_time;
"""
)
@@ -139,9 +139,7 @@ class SafariBrowserState(IOSExtraction):
except plistlib.InvalidFileException:
pass
if "SessionHistoryEntries" in session_data.get(
"SessionHistory", {}
):
if "SessionHistoryEntries" in session_data.get("SessionHistory", {}):
for session_entry in session_data["SessionHistory"].get(
"SessionHistoryEntries"
):
-46
View File
@@ -1,46 +0,0 @@
# Mobile Verification Toolkit (MVT)
# Copyright (c) 2021-2026 The MVT Authors.
# Use of this software is governed by the MVT License 1.1 that can be found at
# https://license.mvt.re/1.1/
import sqlite3
import pytest
from mvt.common.module import run_module
from mvt.ios.modules.mixed.calls import Calls
@pytest.mark.parametrize("has_flags", [True, False])
def test_calls_reads_optional_call_flags(tmp_path, has_flags):
db_path = tmp_path / "CallHistory.storedata"
conn = sqlite3.connect(db_path)
try:
conn.execute(
"""
CREATE TABLE ZCALLRECORD (
ZDATE REAL, ZDURATION REAL, ZLOCATION TEXT, ZADDRESS BLOB,
ZSERVICE_PROVIDER TEXT
)
"""
)
conn.execute(
"INSERT INTO ZCALLRECORD VALUES (?, ?, ?, ?, ?)",
(700000000, 42, "Berlin", b"+491234", "carrier"),
)
if has_flags:
conn.execute("ALTER TABLE ZCALLRECORD ADD COLUMN ZORIGINATED INTEGER")
conn.execute("ALTER TABLE ZCALLRECORD ADD COLUMN ZANSWERED INTEGER")
conn.execute("UPDATE ZCALLRECORD SET ZORIGINATED = 1, ZANSWERED = 0")
conn.commit()
finally:
conn.close()
module = Calls(file_path=str(db_path))
run_module(module)
assert len(module.results) == 1
record = module.results[0]
assert record["number"] == "+491234"
assert record["originated"] == (1 if has_flags else None)
assert record["answered"] == (0 if has_flags else None)
@@ -5,7 +5,6 @@
import logging
import shutil
import sqlite3
import pytest
@@ -75,39 +74,3 @@ class TestSafariBrowserStateModule:
assert len(m.alertstore.alerts) == 1
assert len(m.results) == 1
assert m.results[0]["tab_url"] == "https://en.wikipedia.org/wiki/NSO_Group"
def test_detection_for_tab_without_session_row(self, tmp_path, indicator_file):
url = "https://en.wikipedia.org/wiki/NSO_Group"
db_path = tmp_path / "private/var/mobile/Library/Safari/BrowserState.db"
db_path.parent.mkdir(parents=True)
conn = sqlite3.connect(db_path)
try:
conn.executescript(
"""
CREATE TABLE tabs (
uuid TEXT, title TEXT, url TEXT, user_visible_url TEXT,
last_viewed_time REAL
);
CREATE TABLE tab_sessions (tab_uuid TEXT, session_data BLOB);
"""
)
conn.execute(
"INSERT INTO tabs VALUES ('tab-1', 'Example', ?, ?, 700000000)",
(url, url),
)
conn.commit()
finally:
conn.close()
module = SafariBrowserState(target_path=str(tmp_path))
module.is_fs_dump = True
indicators = Indicators(log=logging.getLogger())
indicators.parse_stix2(indicator_file)
indicators.ioc_collections[0]["domains"].append("en.wikipedia.org")
module.indicators = indicators
run_module(module)
assert len(module.results) == 1
assert module.results[0]["tab_url"] == url
assert module.results[0]["session_data"] == []
assert len(module.alertstore.alerts) == 1