Infiltrate the Vault: Security Analysis and Decryption of Lion Full Disk Encryption Omar Choudary Felix Grobert¨ ∗ Joachim Metz ∗ University of Cambridge [email protected] [email protected] [email protected] Abstract 1 Introduction Since the launch of Mac OS X 10.7, also known as Lion, With the launch of Mac OS X 10.7 (Lion), Apple has Apple includes a volume encryption software named introduced a volume encryption mechanism known as FileVault 2 [8] in their operating system. While the pre- FileVault 2. Apple only disclosed marketing aspects of vious version of FileVault (introduced with Mac OS X the closed-source software, e.g. its use of the AES-XTS 10.3) only encrypted the home folder, FileVault 2 can en- tweakable encryption, but a publicly available security crypt the entire volume containing the operating system evaluation and detailed description was unavailable until (this is commonly referred to as full disk encryption). now. This has two major implications: first, there is now a new functional layer between the encrypted volume and We have performed an extensive analysis of the original file system (typically a version of HFS Plus). FileVault 2 and we have been able to find all the This new functional layer is actually a full volume man- algorithms and parameters needed to successfully read ager which Apple called CoreStorage [10] Although this an encrypted volume. This allows us to perform forensic full volume manager could be used for more than volume investigations on encrypted volumes using our own encryption (e.g. mirroring, snapshots or online storage tools. migration) we don’ t currently know of any other appli- In this paper we present the architecture of FileVault 2, cations. Therefore in the rest of this paper we will use the giving details of the key derivation, encryption process term CoreStorage for the combination of the encrypted and metadata structures needed to perform the volume volume and the functional layer that links this volume to decryption. Besides the analysis of the system, we have the actual HFS Plus filesystem. also built a library that can mount a volume encrypted The second implication is that the boot process is with FileVault 2. As a contribution to the research and slightly modified since the user password or other token forensic communities we have made this library open must be retrieved before being able to decrypt the data. source. Apple’ s volume encryption is equivalent to solu- tions such as PGP Whole Disk Encryption [12], True- Additionally, we present an informal security evalua- Crypt [13], Sophos SafeGuard [20], Credant [21], Win- tion of the system and comment on some of the design Magic SecureDoc [22], or Check Point FDE [23]. All and implementation features. Among others we analyze these solutions can be used on corporate laptops, which the random number generator used to create the recovery generally contain sensitive data that must be protected at password. We have also analyzed the entropy of each all times (even when the computer is turned off). 512-byte block in the encrypted volume and discovered To the best of our knowledge, Apple has not released that part of the user data was left unencrypted 1. any documentation or source code on FileVault 2, which obstructs security experts and consumers to assess the security of the system. Also, the missing documentation ∗The opinions expressed in this paper are mine alone and do not and interfaces effectively limit the development of any reflect the opinions of my employer or affiliates of my employer unless third-party tools that can help in data recovery or forensic otherwise explicitly stated. 1This was reported to Apple in 2011 and FileVault Disk Encryption investigations. has been altered accordingly. See Apple CVE-2011-3212. In this paper we present the results of our analysis 1 of FileVault 2: we were able to find most of its algo- yse it at the forensic laboratory. Even if we had physical rithms and parameters to the extent that we are able to access to a computer, we would not trust the operating read and mount a CoreStorage volume on a Linux ma- system to extract the necessary files since malware could chine. In the following sections we describe in detail tamper with the OS. With FileVault 2 enabled, we cannot the key derivation mechanisms and the encryption pro- read the disk contents unless the Mac OS is running. Al- cess. There remains unknown information in the volume though it is possible to access the disk of a Mac computer header and metadata, that we believe is used for verifica- with another Mac computer using a FireWire connection, tion routines or other functionality of CoreStorage which many times we use forensic tools on another operating does not seem to affect the read of the contents of the en- system than Mac OS and we cannot rely on remote lo- crypted volume. cations having spare Mac computers for this task. Hav- Based on these findings, we have developed a cross- ing cross-platform software to read encrypted volumes platform library that reads and mounts CoreStorage vol- solves these problems. We can simply boot the Mac com- umes. Such a library can be used to analyse the contents puter from a Linux live CD and use the software either of a particular file (or block) from an encrypted volume, locally or remotely to access the necessary files. without having to use Mac OS or even without having The second part of the motivation has been our de- physical access to the Apple computer in question (e.g. sire to have a security assessment of the system. Since by booting from a Linux live CD and connecting to the FileVault 2 can be used on corporate machines we machine via the network). needed to make sure that using this system instead of Our work provides the security and forensic commu- other known encryption solutions will not introduce vul- nity with an open source library that can be used to anal- nerabilities. yse CoreStorage volumes, having the user password or The next paragraphs provide a brief background on recovery password. It is also possible to recover the data full disk encryption after which the details of FileVault 2 from a CoreStorage volume using a private key but our are discussed. library does not support this yet. However, this merely involves updating the key derivation process, which we 2 Background fully describe in this paper. As part of our analysis we have also done an (informal) Commonly a hard disk is logically organised in multi- assessment of the security of the encryption mechanisms, ple sections, often referred to as either partitions or vol- including the random number generator mechanism used umes. These volumes can be used for various purposes, to create the recovery password. We found that some and they are often structured according to a file system data is unnecessary protected (however weakly) while format (e.g. NTFS, FAT, HFS, etc.). It is possible to some other basic mechanisms such as code mangling are have a single disk with 3 volumes, where the first volume not used at all. We have also performed an entropy test is formatted with NTFS and contains a Windows operat- on each 512-byte block of the encrypted volume and we ing system, the second volume is formatted with EXT3 found that part of the user data was left unencrypted. and contains an installation of a Linux distribution, while the third volume is formatted with FAT and only contains 1.1 Goals and motivations data (no operating system). The reader is encouraged to check the excellent book by Brian Carrier [28] for more Our primary goal has been to determine how FileVault 2 details on the topic. operates. As we will detail in the next section, this task Volume encryption is a mechanism used to encrypt involves finding how and where the encrypted volume the contents of an entire volume. This is sometimes master key is stored, how this key can be obtained from referred to as full disk encryption, which is mis- the user password or another token, what other data (the leading, since a physical disk can actually contain mul- metadata) is available and how is used, and finally how tiple volumes, each encrypted independently. The term the disk encryption and decryption are performed. full disk encryption is incorrectly used in the case As part of this process we created an open source tool of FileVault 2 and other systems such as BitLocker, that that can read and decrypt a CoreStorage volume. in fact perform volume encryption. Nonetheless, due Our motivation is twofold. First of all we needed a tool to its popularity, we will continue to use the term full for digital forensic investigations. When a computer is disk encryption in the remaining of this paper. suspected of malware or some malicious access we need Now, here is one the main problems: since we are en- to obtain certain files from the disk. If the computer is crypting the entire volume, and this volume might be the at a distant location it might not be feasible or conve- volume containing the operating system, there is no un- nient to send the computer or disk (for a Mac Book Air encrypted code left to actually boot the system. There- is not even trivial to remove the disk) in order to anal- fore the minimum code required to decrypt the operating 2 the encrypted volume master key is stored in a metadata encrypted key section. This metadata is generally stored in the same blob intermediary key disk as the encrypted volume, but on a different location.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages14 Page
-
File Size-