Skip to main content

Encrypted application recovery

Recovery prepares encrypted application data so its normal parser can read it. You enable it with --extract-artefacts; there is no separate decryption pass to run first. If credentials are missing, the indexer records what it needs and can resume later with --retry-recovery.

Start with Getting started if you have not created an index yet. Signal Desktop is the current built-in application integration. The CLI uses application-independent recovery options so future integrations can use the same prompts, reports and retry workflow.

What happens automatically?​

The indexer finds an application's database in the file inventory, locates its configuration and acquired credential stores, and attempts the supported recovery route. It passes recovered keys directly to the parser in memory. It does not use your analysis machine's live Keychain, DPAPI session or desktop keyring.

For example, a Linux Signal profile using GNOME Keyring follows this chain:

Password for the acquired keyring
↓
Unlock login.keyring
↓
Read Signal's Safe Storage secret
↓
Unwrap encryptedKey in config.json
↓
Open db.sqlite with SQLCipher
↓
Parse messages and attachment references
↓
Publish results to the analysis index

The keyring password, Safe Storage secret and SQLCipher database key are different values. Supplying the first lets the indexer derive the others when the acquired files support that route.

Signal profileRecovery dependencies
WindowsSignal configuration, the user's DPAPI masterkey material and account identity, and a supported account password.
macOSSignal configuration, the acquired file-based login Keychain and its password. Some login-protected layouts also require the matching acquired SystemKey file.
Linux, GNOME KeyringSignal configuration, the matching binary keyring and its password.
Linux, KWalletSignal configuration, the supported password-based wallet, its matching .salt file and its password.
Linux, plaintext/basic storageA plaintext configuration key or supported basic-storage envelope. No keyring password is needed.
Already decrypted SQLite databaseThe parser reads it directly; no database key is required.

The login password is often the store password, but they can differ. Use the password for the acquired store at acquisition time. Unsupported store formats, missing dependencies and ambiguous item selection are reported explicitly.

Recovery here means opening encrypted data that is present in the acquisition. It does not imply carving deleted or expired messages. Attachment references are indexed with the messages; media-file decryption/export is a separate operation.

The simplest workflow: let the CLI ask​

Run your initial indexing command with --extract-artefacts. The terminal adapter asks for missing acquired-store passwords and declared parser secrets. Password entry is hidden. It groups password requests by store, so profiles sharing one store can use the same supplied password.

There is one prompt per requested input in a pass. A wrong password is reported after that retry; it does not start an endless prompt loop. You can defer a prompt with Ctrl+D on Linux/macOS. The library itself never prompts.

If you deferred recovery, retry from the same terminal later:

exhume_indexer \
--body "/evidence/disk.qcow2" \
--database ./case/index.sqlite \
--partition-id 1 \
--retry-recovery

Replace 1 with the partition_id in your first report. For a folder acquisition, replace --body with that folder. With a non-default evidence ID, repeat --evidence-id too.

You do not repeat --offset or --size: the indexer reloads saved geometry. It reuses the inventory and reads dependencies from the source again. Keep that source available. Do not combine --retry-recovery with --extract-artefacts or --identify-files.

Without a target selector, the retry processes unresolved jobs. Jobs already published as complete or partial are skipped. To rerun one of those, select it explicitly with --recovery-target.

Understand target IDs and store IDs​

A target is an application artefact to recover, such as one Signal profile's database. A store is an acquired credential store used by that target. One store can serve several targets.

Report valueUse it withPurpose
partition_id--partition-idSelect the existing partition or folder scope in the analysis index.
recovery.jobs[].target_id--recovery-targetSelect one application recovery target.
recovery.jobs[].credentials[].id--credential-fileSupply a password for that acquired store. needed: true identifies a pending request.

The long recovery-target-… and recovery-store-… strings are generated identifiers, not passwords or decryption keys. Copy them from your report; do not construct them from a path or reuse IDs from another case. Target IDs also depend on the inventory generation. After a full reindex, use its new report.

To inspect jobs in PowerShell:

$report = Get-Content -Raw .\case\first-run.json | ConvertFrom-Json
$report.recovery.jobs | Select-Object target_id, application, primary_path, status
$report.recovery.jobs | ForEach-Object { $_.credentials }

Or, with the optional jq tool on Linux/macOS:

jq '.recovery.jobs[] | {target_id, application, primary_path, status, credentials, inputs}' \
./case/first-run.json

inputs describes missing or rejected parser options, such as a direct database key. option_specs describes their labels, types and whether they are secret.

Retry one target with a password file​

File inputs are useful for unattended runs and repeatable tests. An interactive retry is simpler when you are working at the terminal.

Create case/store-password.bin containing only the exact password bytes. There must be no extra newline or byte-order mark. A text editor or echo can add one; the indexer deliberately does not trim it. Restrict access to the file using your operating system's permissions.

For example, if Python 3 is available, this asks for a password without echoing it and writes UTF-8 bytes without a trailing newline:

python3 -c 'import getpass, pathlib; p = pathlib.Path("case/store-password.bin"); p.touch(mode=0o600, exist_ok=False); p.write_bytes(getpass.getpass("Acquired store password: ").encode("utf-8"))'

On Windows, the Python executable may be named python; POSIX mode bits do not replace Windows file access permissions. The example refuses to overwrite an existing password file.

The following examples assume the report contains one job with one pending credential. With several jobs, inspect them above and select the intended target and store instead of taking the first entry.

The variable assignments use jq:

PARTITION_ID=$(jq -er '.partition_id' ./case/first-run.json)
TARGET_ID=$(jq -er '.recovery.jobs[0].target_id' ./case/first-run.json)
STORE_ID=$(jq -er '.recovery.jobs[0].credentials[] | select(.needed) | .id' ./case/first-run.json)

