From b6be706778dd4cb533574de745769e5e0fc18019 Mon Sep 17 00:00:00 2001 From: besendorf Date: Tue, 21 Apr 2026 15:14:10 +0200 Subject: [PATCH 1/7] Abort analysis and warn user when backup is encrypted (#772) * Abort analysis and warn user when backup is encrypted When `check-backup` is run against an encrypted backup, Manifest.db cannot be opened as a plain SQLite database. Previously this caused a flood of confusing "file is not a database" errors across all modules. Now the Manifest module detects the sqlite3.DatabaseError on its first query and raises a new EncryptedBackupError. This exception propagates out of run_module() and is caught in Command.run(), which logs a clear critical message instructing the user to decrypt the backup first with `mvt-ios decrypt-backup`, then stops the analysis immediately. Fixes #769 * Fix ruff F821: use self.log instead of undefined log --------- Co-authored-by: Janik Besendorf --- src/mvt/common/command.py | 11 +++++++++-- src/mvt/common/module.py | 6 ++++++ src/mvt/ios/modules/backup/manifest.py | 12 ++++++++++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/mvt/common/command.py b/src/mvt/common/command.py index 0eb633a..a3b99ea 100644 --- a/src/mvt/common/command.py +++ b/src/mvt/common/command.py @@ -11,7 +11,7 @@ from datetime import datetime from typing import Optional from mvt.common.indicators import Indicators -from mvt.common.module import MVTModule, run_module, save_timeline +from mvt.common.module import EncryptedBackupError, MVTModule, run_module, save_timeline from mvt.common.utils import ( convert_datetime_to_iso, generate_hashes_from_path, @@ -244,7 +244,14 @@ class Command: except NotImplementedError: pass - run_module(m) + try: + run_module(m) + except EncryptedBackupError: + self.log.critical( + "The backup appears to be encrypted. " + "Please decrypt it first using `mvt-ios decrypt-backup`." + ) + return self.executed.append(m) diff --git a/src/mvt/common/module.py b/src/mvt/common/module.py index 2a52677..9c26064 100644 --- a/src/mvt/common/module.py +++ b/src/mvt/common/module.py @@ -21,6 +21,10 @@ class DatabaseCorruptedError(Exception): pass +class EncryptedBackupError(Exception): + pass + + class InsufficientPrivileges(Exception): pass @@ -169,6 +173,8 @@ def run_module(module: MVTModule) -> None: try: exec_or_profile("module.run()", globals(), locals()) + except EncryptedBackupError: + raise except NotImplementedError: module.log.exception( "The run() procedure of module %s was not implemented yet!", diff --git a/src/mvt/ios/modules/backup/manifest.py b/src/mvt/ios/modules/backup/manifest.py index ccbc459..da5c1a8 100644 --- a/src/mvt/ios/modules/backup/manifest.py +++ b/src/mvt/ios/modules/backup/manifest.py @@ -8,9 +8,10 @@ import io import logging import os import plistlib +import sqlite3 from typing import Optional -from mvt.common.module import DatabaseNotFoundError +from mvt.common.module import DatabaseNotFoundError, EncryptedBackupError from mvt.common.url import URL from mvt.common.utils import convert_datetime_to_iso, convert_unix_to_iso @@ -127,7 +128,14 @@ class Manifest(IOSExtraction): conn = self._open_sqlite_db(manifest_db_path) cur = conn.cursor() - cur.execute("SELECT * FROM Files;") + try: + cur.execute("SELECT * FROM Files;") + except sqlite3.DatabaseError: + conn.close() + raise EncryptedBackupError( + "Manifest.db is not a valid SQLite database. " + "The backup may be encrypted." + ) names = [description[0] for description in cur.description] for file_entry in cur: From 241a181de0c89f75532a68a08be6713114d27725 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:02:56 +0200 Subject: [PATCH 2/7] Bump cryptography from 46.0.6 to 47.0.0 (#775) Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.6 to 47.0.0. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/46.0.6...47.0.0) --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fedfff9..86cac15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "iOSbackup==0.9.925", "adb-shell[usb]==0.4.4", "libusb1==3.3.1", - "cryptography==46.0.6", + "cryptography==47.0.0", "PyYAML>=6.0.2", "pyahocorasick==2.2.0", "betterproto2==0.9.1", From 28a32de72f272ba88bda24cafb45b84f51a106c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:05:34 +0200 Subject: [PATCH 3/7] Bump pydantic from 2.12.5 to 2.13.3 (#777) Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.12.5 to 2.13.3. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.12.5...v2.13.3) --- updated-dependencies: - dependency-name: pydantic dependency-version: 2.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86cac15..845067c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "PyYAML>=6.0.2", "pyahocorasick==2.2.0", "betterproto2==0.9.1", - "pydantic==2.12.5", + "pydantic==2.13.3", "pydantic-settings==2.13.1", "NSKeyedUnArchiver==1.5.2", "python-dateutil==2.9.0.post0", From 0b612a9e3926d8d118653542450a97c5efc81018 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:07:30 +0200 Subject: [PATCH 4/7] Add new iOS versions and build numbers (#756) Co-authored-by: DonnchaC <3081375+DonnchaC@users.noreply.github.com> Co-authored-by: besendorf --- src/mvt/ios/data/ios_versions.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mvt/ios/data/ios_versions.json b/src/mvt/ios/data/ios_versions.json index ea32c9f..1a15aed 100644 --- a/src/mvt/ios/data/ios_versions.json +++ b/src/mvt/ios/data/ios_versions.json @@ -1200,6 +1200,10 @@ "version": "18.7.7", "build": "22H333" }, + { + "version": "18.7.8", + "build": "22H352" + }, { "version": "26", "build": "23A341" @@ -1231,5 +1235,9 @@ { "version": "26.4", "build": "23E246" + }, + { + "version": "26.4.2", + "build": "23E261" } ] \ No newline at end of file From 01157efbfa08b8cb621f607154c61fef8ced1818 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:16:05 +0200 Subject: [PATCH 5/7] Bump mkdocs-autorefs from 1.4.3 to 1.4.4 (#776) Bumps [mkdocs-autorefs](https://github.com/mkdocstrings/autorefs) from 1.4.3 to 1.4.4. - [Release notes](https://github.com/mkdocstrings/autorefs/releases) - [Changelog](https://github.com/mkdocstrings/autorefs/blob/main/CHANGELOG.md) - [Commits](https://github.com/mkdocstrings/autorefs/compare/1.4.3...1.4.4) --- updated-dependencies: - dependency-name: mkdocs-autorefs dependency-version: 1.4.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: besendorf --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 843517a..4063e72 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ mkdocs==1.6.1 -mkdocs-autorefs==1.4.3 +mkdocs-autorefs==1.4.4 mkdocs-material==9.6.20 mkdocs-material-extensions==1.3.1 mkdocstrings==1.0.0 \ No newline at end of file From 93df1eb1ea2533732c21e5d71fca7794fc7271e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:17:25 +0200 Subject: [PATCH 6/7] Bump mkdocstrings from 1.0.0 to 1.0.4 (#759) Bumps [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings) from 1.0.0 to 1.0.4. - [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases) - [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md) - [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/1.0.0...1.0.4) --- updated-dependencies: - dependency-name: mkdocstrings dependency-version: 1.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: besendorf --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 4063e72..63268b5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,4 @@ mkdocs==1.6.1 mkdocs-autorefs==1.4.4 mkdocs-material==9.6.20 mkdocs-material-extensions==1.3.1 -mkdocstrings==1.0.0 \ No newline at end of file +mkdocstrings==1.0.4 \ No newline at end of file From dad2a7a928958c604528e028ff098d9504bb872e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:20:17 +0200 Subject: [PATCH 7/7] Bump mkdocs-material from 9.6.20 to 9.7.6 (#758) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.20 to 9.7.6. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.20...9.7.6) --- updated-dependencies: - dependency-name: mkdocs-material dependency-version: 9.7.6 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 63268b5..63432f3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ mkdocs==1.6.1 mkdocs-autorefs==1.4.4 -mkdocs-material==9.6.20 +mkdocs-material==9.7.6 mkdocs-material-extensions==1.3.1 mkdocstrings==1.0.4 \ No newline at end of file