Inspect a SQLCipher-encrypted file from Linux
Inspect SQLCipher on Linux
Loading video…
Authorize one encrypted local database, run a workspace job, and interpret the returned metadata. Start after Linux installation and the plain SQLite walkthrough. SQLCipher adds an explicit file-format choice and a protected passphrase. The workspace does not receive the database file.
Recording environment: the shipped native Linux collector opens an owned SQLCipher format-4 file containing a private application row. The workspace, queue, native wizard and evidence ingestion are real. No service is mocked. The fixture's hash is checked before and after collection and must remain unchanged. The test file, local credential and disposable agent are retired afterward. This is a foreground collector task, not a Linux-service installation.
Prepare the file and collector account
Obtain the existing database's approved absolute path, SQLCipher format version and passphrase through your protected administrative process. Confirm that the Linux account running the collector can read the file and its protected configuration directory. The target is a local file, so this task does not require an administrator login to a database server.
Use the format version supplied by the application owner. QScan accepts formats 1, 2, 3 and 4; this recording demonstrates format 4. The scanner's SQLCipher runtime version is a separate value. A newer runtime does not mean every existing file uses format 4. Raw-key syntax and custom cipher parameters are outside this guided workflow.
The native package includes the required runtime. Do not install an unrelated Python package into it. A failed runtime check calls for inspecting the verified package and its diagnostics.
For a foreground collector, open Terminal as its actual account. Keep the local policy and credentials private:
umask 077
DATABASE_DIRECTORY="$HOME/.config/qscan/database"
mkdir -p "$DATABASE_DIRECTORY"
chmod 700 "$DATABASE_DIRECTORY"
On Linux, the wizard stores the credential in a private local JSON file. Protect the host, directory permissions and backups; never share the credential file with the workspace or place it in source control. A service must run with access to the intended policy and credential under its own provisioned identity.
Authorize the encrypted database
- Open Terminal in the verified unified package directory.
- Run the native wizard with the protected directory and your actual tenant ID:
./agent/runtime/quantum-ready database configure --directory "$DATABASE_DIRECTORY" --tenant YOUR_TENANT_ID
- Choose
sqlite. SQLCipher is selected within the SQLite file workflow. - Enter the absolute path of the existing encrypted file. Do not paste its contents or point the wizard at a directory.
- Answer yes when asked whether it is a SQLCipher-encrypted database.
- Enter the approved format version. The recorded fixture uses
4. - Enter the passphrase twice at the hidden prompts. Keep it out of command-line arguments, screenshots, tickets and unprotected scripts.
- Save the authorization. Record the returned connection identifier and policy path.
- Check the policy locally:
./agent/runtime/quantum-ready database list --policy "$DATABASE_DIRECTORY/database-policy.json" --tenant YOUR_TENANT_ID
./agent/runtime/quantum-ready database check --policy "$DATABASE_DIRECTORY/database-policy.json" --tenant YOUR_TENANT_ID
Local readiness confirms that the policy, credential access and required runtime are available. It does not prove that the supplied passphrase opens the file or that its schema is readable. Those are scan outcomes.
Connect the authorization to the agent
Set databasePolicyFile in the enrolled agent's configuration to the absolute policy path. Preserve other approved configuration, including transport and relay settings. Restrict policy and credential material to the intended collector identity.
Run diagnostics with the existing configuration and protected token file:
./agent/runtime/quantum-ready doctor --config "/private/path/agent.json" --token-file "/private/path/agent.token"
The recording uses a disposable foreground identity. It runs the collector once to advertise readiness, queues the workspace job, then runs once more to consume it:
./agent/runtime/quantum-ready agent --once --config "/private/path/agent.json" --token-file "/private/path/agent.token"
A normally running agent polls according to its configuration. Do not start a competing foreground process against an identity already used by a service. Change local authorization under the account that owns it.
Queue and follow the workspace task
- Open Discovery and create an agent scan.
- Give the task a useful name identifying the approved file and purpose.
- Choose the database scan type.
- Enter the connection identifier returned by the wizard. This field takes neither a file upload nor a passphrase.
- Search for and select the Linux collector holding that authorization. Another machine's agent does not automatically gain access to the file.
- Review the agent and identifier, then queue the task.
- Wait for the collector to consume the job. Inspect its resulting status and observation count.
- Open Cryptographic inventory, find the corresponding SQLite connection, and open its asset detail.
- Expand Observation metadata. Read the probes before drawing conclusions from the completed status.
The recorded job completed with an observation for its requested scope. That does not establish that every copy, page or surrounding system has been assessed.
Interpret the SQLCipher evidence
| Recorded evidence | Meaning and limits |
|---|---|
| Runtime probe observed | The collector reported the SQLite runtime used for this inspection. |
| Schema readable | The supplied format and passphrase allowed the schema metadata probe to succeed. |
allPagesVerified: false | This is not a full integrity sweep or verification of every encrypted page. |
SQLCipher 4.20.0 community, provider openssl | The runtime and provider reported by this connection, distinct from the existing file's format selector. |
| Cipher status and HMAC enabled | Observed connection metadata; retain its collection scope. |
Page size 4096, KDF iterations 256000 | The recorded format-4 settings. Do not impose them on another application format without review. |
HMAC_SHA512 and PBKDF2_HMAC_SHA512 | Reported integrity and derivation settings, not every cryptographic dependency in the application. |
Key establishment and authentication unknown | These inventory dimensions were not established by this local-file observation. |
Storage encryption not-assessed | The broad storage dimension remains unassessed despite the specific cipher metadata. Do not silently turn it into a global pass. |
The collector reads metadata rather than application rows. This recording independently checks that its private row and passphrase are absent from submitted evidence and that the file hash is unchanged. That result applies to this demonstrated file and collector path. Backup, operating-system and application protection require their own evidence.
Recover from common problems
- Local readiness fails: inspect the policy, credential or runtime check. Use the verified native package and actual collector account. A readiness error is not proof that the database is unencrypted.
- Schema is unreadable or unsupported: confirm the file format with the application owner and verify the passphrase through the approved channel. A wrong format or passphrase can prevent reading an encrypted file. Preserve the unknown outcome rather than labeling it plaintext.
- A service cannot use an interactive credential: check the service identity and protected directory access. Provision for the intended service account; do not broaden access to all users.
- The agent is absent from the selector: confirm enrollment, database capability, tenant ownership, policy configuration and a recent readiness heartbeat.
- The job remains queued: check collector connectivity and runtime state. Creating another identifier does not make an offline collector run.
- The observation looks incomplete: read each probe and the completeness panel. Schema readability, cipher metadata and whole-file integrity are different questions.
The video demonstrates a successful format-4 task. The recovery guidance explains failure interpretation; it does not claim that every recovery action or other format was exercised on screen.
Close the task
Confirm that the job, collector, connection identifier and asset observation correspond. Preserve evidence according to workspace retention policy. Keep production authorizations only while approved. The recording removes its disposable file and credentials and revokes and archives the temporary agent; it does not delete a production application database.
Narration transcript
Use the player's caption control for synchronized English captions. The complete narration transcript is also available as text. The instructions above provide prerequisites, commands, scope and recovery detail for repeating the task in your own approved environment.