exhume_indexer \
--body "/evidence/disk.qcow2" \
--database ./case/index.sqlite \
--partition-id "$PARTITION_ID" \
--retry-recovery \
--recovery-target "$TARGET_ID" \
--credential-file "$STORE_ID=./case/store-password.bin" \
--no-recovery-input \
--json-report \
--no-progress --log-level warn \
> ./case/retry.json

This is the longer recovery command broken down:

OptionWhy it is present
--bodyReopen the same acquired image or folder to read the needed files.
--databaseOpen the existing analysis index, not Signal's database.
--partition-idSelect the scope whose inventory is already stored.
--retry-recoveryRun recovery using that inventory, without indexing it again.
--recovery-targetLimit the pass to this target, including an already published target when explicitly selected. Repeat the flag to select more.
--credential-fileAssociate the file's exact password with one reported acquired-store ID. Repeat it for different stores.
--no-recovery-inputDisable terminal prompts. Supplied files are still used. Useful in scripts and CI.
--json-reportSave overall and per-target outcomes for inspection.
--no-progress --log-level warnKeep progress bars and informational logs out of the terminal; warnings still go to standard error.

Unattended runs should explicitly use --no-recovery-input. The CLI also skips prompts when standard input is not a terminal. Inspect the exit code and retry.json, particularly the selected job's status, reason, inputs and issue_count.

Password, parser secret or parser option?​

These are three different input scopes:

InputCLI syntaxExample purpose
Acquired-store password--credential-file STORE_ID=PATHUnlock a specific acquired keyring, wallet, Keychain or DPAPI scope.
Secret parser input--recovery-secret-file TARGET_ID:OPTION=PATHSupply a known raw database key to one target.
Non-secret parser setting--recovery-option PARSER:OPTION=JSONChoose a supported cipher compatibility version.

If you already have a Signal SQLCipher key, use the selected target's database_key option. The file must contain exactly 64 ASCII hexadecimal characters, without a 0x prefix or newline:

exhume_indexer \
--body "/evidence/disk.qcow2" \
--database ./case/index.sqlite \
--partition-id "$PARTITION_ID" \
--retry-recovery --recovery-target "$TARGET_ID" \
--recovery-secret-file "$TARGET_ID:database_key=./case/database-key.hex" \
--no-recovery-input

Here TARGET_ID and PARTITION_ID are the report values selected in the previous example. This route bypasses credential-store recovery for that target. It does not make the raw key a store password.

For an older Signal database that specifically requires SQLCipher 3 compatibility, add:

--recovery-option desktop_signal:cipher_version=3

The default is 4. Settings are validated against the parser's declarations; values use JSON types. Parser settings are non-secret and may be persisted. Secret values must use the secret-file or credential-file routes. All three input options require --extract-artefacts or --retry-recovery.

Image passwords are separate

--password-file and --password-stdin open supported encrypted image containers. They do not unlock acquired application credential stores. Unlike recovery secret files, the image password-file reader removes one trailing line ending. --fvek is a separate BitLocker volume-key input; its value is stored on the partition row for reopening the volume.

Interpret recovery outcomes​

Job statusMeaning and next step
completeParser output was published without recovery diagnostics. Review its records and provenance.
partialRecoverable output was published with diagnostics. Review them before relying on completeness. Select the target explicitly to retry it.
needs_inputSupply the requested store credential or parser input, or defer it.
authentication_failedThe submitted credential was rejected for this route. Check the acquired store's password and exact file bytes, then retry.
missing_evidenceA required acquired file or companion is absent. A password alone cannot replace it.
unsupportedThe acquired layout, store or encryption route is not supported.
backend_unavailableThe build lacks a required backend, such as SQLCipher. Use a build with that feature.
validation_failedRecovered or supplied inputs did not validate the target data. Do not treat store unlocking as proof of database decryption.
malformed, file_read, limit_exceededInspect reason and diagnostics for a damaged input, read failure or processing limit.
discovered, cancelledWork remains resumable. Retry unresolved targets once the source is available.
persistence_failedPublication failed. Resolve the analysis database/storage problem before retrying.

A successful or partial attempt publishes the target's records, timeline and attachment references together. A failed or cancelled attempt retains its previous published results. attempt_id identifies the latest attempt; published_attempt_id identifies the attempt backing the visible results. Those can differ after a failed retry.

Passwords and recovered database keys stay in the operation's in-memory session; they are not written into recovery jobs or reports. The index stores attempt history, source provenance and validation results. Store verification and database validation are separate checks, and a successful parse is not a whole-database integrity or completeness guarantee.

Troubleshooting​

“Unknown argument: --retry-recovery.” Check --version and --help. Use the recovery-capable build described in Getting started.

No password prompt appears. Check recovery.jobs. The profile may not have been discovered, may already be complete, or may need missing evidence rather than a password. Prompts are also skipped with --no-recovery-input or non-terminal standard input. Linux plaintext/basic storage can succeed without a keyring prompt.

The password works on the live machine but recovery rejects it. Check that it belongs to the acquired store and snapshot, rather than a different account or a newer password. Check for a trailing newline or encoding marker in the supplied file. Read the job's reason for route-specific limitations.

The target is complete but the CLI exits with code 2. Inspect the overall report and index_issues. Other parsers or filesystem gaps can make the run incomplete. For example, a broad catalogue match can send an unrelated .sys file to a Windows parser on a Linux acquisition. Per-target success does not clear unrelated issues.

A retry reports stale IDs, a scope mismatch or no inventory. Use the original source, analysis database, evidence ID and partition ID. Take target/store IDs from that scope's latest report. If the original run stopped before establishing its inventory or recovery discovery, rerun the full --extract-artefacts command with the existing --partition-id.