You are on page 1of 12

Advances in Forensic

Data Acquisition
Felix Freiling, Tobias Groß, Tobias Latzo,
Tilo Müller, and Ralph Palutke
Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)

for law enforcement as


Editor’s note: well as the difficulties of
You all know this from watching CSI: When a crime is committed, usually accessing the stored data
some form of digital evidence is left on devices such as computers, mobile as evidence.
phones, or the navigation system of a car a suspect has used. Indeed, law Smartphones are not
enforcement agencies are regularly interested in data from personal ­devices the only source of digi-
to find evidence, guide investigations, or even act as proof in a court of law. tal evidence today. Any
This tutorial article by Felix Freiling et al. mentions the San ­Bernadino case as
device that stores data
a prominent example. But how do police investigators go about a ­ ccessing
can come into the focus
this evidence? Is what is shown on TV realistic? Whereas, in times of ­classical
hard disks (HDDs), accessing data was quite easy due to the ­non-volatility of law enforcement, be it
of the memory device. However, this is getting increasingly difficult because a usual desktop or tablet
of developing technologies like SSDs, other forms of flash storage, and, in computer, a navigation
particular, for volatile memory such as RAM, with the major problem being to system, a home router or
read out data while guarding “authenticity.” any “smart” home appli-
In the past ten years, there has been some substantial development in the ance like a fridge or a
area of forensic data acquisition, which is summarized by the article. It coffee machine. In the
gives clear indications of what currently can be technically done and what
common cases of smart-
cannot be done by police investigators. So, if you watch CSI again and the
phones, law enforcement
cops need to access some digital evidence, you can tell truth from fiction.
—Jürgen Teich, Friedrich-Alexander-Universität Erlangen-Nürnberg is already aware of the
value of the data stored
on these devices, leading
 In december 2015, two perpetrators attacked to the evolution of a support industry to access this
the Inlad Regional Center in San Bernardino, CA, kill- data. The easy accessibility of such data, however,
ing 14 people. During the investigation, the FBI had has caused manufacturers to implement protective
seized the iPhone 5C of one of the perpetrators. This strategies using cryptography and security hardware,
is a common procedure since such personal devices limiting unlawful access or any access at all. The
store large amounts of private data, allowing to find more uncommon cases (like the smart appliances
out more about the actual events, the motives of the mentioned above) have yet to hit the interest of the
attackers and their possible network of helpers. This police, but it is clear that such devices will go through
case was widely publicized because Apple refused the same evolution as smartphones. We therefore
to cooperate with the FBI in granting access to the believe that users, designers, and manufacturers of
phone [1]. While the FBI finally achieved to unlock such embedded systems should be aware of the
the phone and access the data, the case highlights problems and prospects regarding the use of data
both the importance of data on embedded devices stored on these devices as evidence.
Digital Object Identifier 10.1109/MDAT.2018.2862366 To use data from such devices as evidence in a
Date of publication: 1 August 2018; date of current version: court of law, this data must be acquired in a “foren-
27 September 2018. sically sound” way. While the precise meaning of

September/October 2018 Copublished by the IEEE CEDA, IEEE CASS, IEEE SSCS, and TTTC 2168-2356/18 © 2018 IEEE
63
Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Tutorial

this term varies depending on the juridical system, probability of intentional or unintentional changes,
it basically states that the acquired data should be thus forming the starting point of a documentation
trustworthy, i.e., the risks of accidental or inten- trail of the evidence usually called the chain of
tional evidence tampering are convincingly mini- custody. There exist excellent handbooks for first
mized. According to good forensic principles, such responders on how to identify and seize digital evi-
evidence should be as “authentic” and “original” dence [2], [3]. The main focus until recently, how-
as possible, allowing to make conclusions based ever, has been on persistently stored data, mainly on
on the evidence as if it had just been seized at the HDDs, for which general procedures on acquisition
scene of the crime. Simply claiming that a specific and interpretation are well developed [4]. Apart
file that is shown in a court “was found on and was from the general principle to acquire evidence in
copied from the suspects computer with xcopy by the order of decreasing volatility [5], the standard
officer Smith” is not sufficient today since copying practices for the acquisition of volatile data such as
of files using xcopy changes file system timestamps RAM are much less developed.
(i.e., changes some aspects of the evidence) and
the possibilities of other (un-)intentional changes HDDs
by any investigator apart from officer Smith cannot Classical HDDs are still the dominant form of stor-
be ruled out. The fact that such “unsound” methods age and, therefore, digital evidence in practice. HDDs
in data acquisition can have dramatic real-world store their data on a fixed stack of rotating magnetic
consequences (like false court decisions) reinforces platters. The mechanical storage machinery, i.e., man-
the importance that academics and professionals in aging the physical rotation and reading data using
computer science and computer engineering know moving actuator arms from the magnetic surface, is
about the intricacies of this field. governed by a small embedded computer system in
Within the big picture of forensic computing itself that runs within the controller board physically
(often also called digital forensic science) data attached to the disk casing. The HDD is attached to
must be examined and analyzed—after it has been the computer system over standardized interfaces,
acquired—with respect to the legal questions con- the most popular currently being Serial AT Attachment
cerning the crime at hand, usually following pro- (SATA).These interfaces do not only define the physi-
cedures that are standardized within different legal cal dimensions of the attachment cables but also the
systems [2]. The area is developing quickly. We there- communication protocol “spoken” over the cable.
fore necessarily focus on one aspect while directing Generally, the controller interface offers access
the reader elsewhere [3]–[5] for w ­ ell-written and to an HDD as a block device, i.e., read and write
broader overviews of the field. accesses occur at the granularity of a disk sector
We now give an overview of forensic data acqui- which usually consists of 512 bytes. Conceptually, the
sition with a specific focus on low-level storage HDD offers its sectors as a continuous sequence of
devices like modern hard disk drives (HDDs), solid blocks addressed using a logical block address start-
state drives (SSDs), flash storage in the form of SD ing with 0. Although the basic design of HDDs has
cards or USB sticks and finally RAM. We begin with not changed much during the past 30 years, the level
an overview of current practices today (in the “Data of integration and equally their storage capacity has
acquisition practices today” section) and later give increased dramatically. Today, it is common to find
an overview of recent research results in the area HDDs with a storage capacity of several terabytes.
(in the “Recent advances” section) that might not
be widely known. We conclude with some general Disk imaging. The common and generally ac-
thoughts on the state and future of this research area. cepted way to acquire data from an HDD is to
access it through its hardware interface direct-
Data acquisition practices today ly. Therefore, usually, the HDD is disassembled
Data acquisition is a critical point in the collec- from its original computer and attached to a spe-
tion of evidence since it defines the state of evidence cial acquisition computer. To prevent any acci-
that will be the basis for analysis. Evidence acqui- dental changes to the data stored on the HDD,
sition as well as any subsequent handling of the a special write blocking device that blocks all
seized data must be documented to decrease the SATA write commands from passing to the HDD

