mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
* refactor: pass secrets as values, fetched once per scope A master key travelled through five layers of function values and three sync.Once guarded reuse; holding each secret where its scope lives shows where it comes from. Only the keychain prompt still waits for first use. * docs(rfcs): fetch secrets per extraction, not per record
27 lines
2.2 KiB
Markdown
27 lines
2.2 KiB
Markdown
# RFC-003: Secrets
|
|
|
|
## Boundaries
|
|
|
|
- **Secret retrieval** lives in one layer: talking to the OS stores (DPAPI and App-Bound Encryption on Windows, the Keychain on macOS, the Secret Service on Linux) and the portable keys file. It knows nothing about browsers or records.
|
|
- **Cryptography** is pure functions over bytes: no OS calls, no blob formats, testable with fixed vectors.
|
|
- **Blob formats** belong to each browser base, which decides which key decrypts what.
|
|
- **The macOS login keychain** is one resource for the whole run, opened at most once. Its consumers get the opened keychain, never the password.
|
|
|
|
## Scopes
|
|
|
|
Secrets live at different levels, so they are fetched at different levels: per data directory for Chromium's master keys, per profile for Firefox, whose key is derived from the profile's own files, and per run for the macOS login keychain and the Firefox primary password the user supplies.
|
|
|
|
## Lazy retrieval
|
|
|
|
A secret is fetched once per scope, only when the scope has an extraction that needs it, and is then passed on as a plain value: a directory's master keys right after its files are captured, the login keychain at its first query. A run that asks only for history or bookmarks never retrieves a key and never prompts. Deciding per extraction rather than per record is what keeps each secret a value with one owner; the cost is an occasional retrieval, and on macOS a prompt, for a store that turns out to hold no encrypted row. A retrieval failure is reported once for its scope; records that needed the secret are still written, with that field empty, and count as `partial`.
|
|
|
|
## Key versions
|
|
|
|
Chromium keys come in versions, and each version is retrieved independently: one failing never discards another. Within a version, the first strategy that works wins. The cipher is chosen from the key at run time rather than from the build's OS, so keys exported on one machine decrypt that machine's data on any OS.
|
|
|
|
## Never
|
|
|
|
- **No secret in a log line,** ever.
|
|
- **No new technique.** Only existing, published methods sit behind these boundaries.
|
|
- **No vendored loader.** The Windows payload is first-party code. The common third-party loader was rejected because it crashes on Windows internals it walks too far and depends on brittle structure layouts.
|