Documentation
¶
Overview ¶
Package masterkey retrieves Chromium master keys; Firefox and Safari keep their own key paths.
Index ¶
Constants ¶
const DumpVersion = "2"
Variables ¶
var ErrNotApplicable = errors.New("retriever not applicable")
ErrNotApplicable is a retriever's way of stepping aside; it never counts as a failure.
Functions ¶
func DecryptDPAPI ¶
Types ¶
type ABEKind ¶
type ABEKind int
ABEKind is the payload's elevation-service dialect; the zero ABENone leaves a browser on DPAPI alone.
type Dump ¶
type Dump struct {
Version string `json:"version"`
CreatedAt time.Time `json:"created_at"`
Host Host `json:"host"`
Vaults []Vault `json:"vaults"`
}
Dump is keys.json: produced on one host, it decrypts copied profile data on another.
type Host ¶
type Host struct {
OS string `json:"os"`
Arch string `json:"arch"`
Hostname string `json:"hostname,omitempty"`
User string `json:"user,omitempty"`
}
Host OS / Arch always set; Hostname / User best-effort (empty on syscall failure).
type Locator ¶
type Locator struct {
LocalState string // the copied Local State; "" when the user data dir has none
KeychainLabel string // macOS Keychain account / Linux D-Bus Secret Service label
Exe string
ExeFallbacks []string
ABE ABEKind
Keychain LoginKeychain // macOS: the run's login keychain; nil elsewhere
}
Locator is where one user data dir's keys are found; each retriever reads only the fields of its OS.
type LoginKeychain ¶
type LoginKeychain interface {
GenericPassword(ctx context.Context, account string) ([]byte, error)
}
LoginKeychain is the one method the macOS v10 retriever reads from the run's login keychain.
type Retriever ¶
type Retriever interface {
Version() Version
Retrieve(ctx context.Context, loc Locator) ([]byte, error)
}
Retriever obtains one version's key from one OS secret store.
type Set ¶
Set holds one user data dir's key per version; encoding/json writes it as keys.json's "keys" object.
type Vault ¶
type Vault struct {
Browser string `json:"browser"`
// ID names a second user data dir of the same browser ("arc-2"); the first one's is Browser, so it is left out.
ID string `json:"id,omitempty"`
Kind string `json:"kind"`
UserDataDir string `json:"user_data_dir"`
Profiles []string `json:"profiles"`
Keys Set `json:"keys"`
}
Vault names its engine in Kind, so a consumer can read a vault without the browser in its own table.