64 IEEE Design&Test

Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
is plugged between the evidence HDD and the anal-
ysis computer. Using specific software, individual
blocks from the HDD are read and stored on the ac-
quisition computer in a file. While many commercial
software tools exist to perform this action, the well-
known Linux command dd can also be used. If the
entire HDD is acquired in this way, the resulting file
is usually called an imaged copy (or simply image)
of the original HDD. The result is an image file con-
taining a bitwise 1:1 copy of the original disk. Since
this process does not involve the interpretation of
any data structures like partitions or file systems on Figure 1. Software-based FDE compared to
the disk, the current practice of evidence acquisi- hardware-based FDE. Shaded areas repre-
tion for HDDs also allows to retrieve inconsistent, in- sent encrypted data.
complete, or otherwise damaged data from the disk.
To increase trust in the copying process, it is drive, i.e., on firmware level (hardware-based FDE).
advised that the content of the image is once com- Historically, FDE became widely available to users
pared with the content of the original disk. All this through software-based solutions such as BitLocker
must be reliably documented as part of the chain of (Windows), FileVault (Mac), and dm-crypt (Linux/
custody. It has become a standard practice to docu- Android). Hardware-based FDE is more relevant in
ment the content of the image file by computing a the field of SSDs.These drives are commonly referred
cryptographic hash value of the file. Similar to a fin- to as self-encrypting drives (SEDs), because they per-
gerprint, the hash value is characteristic to the con- form encryption inside the disk drive controller, such
tent of the file, meaning that a change of just 1 bit that encryption keys are not present in a computer’s
results in a completely different hash value. Although main memory or CPU. Note that investigators can still
it is still popular to use a single hash algorithm like copy the content of an encrypted disk. However, the
MD5 today, it is recommended to use at least two dif- resulting data cannot be interpreted without access
ferent hash algorithms and to use more secure ones to a secret key or passphrase necessary for the de-
like Secure Hash Algorithm (SHA)-2 or SHA-3. cryption. If the suspect does not cooperate and re-
For HDDs, the initial hash value taken during veals the passphrase, investigators must use of brute
evidence acquisition is one of the most important force or, as we explain in “Disk encryption and SEDs,”
pieces of information related to the evidence since the rather new form of hot plug attacks.
it can be used to prove that any further copy taken
during the investigation also is equal to the original. Flash storage
Therefore, hash values preserve the integrity of the Flash storage, as it is used in USB sticks, mem-
evidence. Note that this is based on the assumption ory cards, or SSDs, is based on transistor cells that
that the contents of the HDD do not change if no can, briefly spoken, persistently store 1 bit, even is no
write command is issued through its interface, an active current is provided. For the technology com-
assumption that is generally justified with modern monly in use today (NAND flash based on floating
HDDs, but not so with SDDs, as we will see below. gate transistors) and in contrast to HDDs, reading
and writing data are two completely different oper-
Problems. Today, disk encryption is the most com- ations (not the same operation with a different lead-
mon threat to evidence acquisition for HDDs. Al- ing sign + or −): deleting data involves applying a
though it is also possible to protect individual files rather high voltage to the memory cell which causes
using cryptography, we focus here on full disk encryp- “wear.” This results in a maximum number of write/
tion (FDE) meaning the process of encrypting the en- delete cycles for this technology, an inherent limita-
tire disk volumes, meaning whole drives or partitions. tion of the activity lifetime of such flash storage.
As illustrated in Figure 1, disk encryption can either To optimize the lifetime of flash memory, it is
be performed inside the operating system, i.e., on possible to distribute the “wear” of memory cells to
kernel level (software-based FDE), or inside a hard the entire block of memory. To this end, memory

September/October 2018
65
Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Tutorial

