Skip to content

extract_key

Core logic to extract encryption key from macOS keychain (when SIP disabled, AMFI (NVRAM) disabled)

Classes:

EncryptionKeyExtractor

EncryptionKeyExtractor()

Class to extract encryption key

C-tor function

Methods:

  • run

    Function performing the extraction for all services

run

run(save: bool = False) -> Dict[str, Dict[str, str | bytes | None]]

Function performing the extraction for all services

Parameters:

  • save

    (bool, default: False ) –

    On-disk save

Returns:

  • Dict[str, Dict[str, str | bytes | None]]

    Dict with keys (hex + bin)

InvalidDataError

Bases: KeyExtractorError

Error class for invalid data on stdout

KeyExtractorError

Bases: Exception

Base class for exceptions in this module

KeyNotFoundError

Bases: KeyExtractorError

Error class for key is not found

KeychainError

KeychainError(status, description)

Bases: KeyExtractorError

Error class for key is not found

C-tor function for Keychain error

Parameters:

  • status

    (str) –

    Status

  • description

    (str) –

    Description