-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
Description
Remember that metadata entry 0x000b? This is what that is for.
Windows supports auto-unlocking BitLocker fixed volumes (which are unlocked before user login). This works only when the OS drive is itself using BitLocker. It works like this:
- The OS drive gets a 0x000b metadata key entry, which is wrapped with its VMK in the same way the FVEK is. Let's call this the
LIBBDE_ENTRY_TYPE_AUTO_UNLOCK_KEY - When a secondary fixed drive is configured to auto unlock, a new VMK record is created in the secondary metadata of the "Startup key" type (name: ExternalKey). This uses a new key to wrap the VMK for the secondary volume.
- That new key is subsequently wrapped with the OS drive's
AUTO_UNLOCK_KEY, yielding an aes_ccm_encrypted_key - A registry key is created at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FVEAutoUnlock\{volume identifier guid}and a binary value namedDatais created with the following format:
- uint32_t length; // 0x70
- uint32_t unknown; // 0x9 here
- GUID vmk_identifier // GUID identifier of the VMK slot in the secondary drive
- aes_ccm_encrypted key (standard metadata format: u16 size=80; u16 type=0; u16 valuetype=5; u16 version=1; u8 nonce[12]; u8 tag[16]; u8 ciphertext[...])
So the question here is how should this be implemented in libbde? It involves somewhat complex interaction between two volumes and the registry. The steps would have to be something like this:
- Extract the plaintext AUTO_UNLOCK_KEY from the OS volume (e.g. new bdeinfo feature?)
- Use bdemount on the OS volume, and then use e.g. the chntpw toolset to inspect the SYSTEM registry and extract the FVEAutoUnlock key
- Feed both the AUTO_UNLOCK_KEY from the OS volume and the extracted FVEAutoUnlock blob from the registry into libbde, plus the secondary volume. libbde would then have all the information needed to mount the secondary volume, decrypting the FVEAutoUnlockBlob and using the result to decrypt the VMK and finally the volume's FVEK.
Any hints as to what this should look like in libbde? I can give a shot at implementing it once the right way forward is clear.
Reactions are currently unavailable