controllers apply proprietary wear leveling algo- The software-based approaches are different,
rithms. To optimize wear leveling, a specific com- dependent on the targeted smartphone model.
mand called TRIM was introduced to the ATA Since the smartphone market is mainly dominated
standard. With TRIM, the operating system can tell by Android and iOS, a brief overview of tools and
the disk which sectors it has just deleted. These sec- techniques for data acquisition for these OSs is given
tors can then be reclaimed by the disk (using gar- in the following.
bage collection algorithms). For the case of SSDs, the
controller pretends to be spinning HDD performing Android. On Android, a bitwise 1:1 copy of the
read and write accesses. But in the background, con- entire storage can be acquired by using the Linux
tinuous remapping and garbage collection are taking command dd if the Android Debug Bridge (ADB)
place asynchronously. Nisbet et al. [6] showed that is enabled. This method requires root privileges on
the deleted data vanish from the disk rather quickly the smartphone. Root privileges can be gained by
for the current SDDs. This means that the content of booting a custom recovery image, which requires
a disk can change if merely switched on. This has the bootloader to be unlocked, or alternatively,
severe consequences toward forensic data handling: the su command can be used, typically present
calculating hashes over the entire disk is not a relia- on rooted devices. Rooting a device must be per-
ble technique anymore to prove that evidence has formed by booting into a recovery image or with
not changed. Only logically existing content is guar- exploiting a vulnerability in the Android OS. With
anteed to remain, but raw data can disappear from bootloaders that cannot be unlocked, as enforced
SSD that makes it harder to argue that it was there by some manufacturers, only the exploit-based
previously. If evidence acquisition and hashing are method is feasible when an unpatched known
restricted to logically existing content, previous pro- vulnerability is present.
cedures can be maintained. Some manufacturers allow unlocking their boot-
The situation is slightly different for storage loaders, including Google’s Nexus and Pixel series.
based on MultiMedia Card (MMC) or eMMC technol- Also in this case, however, the unlocking wipes the
ogy, compact memory chips with a built-in control- entire user data partition, thus rendering this method
ler, which are commonly used in USB drives or SD infeasible for forensic data acquisition. For data
memory cards. The eMMC standard defines 64 com- acquisition, the bootloader of an Android smart-
mands that can be issued to memory (including of phone must typically be unlocked before the seizure,
course read and write to a memory block). While the which is commonly not the case. All manufacturers
current standard for eMMC [7] specifies a command ship smartphones with the bootloader being locked
called TRIM, its semantics do not necessarily require as the default.
that any future read to that block returns zeros. In If unlocking the bootloader is not feasible, only
practice, eMMC chips hardly do any garbage collec- logical data acquisition can be performed. Logical
tion, and therefore, the risks of losing evidence as data acquisition via ADB, however, is oftentimes also
with SSDs are considerably reduced. Therefore, USB difficult in practice for the same reasons. Virtually all
sticks and memory cards can usually be acquired manufacturers ship their phones with the ADB being
like HDDs, i.e., by acquiring a 1:1 image copy and disabled by default. Therefore, first, USB debugging
computing a hash value. would have to be enabled, and second, the specific
ADB host PC would have to be confirmed. Both can
Smartphones be enabled with user access to the phone, e.g., if
Data acquisition on smartphones can be per- none or only a weak screen lock is present. In that
formed by several methods that are divided into case, ADB subcommands like pull, backup, or shell
software and hardware-based methods. While direct dumpsys can subsequently be called to extract the
hardware access to flash memory is often cum- user data. Only specific information can be extracted
bersome and unrewarding due to the small fragile with those commands, not a full disk image. Shell
design of the embedded integrated circuits, respec- dumpsys allows to access service information, e.g.,
tively, circuit boards and device-dependent FDE, saved Wi-Fi points and application usage statistics.
software-based methods are more promising and With a pull, individual files can be extracted if the
oftentimes easier to perform. user permissions allow so. Backup can be used

66 IEEE Design&Test

Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
to extract the application data but needs another Software-based methods. Standard practice
confirmation on the device, only possible if the t­ oday is to acquire the contents of RAM using special
screen is unlocked. software applications [10] which use a kernel driver
to systematically run through the virtual or physical
iOS. For iOS smartphones, there exist two methods address space and copy the contents of each mem-
for data extraction. The first method uses the provid- ory page to a file. Similar to disk images, a copy of a
ed backup functionality of iOS. The other requires a machine’s RAM is called a memory image. Memory
jailbroken device, but allows to extract the complete images can later be analyzed with special tools like
filesystem. Volatility [11] or Rekall [12].
Backups of iOS can be created by connecting Software tools have two main problems. First,
the seized device to a PC and using iTunes to start they change the contents of RAM before they start
the backup process. The first time if an iOS device creating the image. This reduces the soundness of
is connected to an unknown PC, access must be the acquisition approach because the evidence is
confirmed by entering the device PIN code. A lock- changed, but it is accepted as long as changes in
down record will be created for the PC which allows RAM are small and well documented. Second (and
feature connections without confirmation. If the more importantly), software methods rely on the ser-
PIN code is unknown, it can be extracted from the vices of the underlying operating system to perform
lockdown record of PCs the device was already con- correctly (hardware drivers and interrupt handlers).
nected to. Such PCs may also serve as a source of Therefore, if the investigated system is subverted by
evidence from previously created iTunes backups. malicious software, there is no guarantee that the
Backups contain all personal data including pho- result of memory imaging will be correct.
tos, SMS, and calendar entries. Note that emails
are not included in backups. For the first time, if a Cold boot attacks. Halderman et al. [13] published
backup is created from an iPhone, the user can set an ingenious method to acquire a memory image of
a device-dependent password. If a password is set, a running computer by exploiting the remanence
feature backups will be encrypted; otherwise, the effect of the modern RAM technology [14], [15]. In
backups are unencrypted. contrast to common belief, memory contents do not
What is known as rooting on Android is called disappear immediately after power is cut, but rather
jailbreaking on iOS. All jailbreaks must exploit vul- fade away gradually over time. In practice, it can take
nerabilities in the iOS system, an official approach as long as 30 seconds for memory contents to fade
from Apple, e.g., via unlocked bootloaders, does not away completely. One aspect of this effect is that low
exist. With a jailbroken device, access to the com- temperatures slow down the fading process, such that
plete file system can be gained and so basically all by cooling down RAM chips, the remanence interval
data can be copied via Secure Shell. This method, can be extended from 30 seconds up to 10 minutes.
however, requires the device to be jailbroken and The basic idea of memory acquisition using cold
the root password to be known, and hence, is often boot is to reboot a system with a small operating sys-
not feasible in practice. Some people leave the tem from a USB drive and then to read out RAM and
default root password alpine unchanged. write it into a file. In principle, cooled down RAM
chips can also be physically unplugged from one sys-
RAM tem, replugged into another PC, and read out there.
The content of RAM is an increasingly valuable This variant is more generic than the reboot variant,
piece of digital evidence, because it can be used because it works irrespectively of Basic Input Output
to witness actions by the computer that not neces- System and boot sequence settings. However, it
sarily manifests themselves persistently. Examples requires a compatible target system for the specific
are searches for information on just-terminated pro- memory technology and a lot of practice.
cesses or network connections [8], investigations
into malicious software that runs only in memory Problems. In contrast to software-based approach-
[9], or retrieving cryptographic keys or passwords es, memory acquisition via cold boot cannot be
from memory (used for encrypted email, password subverted by malicious software, because the oper-
managers, or software-based FDE). ating system is fully controlled by the investigator.

September/October 2018
67
Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Tutorial

Therefore, regarding forensic soundness, cold boot appears to exist no obvious way to verify that the
is a very good approach. Cold-boot attacks, howev- firmware on the EEPROM is original since there exist
er, have been observed to be impractical for modern many small differences between EEPROM contents
systems based on double data rate (DDR)3/DDR4 even on drives of the same model. More dramat-
RAM [16], an issue which was investigated (and ically, it is impossible to verify the content of the
partly solved only recently, see “Recent advances”). service area because this requires executing code
(from the EEPROM) that cannot be verified. Ideally,
Recent advances vendors would use mechanisms like signed firmware
The current practices in forensic data acquisition to protect against simple firmware manipulations.
are well developed in most parts, but they always must Ideally, manufacturers should offer a standardized
adapt to technological changes. We now outline sev- low-level interface to the HDD contents that cannot
eral recent results that highlight certain problem areas be subverted. With the current state of affairs, a small
and need to be incorporated into current practices. shadow of doubt remains on the authenticity of HDD
data if firmware manipulations cannot be ruled out.
HDDs
Although the acquisition of HDDs appears to be Disk encryption and SEDs
an established practice, Gruhn [17] recently revis- As mentioned above, even if a disk drive is deliv-
ited this area and raised several noteworthy issues ering data to the user, this data must not necessar-
that challenge the state of the art. Since the data ily be of any use to an investigator if it is encrypted
handling on disk is performed by the firmware of the and the encryption key is unknown. Recently, Müller
HDD, successful manipulations of the firmware can and Freiling [19] published a comprehensive survey
result in incorrect data acquisition [18]. By analyz- on how to circumvent disk encryption techniques. To
ing several Western Digital hard drives, Gruhn [17] attack software-based FDE techniques like Microsoft
described possibilities to check the firmware of a Bitlocker, it is usually sufficient to be able to access
device and investigated possibilities to perform data the machine’s RAM where the encryption key is
acquisition despite manipulated firmware. stored. Accessing the unencrypted content of a hard
To understand his results, it is necessary to look disk therefore can be reduced to accessing the con-
into the anatomy of a typical HDD in more detail. As tent of RAM. This procedure, however, is futile when
mentioned above, an HDD is a small embedded com- trying to access SEDs, because the encryption key is
puter into itself, and as such, it performs a boot process always kept within the disk and never leaks to RAM.
when it is switched on. It executes a small initial piece Interestingly, it is often possible to directly read out
of code taken from an unmodifiable ROM which loads the contents of an SED if the computer to which it is
a larger piece of code from a (larger and modifiable) attached is found to be switched on. Müller [20], [21]
electrically erasable programmable read-only memory observed that standard SEDs commonly do not
(EEPROM) [17, p. 139]. Since the size of the complete detect whether SATA cables are unplugged, as
firmware is considerable, the remaining part of the long as they stay connected to power. An SED gets
firmware that does not fit into the EEPROM is stored “locked” only if its power connection is cut. If its
directly on the disk in a special Service Area. This is data connection is cut, it stays unlocked and data
a hidden area on the platter that cannot be used by can be read out. This leads to the following hot plug
normal users. Gruhn [17] reports that there often are attack scenario: with physical access to a running
vendor specific commands that allow to access and PC, the SATA connector of an SED is unplugged
update this area using the standard (SATA) interface. and then replugged to a PC that is under control
These commands, however, are not generally known. of the investigator. During this procedure, the orig-
Obviously, the authenticity of the data delivered inal PC acts as an energy supplier and keeps the
by the HDD depends on the correctness of its firm- disk powered on. The second PC, which is under the
ware running. To verify that this firmware has not control of the investigator, acts as a data collector.
been altered, it is necessary to check the content While the original PC crashes a few seconds after disk
of the EEPROM as well as the content of the service removal, the SED stays unlocked and the investigator
area. Reading the content of the EEPROM can be can create a disk image of the SED in unencrypted
cumbersome in some cases [17, p. 142], and there form without the need to know the password.

68 IEEE Design&Test

Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Obviously, the approach requires the system advantages of FBE are mainly usability, such as a
to be running. Since server systems are commonly direct boot with single sign-on.
running 24/7, they constitute a perfect target for For a Galaxy Nexus from Samsung with Android
hotplug attacks. Another advantage of desktop and 4.0, the first Android device that was ever availa-
server systems is their construction type: most often, ble with FDE, Muller and Spreitzenbarth [25] have
SEDs are connected to the motherboard with flexi- shown how to break disk encryption using cold boot
ble SATA cables that can be replugged into nearby attacks to retrieve the encryption key from RAM.Their
machines easily. In laptops, however, the power and approach requires the bootloader to be unlocked
data connection of an SED often cannot be han- before the attack to recover full-disk images, since the
dled independently as in most desktops. However, user partition gets wiped during unlocking the boot-
rather surprisingly, while SATA SEDs require an ATA loader. For devices with a locked bootloader, Muller
password on boot, they unlock the disk automati- and Spreitzenbarth [25] were able to retrieve RAM
cally on wakeup from suspend-to-RAM (Advanced images, including recently visited websites, taken
Configuration and Power Interface state S3) [19]. photos, and more. Nevertheless, the reproducibility of
Therefore, a disk being in state S3 can be accessed their results for other devices than the Galaxy Nexus
as follows. In state S3, power extension cables can and newer Android versions remains a difficult task.
be installed between the drive and the laptop. Then,
the laptop is woken up and, the SED gets unlocked, RAM
and a usual hot-plug attack can be performed. Based on the quality criteria developed by Vomel
and Freiling [26] for memory images, several recent
Smartphones works have investigated the strengths and weak-
While encrypting laptops and desktop PCs is still nesses of different techniques to acquire a memory
uncommon today, because Bitlocker is still not part image of a computer. Vomel and Stuttgen [27] were
of the Windows 10 Home edition, more and more the first to systematically evaluate different memory
end-users encrypt their smartphones. Both Android acquisition tools. Their approach instruments the
and iOS offer easy-to-use encryption for free and software and therefore relies on the availability of the
many vendors, such as Apple, and encrypt their smart- source code. In contrast to that, Gruhn and Freiling
phones even by default.As a consequence, the case of [28] presented an approach that can evaluate acqui-
encrypted phones is of gaining importance for practi- sition tools by having programs write a predictable
cal investigation cases. Particularly, unlocking iPhones, memory pattern and later analyze the images taken
which are encrypted by default, was often requested by different tools regarding that pattern. In their stud-
by law enforcement agencies in the past [1]. ies, cold boot performed best, closely followed by
Due to its closed source nature, however, unlock- software-based approaches.
ing iPhones is a difficult task not well documented
by the academic community. According to our knowl- Software-based memory acquisition. The vast
edge, professional companies such as Cellebrite and majority of today’s memory acquisition tools is im-
Grayshift offer unlocking services for iPhones starting plemented as kernel drivers. Besides easy develop-
at USD 15,000 per unlock [22], [23]. It is not publicly ment and fast deployment, kernel drivers allow to
known how these products work, but most likely be installed even after the occurrence of a potential
they combine exploits against iOS with brute force incident. The well-known memory forensics frame-
attacks against the user PIN. As it is not acceptable for work Rekall integrates a sophisticated memory ac-
most users to enter a secure password each time using quisition tool called Pmem [29]. The tool supports
their phone, most users rely on insecure PINs of five the acquisition of physical memory on the most
digits only, being a perfect target for brute force attacks. considerable operating systems, namely, Linux, Win-
On Android, due to the market fragmentation of dows, and MacOS. In contrast to other driver-based
different vendors and devices, the situation depends acquisition tools, Pmem only relies on a minimal set
on the exact phone model. While Android versions of kernel Application Programmers’ Interface (APIs).
up to 4.0 support no encryption at all, Android ver- Hence, only the loading mechanism depends on the
sions from 4.0 to 6.0 use FDE [24], and Android ver- operating system functionality. As this is a very com-
sions since 7.0 use file-based encryption (FBE). The mon procedure, a malware cannot simply restrict

September/October 2018
69
Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Tutorial

Rogue Page Virtual Address


Virtual Address #PML4 #PDPT #PD #PT Physical Page Offset Physical Address
Space Space
47 38 29 20 11 0
8 8 8 8

Rogue Page
Arbitrary Frame
PDPTE
PTE
PML4E

PDE Rogue Frame


PML4 PDPT PD PT

CR3

Figure 2. To systematically access physical memory, Pmem allocates a single rogue page in its cor-
responding rogue page frame, and then manipulates the rogue page’s PTE entry to remap the page
to an arbitrary page frame in physical memory. By doing this, it is possible to systematically access
the entire physical memory without much support from the underlying operating system.

the system from loading a driver, as this would likely the availability of compatible build tools, it is not
reveal its own presence. always possible to overcome this problem. To avoid
Instead of requesting the kernel to map portions of the necessity of building the acquisition tool on the
the physical memory, Pmem entirely implements the target system, Stüttgen and Cohen [30] came up with
procedure on its own. Therefore, it allocates a single a method to inject a stripped down and precompiled
page in nonpageable memory, called a rogue page. version of Pmem into a compatible host driver. After
Instead of trusting the kernel functionality to obtain statically relinking and manually relocating Pmem’s
the rogue’s corresponding page table entry, Pmem driver, it can be loaded together with the host driver.
initially walks the paging hierarchy itself. This ensures Currently, this approach is also a part of the Rekall
protection against malicious modifications during the framework.
translation process. By remapping the frame number
of the rogue’s page table entry to an arbitrary physical Cold-boot on DDR3 and DDR4
frame, Pmem has the chance to access the entire phys- In 2013, Gruhn and Müller [16] reported on
ical address space. To create a dump of the physical problems while performing cold boot attacks in the
memory, the driver subsequently maps each physical modern DDR3 RAM technology, since the memory
frame before accessing its contents through the corre- images appeared to be random for reasons inherent
sponding virtual address of the rogue page. To prevent in that technology. With increasing speed of semi-
Pmem from acquiring a cached version of a page, it conductors, their undesirable parasitic effects also
ensures to flush both caches and translation lookaside grow in magnitude. To counteract this and starting
buffers before accessing the rogue page. From there with DDR3, RAM manufacturers perform memory
on, the system’s MMU redirects further access to the scrambling within the memory controllers.
rogue’s virtual address to the physical target page. To In DDR3, scrambling is performed by running
finally create an image of the system’s memory, Pmem the data through an LFSR which is initialized with
copies the rogue page’s content to its user space buff- a seed. Recently, Bauer et al. [31] presented an
ers from where they are written into a file. Figure 2 approach to successfully “descramble” images of
depicts Pmem’s process of remapping physical mem- RAM acquired by cold boot. The approach is based
ory through the rogue page. on reconstructing the LFSR and its seed from a small
Compared to other operating systems, Linux piece of memory for which the (unscrambled)
comes with a wide variety of possible kernel content is known (analogously to a known plain-
­configurations. To be able to load Pmem’s driver, text attack). Later, Yitbarek et al. [32] extended
the driver needs to be built in a way that matches this work to also successfully descramble memory
the kernel configuration. Since many systems lack images of DDR4 RAM.

70 IEEE Design&Test

Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Effects of virtualization All virtualization-based acquisition tools assume
Server systems are often virtualized. An inherent to be deployed before malware is installed on the
advantage of a virtualized system is that the admin- system or present malware is not sophisticated and
istrator is able to halt specific guests and to acquire so does not compromise their results. HyperSleuth
data atomically. Thus, an investigator needs the cor- addresses this issue with a challenge–response
responding privileges to control the guest, i.e., to protocol for the installation process. However,
control the host system. the effectiveness cannot be evaluated. Furthermore,
The HDD of a virtualized system is usually repre- the investigator usually needs high privileges to the
sented as a file, e.g., in the case of VirtualBox1 with system to either install a hot-pluggable hypervisor
a.vdi filename extension. Therefore, to acquire the like HyperSleuth or to access the forensic respec-
HDD of the guest one only needs to acquire the cor- tively built-in acquisition functionalities.
responding disk image file. The Forensic OpenStack Recently, Palutke and Freiling [36] researched
Tools (FROST) [33] is a forensic suite for the pop- ways to counter software-based memory acquisition
ular cloud-computing platform OpenStack.2 FROST tools that claim to be resilient against antimemory
allows to acquire virtual disks, API logs, and guest forensics. In this regard, they presented a novel root-
firewall logs in a forensically sound manner without kit technique that combines hidden memory with vir-
trusting the guest. tualization that is based on Intel’s VT-x technology.
Since the hypervisor’s task is to manage the guest’s The rootkit, called Styx, virtualizes running ×64 Linux
RAM, the corresponding virtualization solution often systems while entirely residing in hidden memory.
comes with memory acquisition support. A common Stuttgen and Cohen [37] define hidden memory as
way to acquire the RAM of a guest virtual machine certain address ranges that are backed by accessible
(VM) is to suspend it, save the suspend file that con- RAM, but neither used by the operating system nor
tains memory, and then resume it. Obviously, the any device. To isolate and protect its memory foot-
drawback of that method is that the guest has some print, Styx virtualizes the guest’s physical memory
time offline. Virtual Machine Introspection (VMI) through Intel’s extended page tables mechanism.
allows to monitor the complete RAM or only specific From the guest’s perspective, the rootkit’s memory
objects in RAM while the guest is running. LibVMI looks like an inaccessible address range that is not
[34] is a library that allows to access the memory of backed by any accessible RAM. As a result, the com-
a running VM. LibVMI also supports Rekall profiles bination of hidden memory and hardware-based vir-
for VMI of Linux or Windows systems. tualization provides advanced malware in a stealthy
Often client systems are not virtualized. However, way to subvert the acquisition process of modern
virtualization makes it possible for an investiga- forensic tools. While Styx can be used to hide mali-
tor to acquire RAM in a stealthy, trustworthy, and cious payloads, it is also possible to use it as a very
forensically sound way. HyperSleuth [35] is a tiny stealthy forensic acquisition tool.
forensic framework that virtualizes a running sys- Summarizing, virtualization can facilitate the
tem leveraging Intel’s Virtualization Technology acquisition process dramatically. However, the
(VT-x) technology. The framework comes with investigator usually needs high privileges to the host
three forensic applications. First, a lazy memory system, first. If the system is not virtualized yet, there
dumper uses a dump-on-write and dump-on- idle is basically the possibility to virtualize the running
technique. This allows an atomic fingerprint at the system on-the-fly and to acquire its data.
time of the request. The other applications are a sys-
tem call tracer and a lie detector, i.e., HyperSleuth Open problems and fundamental
has in-guest tools to get information about the state challenges
of the system. If this information differs from the The struggle for forensic evidence acquisition
hypervisor’s perspective, something is going wrong. always faces the dilemma to grant law enforcement
Unfortunately, HyperSleuth’s code and binary are sufficient lawful access to data on the one hand and
not publicly available. at the same time be sensitive to the privacy of cit-
izens. In order to shape the field in sensible ways,
system designers must be aware of the amount of
1
https://www.virtualbox.org (personal) data stored on a device and how (easy)
2
https://www.openstack.org it can be accessed.

September/October 2018
71
Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Tutorial

Considering the state of practice in digital [6] A. Nisbet, S. Lawrence, and M. Ruff, “A forensic
evidence acquisition and recent advances in this analysis and comparison of solid state drive data
field, it appears mandatory for system designers that retention with trim enabled file systems,” in Proc. 11th
1) data that does not need to persist reboots should Aust. Digital Forensics Conf., 2013, pp. 103–111.
not be written to persistent storage and that 2) sensi- [7] Joint Electron Device Engineering Council (JEDEC),
tive data should be explicitly wiped (overwritten) in “Embedded multi-media card (emmc), electrical
RAM to prevent forensic practitioners from intruding standard (5.1),” Document JESD84-B51, 2015.
privacy. However, securing data from all forms of [Online]. Available: https://www.jedec.org/standards-
(legal) access is costly and involves user coopera- documents/docs/jesd84-b51
tion (e.g., strong PIN codes, pairing of devices, etc.). [8] T. M. Vidas, “The acquisition and analysis of random
So, obviously, security comes at a price. Since foren- access memory,” J. Digital Forensic Practice, vol. 1,
sic data acquisition can have dramatic real-world no. 4, pp. 315–323, 2006.
consequences, we again believe that users, design- [9] L. O’Murchu and F. P. Gutierrez, “The evolution of the
ers, and manufacturers of embedded systems should fileless click-fraud malare Poweliks,” Symantec Corp.,
be aware of the problems and prospects regarding Symantec Security Response Version 1.0, 2015.
evidence acquisition. At least the manufacturers [10] S. Vömel and F. C. Freiling, “A survey of main
of storage devices should offer an effective secure memory acquisition and analysis techniques for the
delete option, e.g., in case the device is sold. windows operating system,” Digital Investigat., vol. 8,
no. 1, pp. 3–22, 2011. [Online]. Available: https://doi.
Acknowledgments org/10.1016/j.diin.2011.06.002
This work was supported by the following agen- [11] The Volatility Foundation, “Volatility foundation
cies and projects: Federal Ministry of Education (homepage),” 2018. [Online]. Available: http://
and Research (BMBF), Germany, as part of the www.volatilityfoundation.org/
projects DINGfest FIDI and CELTIC + SENDATE [12] M. I. Cohen, “Characterization of the windows kernel
“Tailored Network for Data cEnters in the Metro”; version variability for accurate memory analysis,”
German Research Foundation (DFG) as part of Digital Investigat., vol. 12, no. Supplement-1,
the Transregional Collaborative Research Centre pp. S38–S49, 2015.
“Invasive Computing” (SFB/TR 89).  [13] J. A. Halderman et al., “Lest we remember: cold-boot
attacks on encryption keys,” Commun. ACM, vol. 52,
 References no. 5, pp. 91–98, 2009. [Online]. Available: http://
[1] A. Holpuch, “Tim Cook says Apple’s refusal to doi.acm.org/10.1145/1506409.1506429
unlock iPhone for FBI is a ‘civil liberties’ issue,” The [14] P. Gutmann, “Data remanence in semiconductor
Guardian, Feb. 2016. [Online]. Available: https:// devices,” in 10th USENIX Security Symp., Aug. 13–17,
www.theguardian.com/technology/2016/feb/22/tim- 2001, Washington, DC, 2001. [Online]. Available:
cook-apple-refusal-unlock-iphone-fbi-civil-liberties http://www.usenix.org/publications/library/proceedings/
[2] US Department of Justice/National Institute of Justice, sec01/gutmann.html
“Electronic crime scene investigation: A guide to first [15] S. P. Skorobogatov, “Data remanence in flash memory
responders,” 2nd Edition, 2008. [Online]. Available: devices,” in Proc. Cryptogra. Hardware Embed.
https://www.nqrs.gov/pdffiles1/nij/219941.pdf Syst.—CHES 2005, 7th Int. Workshop, Edinburgh, UK,
[3] US Department of Justice, “Searching and seizing Aug 29–Sep. 1, 2005, pp. 339–353.
computers and obtaining electronic evidence in [16] M. Gruhn and T. Müller, “On the practicability of cold
criminal investigations,” 2009. [Online]. Available: boot attacks,” in Proc. 2013 Int. Conf. Availability
http://www.justice.gov/criminal/cybercrime/docs/ Reliability Security (ARES 2013), Regensburg,
ssmanual2009.pdf Germany, Sep. 2–6, 2013, 2013, pp. 390–397. [Online].
[4] B. Carrier, File System Forensic Analysis, Addison- Available: https://doi.org/10.1109/ARES.2013.52
Wesley, 2005. [17] M. Gruhn, “Forensic limbo: Toward subverting hard
[5] E. Casey, Digital Evidence and Computer Crime— disk firmware bootkits,” Digital Investigat., vol. 23, pp.
Forensic Science, Computers and the Internet, 138–150, 2017. [Online]. Available: https://doi.org/
3rd Edition. Academic Press, 2011. [Online]. 10.1016/j.diin.2017.10.003
Available: http://www.elsevierdirect.com/product. [18] J. Zaddach et al., “Implementation and implications
jsp?isbn=9780123742681 of a stealth hard-drive backdoor,” in Proc. Ann.

72 IEEE Design&Test

Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Comput. Security Appl. Conf. (ACSAC ’13), org/conferences/dfrwseu-2016/sessions/evaluating-
New Orleans, LA, USA, Dec. 9–13, 2013, 2013, atomicity-and-integrity-correctmemory-acquisition
pp. 279–288. [Online]. Available: http://doi.acm. [29] M. Cohen, “Rekall memory forensics framework,” 2014.
org/10.1145/2523649.2523661 [Online]. Available: http://www.rekall-forensic.com
[19] T. Müller and F. C. Freiling, “A systematic assessment [30] J. Stüttgen and M. Cohen, “Robust linux memory
of the security of full disk encryption,” IEEE Trans. acquisition with minimal target impact,” Digital
Dependable Sec. Comput., vol. 12, no. 5, pp. 491–503, Investigat., vol. 11, no. 1, pp. S112–S119, 2014.
2015. [Online]. Available: https://doi.org/10.1109/ [Online]. Available: https://doi.org/10.1016/
TDSC.2014.2369041 j.diin.2014.03.014
[20] T. Müller, “(Un)Sicherheit Hardware-basierter [31] J. Bauer, M. Gruhn, and F. Freiling, “Lest we forget:
Festplattenverschl üsselung,” in The 29th Chaos Cold-boot attacks on scrambled DDR3 memory,” in
Comm. Congress (29c3), University of Erlangen- Proc. 3rd Ann. DFRWS Euro. Conf., Elsevier,
Nuremberg. Hamburg, Germany: Chaos Computer 2016, pp. 65–74. [Online]. Available: https://www.
Club (CCC), Dec 2012. dfrws.org/conferences/dfrwseu-2016/sessions
[21] T. Müller, T. Latzo, and F. Freiling, “Self-Encrypting /lest-we-forget-cold-boot-attacks-scrambledddr3-
Disks pose Self-Decrypting Risks: How to Break memory
Hardware-based Full Disk Encryption,” Technical [32] S. F. Yitbarek, M. T. Aga, R. Das, and T. M. Austin,
Report Friedrich-Alexander University of Erlangen- “Cold boot attacks are still hot: Security analysis of
Nuremberg, pp. 1–10, 2012. memory scramblers in modern processors,” in Proc.
[22] T. Fox-Brewster, “The feds can now (probably) unlock 2017 IEEE Int. Symp. High Perform. Comput. Arch.
every iphone model in existence—Updated,” Forbes, (HPCA 2017), Austin, TX, Feb. 4–8, 2017, 2017, pp.
Feb. 2018. [Online]. Available: https://www.forbes.com/ 313–324. [Online]. Available: https://doi.org/10.1109/
sites/thomasbrewster/2018/02/26/governmentcan- HPCA.2017.10
access-any-apple-iphone-cellebrite [33] B. Martini and K.-K. R. Choo, “Distributed filesystem
[23] T. Fox-Brewster, “Mysterious $15,000 ‘GrayKey’ forensics: Xtreemfs as a case study,” Digital
promises to unlock iPhone X for the feds,” Forbes, Investigat., vol. 11, no. 4, pp. 295–313, 2014.
Mar. 2018. [Online]. Available: https://www.forbes. [34] H. Xiong, Z. Liu, W. Xu, and S. Jiao, “Libvmi: A library
com/sites/thomasbrewster/2018/03/05/appleiphone- for bridging the semantic gap between guest OS
x-graykey-hack and VMM,” in 12th IEEE Int. Conf. Comput. Inform.
[24] J. Götzfried and T. Müller, “Analysing android’s full Technol. (CIT 2012), Chengdu, Sichuan, China,
disk encryption feature,” J. Wireless Mobile Networks Oct. 27–29, 2012, 2012, pp. 549–556. [Online].
Ubiquitous Comput. Dependable Appl., vol. 5, Available: https://doi.org/10.1109/CIT.2012.119
pp. 84–100, Mar. 2014. [35] L. Martignoni, A. Fattori, R. Paleari, and L. Cavallaro,
[25] T. Müller and M. Spreitzenbarth, “Frost: Forensic recovery “Live and trustworthy forensic analysis of commodity
of scrambled telephones,” in Applied Cryptography production systems,” in Proc. Recent Advances in
and Network Security, M. Jacobson, M. Locasto, P. Intrusion Detection, 13th Int. Symp. (RAID 2010),
Mohassel, and R. Safavi-Naini, Eds. Berlin, Heidelberg: Ottawa, Ontario, Canada, Sep. 15–17, 2010,
Springer Berlin Heidelberg, 2013, pp. 373–388. pp. 297–316.
[26] S. Vömel and F. C. Freiling, “Correctness, atomicity, [36] R. Palutke and F. Freiling, “Styx: Countering robust
and integrity: Defining criteria for forensically-sound memory acquisition,” Digital Investigat., vol. 24,
memory acquisition,” Digital Investigat., vol. 9, no. 2, pp. S18–S28, 2018.
pp. 125–137, 2012. [Online]. Available: https://doi.org/ [37] J. Stüttgen and M. Cohen, “Anti-forensic resilient
10.1016/j.diin.2012.04.005 memory acquisition,” Digital Investigat., vol. 10,
[27] S. Vömel and J. Stüttgen, “An evaluation platform for pp. S105–S115, 2013.
forensic memory acquisition software,” in Proc. 13th
Ann. DFRWS Conf., 2013, pp. 1–12. Felix Freiling is a Full Professor in the Depart­
[28] M. Gruhn and F. Freiling, “Evaluating atomicity, and ment of Computer Science at Friedrich-Alexander-
integrity of correct memory acquisition methods,” in Universität Erlangen–Nürnberg, Erlangen, Germany.
Proc. 3rd Ann. DFRWS Euro. Conf., Elsevier, 2016, His research interests include forensic computing
pp. 1–10. [Online]. Available: https://www.dfrws. and offensive IT security.

September/October 2018
73
Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.
Tutorial

Tobias Groß is a PhD student in the Department of security (Android and iOS) and trusted computing
Computer Science at Friedrich-Alexander-Universität architectures.
Erlangen–Nürnberg, Erlangen, Germany. His research
interests include mobile forensics and system security. Ralph Palutke is a PhD student in the Department
of Computer Science at Friedrich-Alexander-
Tobias Latzo is a PhD student in the Department Universität Erlangen–Nürnberg, Erlangen, Germany.
of Computer Science at Friedrich-Alexander- His research interests include system security and
Universität Erlangen–Nürnberg, Erlangen, Germany. the security of virtual machines and hypervisors.
His research interests include memory forensics and
system security.
 Direct questions and comments about this
Tilo Müller is a Post-Doctoral Researcher in article to Felix Freiling, Department of Computer
the Department of Computer Science at Friedrich- Science, Friedrich-Alexander-Universität Erlangen–
Alexander-Universität Erlangen–Nürnberg, Erlangen, Nürnberg, 91054 Erlangen, Germany; e-mail: felix.
Germany. His research interests include mobile freiling@cs.fau.de.

74 IEEE Design&Test

Authorized licensed use limited to: Charles Sturt University. Downloaded on March 26,2021 at 05:38:03 UTC from IEEE Xplore. Restrictions apply.

You might also like